#include <PDFDocViewPrefs.h>
Public Types | |
enum | PageMode { e_UseNone, e_UseThumbs, e_UseBookmarks, e_FullScreen, e_UseOC, e_UseAttachments } |
enum | PageLayout { e_Default, e_SinglePage, e_OneColumn, e_TwoColumnLeft, e_TwoColumnRight, e_TwoPageLeft, e_TwoPageRight } |
enum | ViewerPref { e_HideToolbar, e_HideMenubar, e_HideWindowUI, e_FitWindow, e_CenterWindow, e_DisplayDocTitle } |
Public Member Functions | |
void | SetInitialPage (Destination &dest) |
void | SetPageMode (PageMode mode) |
PageMode | GetPageMode () |
void | SetLayoutMode (PageLayout layout) |
PageLayout | GetLayoutMode () |
void | SetPref (ViewerPref pref, bool value) |
bool | GetPref (ViewerPref pref) |
void | SetNonFullScreenPageMode (PageMode mode) |
PageMode | GetNonFullScreenPageMode () |
void | SetDirection (bool left_to_right) |
bool | GetDirection () |
void | SetViewArea (Page::Box box) |
Page::Box | GetViewArea () |
void | SetViewClip (Page::Box box) |
Page::Box | GetViewClip () |
void | SetPrintArea (Page::Box box) |
Page::Box | GetPrintArea () |
void | SetPrintClip (Page::Box box) |
Page::Box | GetPrintClip () |
SDF::Obj | GetSDFObj () |
PDFDocViewPrefs (SDF::Obj tr) | |
PDFDocViewPrefs (const PDFDocViewPrefs &) | |
PDFDocViewPrefs & | operator= (const PDFDocViewPrefs &) |
PDFDocViewPrefs () | |
PDFDocViewPrefs is a high-level utility class that can be used to control the way the document is to be presented on the screen or in print.
PDFDocViewPrefs class corresponds to PageMode, PageLayout, and ViewerPreferences entries in the document's catalog. For more details please refer to section 8.1 'Viewer Preferences' in PDF Reference Manual.
Definition at line 25 of file PDFDocViewPrefs.h.
PageLayout specifies the page layout to be used when the document is opened:
Enumerator | |
---|---|
e_Default | |
e_SinglePage | |
e_OneColumn | |
e_TwoColumnLeft | |
e_TwoColumnRight | |
e_TwoPageLeft | |
e_TwoPageRight |
Definition at line 110 of file PDFDocViewPrefs.h.
PageMode specifies how the document should be displayed when opened:
Enumerator | |
---|---|
e_UseNone | |
e_UseThumbs | |
e_UseBookmarks | |
e_FullScreen | |
e_UseOC | |
e_UseAttachments |
Definition at line 61 of file PDFDocViewPrefs.h.
ViewerPref enumeration specifies how various GUI elements should behave when the document is opened.
Enumerator | |
---|---|
e_HideToolbar | |
e_HideMenubar | |
e_HideWindowUI | |
e_FitWindow | |
e_CenterWindow | |
e_DisplayDocTitle |
Definition at line 166 of file PDFDocViewPrefs.h.
pdftron::PDF::PDFDocViewPrefs::PDFDocViewPrefs | ( | SDF::Obj | tr | ) |
PDFDocViewPrefs constructor. Typically this constructor is never used since it is easier to obtain PDFDocViewPrefs using PDFDoc.GetViewPrefs()
pdftron::PDF::PDFDocViewPrefs::PDFDocViewPrefs | ( | const PDFDocViewPrefs & | ) |
pdftron::PDF::PDFDocViewPrefs::PDFDocViewPrefs | ( | ) |
bool pdftron::PDF::PDFDocViewPrefs::GetDirection | ( | ) |
PageLayout pdftron::PDF::PDFDocViewPrefs::GetLayoutMode | ( | ) |
PageMode pdftron::PDF::PDFDocViewPrefs::GetNonFullScreenPageMode | ( | ) |
PageMode pdftron::PDF::PDFDocViewPrefs::GetPageMode | ( | ) |
bool pdftron::PDF::PDFDocViewPrefs::GetPref | ( | ViewerPref | pref | ) |
pref | the ViewerPref property type to query. |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetPrintArea | ( | ) |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetPrintClip | ( | ) |
SDF::Obj pdftron::PDF::PDFDocViewPrefs::GetSDFObj | ( | ) |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetViewArea | ( | ) |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetViewClip | ( | ) |
PDFDocViewPrefs& pdftron::PDF::PDFDocViewPrefs::operator= | ( | const PDFDocViewPrefs & | ) |
void pdftron::PDF::PDFDocViewPrefs::SetDirection | ( | bool | left_to_right | ) |
Sets the predominant reading order for text.
This flag has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up.
left_to_right | - true if the predominant reading order for text is from left to right and false if it is right to left (including vertical writing systems, such as Chinese, Japanese, and Korean). Default value: left_to_right is true. |
void pdftron::PDF::PDFDocViewPrefs::SetInitialPage | ( | Destination & | dest | ) |
A utility method used to set the fist page displayed after the document is opened. This method is equivalent to PDFDoc::SetOpenAction(goto_action).
If OpenAction is not specified the document should be opened to the top of the first page at the default magnification factor.
dest | A value specifying the page destination to be displayed when the document is opened. |
Example:
void pdftron::PDF::PDFDocViewPrefs::SetLayoutMode | ( | PageLayout | layout | ) |
Sets PageLayout property and change the value of the PageLayout key in the Catalog dictionary.
mode | New PageLayout setting. Default value is e_SinglePage. |
void pdftron::PDF::PDFDocViewPrefs::SetNonFullScreenPageMode | ( | PageMode | mode | ) |
Set the document's page mode, specifying how to display the document on exiting full-screen mode.
mode | PageMode used after exiting full-screen mode. Default value: e_UseNone. |
void pdftron::PDF::PDFDocViewPrefs::SetPageMode | ( | PageMode | mode | ) |
Sets PageMode property and change the value of the PageMode key in the Catalog dictionary.
mode | New PageMode setting. Default value is e_UseNone. |
void pdftron::PDF::PDFDocViewPrefs::SetPref | ( | ViewerPref | pref, |
bool | value | ||
) |
Sets the value of given ViewerPref property.
pref | the ViewerPref property type to modify. |
value | The new value for the property. |
void pdftron::PDF::PDFDocViewPrefs::SetPrintArea | ( | Page::Box | box | ) |
Sets the page boundary representing the area of a page to be rendered when printing the document.
box | printing region. The default value is page crop-box. |
void pdftron::PDF::PDFDocViewPrefs::SetPrintClip | ( | Page::Box | box | ) |
Sets the page boundary to which the contents of a page are to be clipped when printing the document.
box | printing clip region. The default value is page crop-box. |
void pdftron::PDF::PDFDocViewPrefs::SetViewArea | ( | Page::Box | box | ) |
Sets the page boundary representing the area of a page to be displayed when viewing the document on the screen.
box | page boundary displayed when viewing the document on the screen. By default, PDF viewers will display the crop-box. |
void pdftron::PDF::PDFDocViewPrefs::SetViewClip | ( | Page::Box | box | ) |
Sets the page boundary to which the contents of a page are to be clipped when viewing the document on the screen.
box | screen clip region. The default value is page crop-box. |