DynaPDF Manual - Page 804

Previous Page 803   Index   Next Page 805

Function Reference
Page 804 of 839
SetViewerPreferences
Syntax:
LBOOL pdfSetViewerPreferences(
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
0x00000000
#define avNonFullScrUseNone
0x00000001
#define avNonFullScrUseOutlines 0x00000002
#define avNonFullScrUseThumbs
0x00000004
#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
The function sets the viewer preferences which control certain features in PDF viewers, such as
hiding 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: SetUseTransparency, SetUseVisibleCoords

Next topic: SetWMFDefExtent, SetWMFPixelPerInch