Function Reference
Page 511 of 839
#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");
}
}