![]() |
#include <PDFDocViewPrefs.h>
Public Types | |
enum | PageMode { e_UseNone, e_UseThumbs, e_UseBookmarks, e_FullScreen, e_UseOC, e_UseAttachments } |
PageMode specifies how the document should be displayed when opened:. More... | |
enum | PageLayout { e_Default, e_SinglePage, e_OneColumn, e_TwoColumnLeft, e_TwoColumnRight, e_TwoPageLeft, e_TwoPageRight } |
PageLayout specifies the page layout to be used when the document is opened:. More... | |
enum | ViewerPref { e_HideToolbar, e_HideMenubar, e_HideWindowUI, e_FitWindow, e_CenterWindow, e_DisplayDocTitle } |
ViewerPref enumeration specifies how various GUI elements should behave when the document is opened. More... | |
Public Member Functions | |
void | SetInitialPage (Destination &dest) |
A utility method used to set the fist page displayed after the document is opened. | |
void | SetPageMode (PageMode mode) |
Sets PageMode property and change the value of the PageMode key in the Catalog dictionary. | |
PageMode | GetPageMode () |
void | SetLayoutMode (PageLayout layout) |
Sets PageLayout property and change the value of the PageLayout key in the Catalog dictionary. | |
PageLayout | GetLayoutMode () |
void | SetPref (ViewerPref pref, bool value) |
Sets the value of given ViewerPref property. | |
bool | GetPref (ViewerPref pref) |
void | SetNonFullScreenPageMode (PageMode mode) |
Set the document’s page mode, specifying how to display the document on exiting full-screen mode. | |
PageMode | GetNonFullScreenPageMode () |
void | SetDirection (bool left_to_right) |
Sets the predominant reading order for text. | |
bool | GetDirection () |
void | SetViewArea (Page::Box box) |
Sets the page boundary representing the area of a page to be displayed when viewing the document on the screen. | |
Page::Box | GetViewArea () |
void | 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. | |
Page::Box | GetViewClip () |
void | SetPrintArea (Page::Box box) |
Sets the page boundary representing the area of a page to be rendered when printing the document. | |
Page::Box | GetPrintArea () |
void | SetPrintClip (Page::Box box) |
Sets the page boundary to which the contents of a page are to be clipped when printing the document. | |
Page::Box | GetPrintClip () |
SDF::Obj | GetSDFObj () |
PDFDocViewPrefs (SDF::Obj tr) | |
PDFDocViewPrefs constructor. | |
PDFDocViewPrefs (const PDFDocViewPrefs &) | |
PDFDocViewPrefs & | operator= (const PDFDocViewPrefs &) |
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.
PageMode specifies how the document should be displayed when opened:.
PageLayout specifies the page layout to be used when the document is opened:.
ViewerPref enumeration specifies how various GUI elements should behave when the document is opened.
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 & | ) |
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. |
Destination dest = Destination::CreateFit(page); pdfdoc.GetViewPrefs().SetInitialPage(dest);
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. |
PageMode pdftron::PDF::PDFDocViewPrefs::GetPageMode | ( | ) |
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. |
PageLayout pdftron::PDF::PDFDocViewPrefs::GetLayoutMode | ( | ) |
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. |
bool pdftron::PDF::PDFDocViewPrefs::GetPref | ( | ViewerPref | pref | ) |
pref | the ViewerPref property type to query. |
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. |
PageMode pdftron::PDF::PDFDocViewPrefs::GetNonFullScreenPageMode | ( | ) |
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. |
bool pdftron::PDF::PDFDocViewPrefs::GetDirection | ( | ) |
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. |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetViewArea | ( | ) |
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. |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetViewClip | ( | ) |
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. |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetPrintArea | ( | ) |
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. |
Page::Box pdftron::PDF::PDFDocViewPrefs::GetPrintClip | ( | ) |
SDF::Obj pdftron::PDF::PDFDocViewPrefs::GetSDFObj | ( | ) |
PDFDocViewPrefs& pdftron::PDF::PDFDocViewPrefs::operator= | ( | const PDFDocViewPrefs & | ) |