PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() ![]() ![]() Collapse AllThis property gets or sets the value indicating whether the PDF reader should center the document on the screen.
|
| VARIANT_BOOL ViewerPreferences_vpCenterWindow { get; set; } |
Value
VARIANT_TRUE if the PDF reader centers the document on the screen, VARIANT_FALSE otherwise.
Remarks
When set to VARIANT_TRUE, ViewerPreferences_vpCenterWindow sets the document window in the center of the screen.
Equivalent in new interface: IPDFDocument4::CenterWindow.
Example
Setting Various Viewer Preferences
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.ViewerPreferences_vpHideToolBar := true;
PDF.ViewerPreferences_vpHideMenuBar := true;
PDF.ViewerPreferences_vpHideWindowUI := true;
PDF.ViewerPreferences_vpFitWindow := true;
PDF.ViewerPreferences_vpCenterWindow := true;
PDF.BeginDoc;
{ some document generating code here... }
PDF.EndDoc;
{ The resulting document will be shown without any }
{ user interface elements; fits the screen and is centered. }
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->ViewerPreferences_vpHideToolBar = TRUE; PDF->ViewerPreferences_vpHideMenuBar = TRUE; PDF->ViewerPreferences_vpHideWindowUI = TRUE; PDF->ViewerPreferences_vpFitWindow = TRUE; PDF->ViewerPreferences_vpCenterWindow = TRUE; PDF->BeginDoc(); // some document generating code here... PDF->EndDoc(); /* The resulting document will be shown without any user interface elements; fits the screen and is centered. */
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.ViewerPreferences_vpHideToolBar = true; PDF.ViewerPreferences_vpHideMenuBar = true; PDF.ViewerPreferences_vpHideWindowUI = true; PDF.ViewerPreferences_vpFitWindow = true; PDF.ViewerPreferences_vpCenterWindow = true; PDF.BeginDoc(); // some document generating code here... PDF.EndDoc(); /* The resulting document will be shown without any user interface elements; fits the screen and is centered. */
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.ViewerPreferences_vpHideToolBar = True PDF.ViewerPreferences_vpHideMenuBar = True PDF.ViewerPreferences_vpHideWindowUI = True PDF.ViewerPreferences_vpFitWindow = True PDF.ViewerPreferences_vpCenterWindow = True PDF.BeginDoc ' some document generating code here... PDF.EndDoc ' The resulting document will be shown without any ' user interface elements; fits the screen and is centered.
See Also


