Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 717

Previous Page 716   Index   Next Page 718

Function Reference
Page 717 of 750
LBOOL pdfSetViewerPrefrences(
const PPDF* IPDF,
// Instance pointer
TViewerPreference Value, // Preference
TViewPrefAddVal AddVal)
// Parameter of the preference if any
typedef SI32 TViewerPreference;
#define vpUseNone
0x00000000 // No preference is set
#define vpHideToolBar
0x00000001 // No parameter
#define vpHideMenuBar
0x00000002 // No parameter
#define vpHideWindowUI
0x00000004 // No parameter
#define vpFitWindow
0x00000008 // No parameter
#define vpCenterWindow
0x00000010 // No parameter
#define vpDisplayDocTitle
0x00000020 // (PDF 1.4) No parameter
#define vpNonFullScrPageMode
0x00000040 // Key, values see below
#define vpDirection
0x00000080 // (PDF 1.3)
#define vpViewArea
0x00000100 // (PDF 1.4)
#define vpViewClip
0x00000200 // (PDF 1.4)
#define vpPrintArea
0x00000400 // (PDF 1.4)
#define vpPrintClip
0x00000800 // (PDF 1.4)
typedef SI32 TViewPrefAddVal;
#define avNone
#define avNonFullScrUseNone
#define avNonFullScrUseOutlines 0x00000002
#define avNonFullScrUseThumbs
#define avNonFullScrUseOC
0x00000400 // PDF 1.6
#define avDirectionL2R
#define avDirectionR2L
#define avViewPrintArtBox
#define avViewPrintBleedBox
#define avViewPrintCropBox
#define avViewPrintMediaBox
#define avViewPrintTrimBox
The function sets the viewer preferences which control certain features in PDF viewers, such as
hidding the toolbar or menu bar. The parameters Value and AddVal are both bitmasks. Multiple
values can be set by using a bitwise or operator. It is also possible to call the function multiple times
to set each preference separately; the flags are combined with already existing one in this case.
Already defined flags can be deleted with the flag vpUseNone. A few flags require an additional
parameter that must be added to AddVal.
The flags are described in detail on the next page.
Default value = vpUseNone
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: SetUseVisibleCoords

Next topic: SetWMFDefExtent