Xojo Conferences
MBSOct2019CologneDE

DynaPDF Manual - Page 471

Previous Page 470   Index   Next Page 472

Function Reference
Page 471 of 770
#define avNonFullScrUseOC
0x00000400 // PDF 1.6
#define avDirectionL2R
0x00000008
#define avDirectionR2L
0x00000010
#define avViewPrintArtBox
0x00000020
#define avViewPrintBleedBox
0x00000040
#define avViewPrintCropBox
0x00000080
#define avViewPrintMediaBox
0x00000100
#define avViewPrintTrimBox
0x00000200
#define AV_NON_FULL_SRC_MASK
0x00000005
#define AV_DIRECTION_MASK
0x00000018
#define AV_VIEW_PRINT_MASK
0x000003E0
The function retrieves the viewer preferences specified in the document. The parameters Preference
and AddVal are bit masks; they must be masked out with a bitwise and operator. Preferences in red
color are keys which have a corresponding value which must be taken from the parameter AddVal.
Note that more than one preference can be set at time.
The mask values can be used to easily mask out a specific parameter, see the example below.
Example (C++):
SI32 pref = 0, value = 0;
pdfGetViewerPreferences(pdf, pref, value);
if ((pref & vpDirection) && (value & avDirectionR2L))
printf("Right to left reading order was defined!\n");
if (pref & AV_NON_FULL_SRC_MASK)
{
printf("Non full screen mode is: \n");
switch(value & AV_NON_FULL_SRC_MASK)
{
case avNonFullScrUseNone:
printf("Use none\n");
case avNonFullScrUseOutlines: printf("Use outlines\n");
case avNonFullScrUseThumbs: printf("Use thumbs\n");
}
}
 

Previous topic: GetUseTransparency, GetUseVisibleCoords, GetViewerPreferences

Next topic: GetViewport, GetViewportCount