IWxPageSettings.FitToPages

Syntax

FitToPages: Boolean;

FitToPages: boolean;

Description

The FitToPages property determines vertical and horizontal positioning and printing of a workspace in the defined number of pages.

Comments

The default property value is True.Determine the number of pages horizontally (PageWidth) and vertically (PageHeight).

If the property is set to False, determine the workspace scale (Scale).

Example

Executing the example requires that repository contains a workspace with the WSP identifier.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    PS: IWxPageSettings;
Begin
    
// Get repository
    mb := MetabaseClass.Active;
    wsp := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    PS := wsp.PageSettings;

    PS.FitToPages := True;
    PS.PageHeight := 
2;
    PS.PageWidth := 
3;
    (wsp 
As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Andy;
 
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    wsp: IWxWorkspace;
    PS: IWxPageSettings;
Begin
    
// Get repository
    mb := Params.Metabase;
    wsp := mb.ItemById[
"WSP"].Edit() As IWxWorkspace;
    PS := wsp.PageSettings;
    PS.FitToPages := 
True;
    PS.PageHeight := 
2;
    PS.PageWidth := 
3;
    (wsp 
As IMetabaseObject).Save();
End Sub;

After executing the example when printed a workspace will be allocated in up to three pages horizontally and in two pages vertically.

See also:

IWxPageSettings