ComponentOne VSView 8.0
PhysicalPage Property

Returns or sets whether to use the physical size of the page or on its printable area.

Syntax

[form!]VSPrinter.PhysicalPage[ = {True | False} ]

Remarks

Most printers have a "logical" paper size that corresponds to the printer's printable area and a "physical" paper size that corresponds to the actual page size. The physical paper size is always a little larger than the logical paper size.

If the PhysicalPage property is set to True, the control draws and prints to the physical page. This means any content that is drawn too close to the edges of the page may not be printed. This setting should be used when accurate positioning of elements with respect to the edges of the paper is desired. This is the case when printing checks, letterhead paper, and other pre-printed forms.

If the PhysicalPage property is set to False, the control draws and prints to the logical page. This means the page appears smaller than it actually is, and prevents output from being placed outside the printable area of the control.

The setting of this property is reflected in the values returned by the PageWidth and PageHeight properties. It can also be seen on the preview page if the ShowGuides property is set to a non-zero value.

Note: The default value for this property is True, which gives more consistent output across different printers.

The following code shows the difference between the two settings:

Private Sub Command1_Click()

    With vp

   

    .PaperSize = pprLetter

    .FontSize = 44

    .TextAlign = taCenterMiddle

    .BrushStyle = bsTransparent

 

    Dim s$

    s = "PhysicalPage is " & .PhysicalPage & "."

    s = s & vbLf & "PaperSize is pprLetter."

    s = s & vbLf & "PageWidth is " & (.PageWidth / 1440) & " inches."

    s = s & vbLf & "PageHeight is " & (.PageHeight / 1440) & " inches."

 

    .StartDoc

        .TextBox s, 0, 0, .PageWidth, .PageHeight

        .DrawEllipse 0, 0, .PageWidth, .PageHeight

    .EndDoc

   

    End With

End Sub

The following image illustrates the output generated by the code when PhysicalPage is set to True and to False:

 

 

Data Type

Boolean

Default Value

True

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback