SetViewerPreferences
Description
Sets the viewer preferences for the document.
For Option=7 to take effect, the initial page mode should be set to Full Screen using the SetPageMode function with the NewPageMode parameter set to 3.
Syntax
Delphi
function TDebenuPDFLibrary1811.SetViewerPreferences(Option,
NewValue: Integer): Integer;
ActiveX
Function DebenuPDFLibrary1811.PDFLibrary::SetViewerPreferences(Option As Long,
NewValue As Long) As Long
DLL
int DPLSetViewerPreferences(int InstanceID, int Option, int NewValue)
Parameters
Option |
1 = Hide toolbar 2 = Hide menubar 3 = Hide window user interface 4 = Resize window to first page size 5 = Center window 6 = Display document title 7 = Page mode after full screen 8 = Predominant text reading order 9 = Display boundary for viewing 10 = Clipping boundary for viewing 11 = Display voundary for printing 12 = Clipping boundary for printing 13 = Default print dialog: scaling 14 = Default print dialog: duplex 15 = Default print dialog: auto paper tray 16 = Default print dialog: number of copies |
NewValue |
For Option 1 to 6: 0=No, 1=Yes For Option 7: 0=Normal view, 1=Show the outlines pane, 2=Show the thumbnails pane, 3=Show the layers pane For Option 8: 0=Left to right, 1=Right to left For Option 9 to 12: 0=MediaBox, 1=CropBox, 2=BleedBox, 3=TrimBox, 4=ArtBox For Option 13: 0=None, 1=Application default For Option 14: 0=Simplex, 1=Duplex flip short edge, 2=Duplex flip long edge For Option 15: 0=No, 1=Yes For Option 16: Any positive number |
Return values
0 | The viewer preferences could not be set |
1 | The viewer preferences were set successfully |