PoDoFo  0.9.3
Public Member Functions | Protected Member Functions | List of all members
PoDoFo::PdfDocument Class Referenceabstract

#include <PdfDocument.h>

Inheritance diagram for PoDoFo::PdfDocument:
PoDoFo::PdfMemDocument PoDoFo::PdfStreamedDocument

Public Member Functions

virtual ~PdfDocument ()
 
virtual EPdfWriteMode GetWriteMode () const =0
 
virtual EPdfVersion GetPdfVersion () const =0
 
virtual bool IsLinearized () const =0
 
PdfInfoGetInfo () const
 
PdfOutlinesGetOutlines (bool bCreate=ePdfCreateObject)
 
PdfNamesTree * GetNamesTree (bool bCreate=ePdfCreateObject)
 
PdfAcroForm * GetAcroForm (bool bCreate=ePdfCreateObject, EPdfAcroFormDefaulAppearance eDefaultAppearance=ePdfAcroFormDefaultAppearance_BlackText12pt)
 
PdfPagesTreeGetPagesTree () const
 
int GetPageCount () const
 
PdfPageGetPage (int nIndex) const
 
PdfFontCreateFont (const char *pszFontName, bool bSymbolCharset=false, const PdfEncoding *const pEncoding=PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), PdfFontCache::EFontCreationFlags eFontCreationFlags=PdfFontCache::eFontCreationFlags_AutoSelectBase14, bool bEmbedd=true)
 
PdfFontCreateFont (const char *pszFontName, bool bBold, bool bItalic, bool bSymbolCharset=false, const PdfEncoding *const pEncoding=PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), PdfFontCache::EFontCreationFlags eFontCreationFlags=PdfFontCache::eFontCreationFlags_AutoSelectBase14, bool bEmbedd=true, const char *pszFileName=NULL)
 
PdfFontCreateFont (FT_Face face, bool bSymbolCharset=false, const PdfEncoding *const pEncoding=PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), bool bEmbedd=true)
 
PdfFontCreateDuplicateFontType1 (PdfFont *pFont, const char *pszSuffix)
 
PdfFontCreateFontSubset (const char *pszFontName, bool bBold, bool bItalic, bool bSymbolCharset=false, const PdfEncoding *const pEncoding=PdfEncodingFactory::GlobalWinAnsiEncodingInstance(), const char *pszFileName=NULL)
 
FT_Library GetFontLibrary () const
 
void EmbedSubsetFonts ()
 
PdfPageCreatePage (const PdfRect &rSize)
 
void CreatePages (const std::vector< PdfRect > &vecSizes)
 
PdfPageInsertPage (const PdfRect &rSize, int atIndex)
 
const PdfDocumentAppend (const PdfMemDocument &rDoc, bool bAppendAll=true)
 
const PdfDocumentInsertExistingPageAt (const PdfMemDocument &rDoc, int nPageIndex, int nAtIndex)
 
PdfRect FillXObjectFromDocumentPage (PdfXObject *pXObj, const PdfMemDocument &rDoc, int nPage, bool bUseTrimBox)
 
PdfRect FillXObjectFromExistingPage (PdfXObject *pXObj, int nPage, bool bUseTrimBox)
 
PdfRect FillXObjectFromPage (PdfXObject *pXObj, const PdfPage *pPage, bool bUseTrimBox, unsigned int difference)
 
void AttachFile (const PdfFileSpec &rFileSpec)
 
PdfFileSpecGetAttachment (const PdfString &rName)
 
void AddNamedDestination (const PdfDestination &rDest, const PdfString &rsName)
 
void SetPageMode (EPdfPageMode inMode)
 
EPdfPageMode GetPageMode (void) const
 
void SetUseFullScreen (void)
 
void SetPageLayout (EPdfPageLayout inLayout)
 
void SetHideToolbar (void)
 
void SetHideMenubar (void)
 
void SetHideWindowUI (void)
 
void SetFitWindow (void)
 
void SetCenterWindow (void)
 
void SetDisplayDocTitle (void)
 
void SetPrintScaling (PdfName &inScalingType)
 
void SetBaseURI (const std::string &inBaseURI)
 
void SetLanguage (const std::string &inLanguage)
 
void SetBindingDirection (PdfName &inDirection)
 
virtual bool IsPrintAllowed () const =0
 
virtual bool IsEditAllowed () const =0
 
virtual bool IsCopyAllowed () const =0
 
virtual bool IsEditNotesAllowed () const =0
 
virtual bool IsFillAndSignAllowed () const =0
 
virtual bool IsAccessibilityAllowed () const =0
 
virtual bool IsDocAssemblyAllowed () const =0
 
virtual bool IsHighPrintAllowed () const =0
 
PdfVecObjectsGetObjects ()
 
const PdfVecObjectsGetObjects () const
 
void SetFontConfigWrapper (const PdfFontConfigWrapper &rFontConfig)
 

Protected Member Functions

 PdfDocument (bool bEmpty=false)
 
void SetInfo (PdfInfo *pInfo)
 
PdfObjectGetCatalog ()
 
const PdfObjectGetCatalog () const
 
void SetCatalog (PdfObject *pObject)
 
PdfObjectGetTrailer ()
 
const PdfObjectGetTrailer () const
 
void SetTrailer (PdfObject *pObject)
 
PdfObjectGetNamedObjectFromCatalog (const char *pszName) const
 
void InitPagesTree ()
 
void FixObjectReferences (PdfObject *pObject, int difference)
 
void SetViewerPreference (const PdfName &whichPref, const PdfObject &valueObj)
 
void SetViewerPreference (const PdfName &whichPref, bool inValue)
 
void Clear ()
 

Detailed Description

PdfDocument is the core interface for working with PDF documents.

PdfDocument provides easy access to the individual pages in the PDF file and to certain special dictionaries.

PdfDocument cannot be used directly. Use PdfMemDocument whenever you want to change the object structure of a PDF file.

When you are only creating PDF files, please use PdfStreamedDocument which is usually faster for creating PDFs.

See Also
PdfStreamedDocument
PdfMemDocument

Constructor & Destructor Documentation

PoDoFo::PdfDocument::~PdfDocument ( )
virtual

Close down/destruct the PdfDocument

PoDoFo::PdfDocument::PdfDocument ( bool  bEmpty = false)
protected

Construct a new (empty) PdfDocument

Parameters
bEmtpyif true NO default objects (such as catalog) are created.

Member Function Documentation

void PoDoFo::PdfDocument::AddNamedDestination ( const PdfDestination rDest,
const PdfString rsName 
)

Adds a PdfDestination into the global Names tree with the specified name, optionally replacing one of the same name

Parameters
rDestthe destination to be assigned
rsNamethe name for the destination
const PdfDocument & PoDoFo::PdfDocument::Append ( const PdfMemDocument rDoc,
bool  bAppendAll = true 
)

Appends another PdfDocument to this document

Parameters
rDocthe document to append
bAppendAllspecifies whether pages and outlines are appended too
Returns
this document
void PoDoFo::PdfDocument::AttachFile ( const PdfFileSpec rFileSpec)

Attach a file to the document.

Parameters
rFileSpeca file specification
void PoDoFo::PdfDocument::Clear ( )
protected

Clear all internal variables And reset PdfDocument to an intial state

PdfFont * PoDoFo::PdfDocument::CreateDuplicateFontType1 ( PdfFont pFont,
const char *  pszSuffix 
)

Creates a duplicate Type1-PdfFont with a new Id

Parameters
pFontis the existing font
pszSuffixSuffix to add to font-id The returned object is owned by the PdfDocument.

TODO: DS: Make this generic so that it will work for any font type!

PdfFont * PoDoFo::PdfDocument::CreateFont ( const char *  pszFontName,
bool  bSymbolCharset = false,
const PdfEncoding *const  pEncoding = PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
PdfFontCache::EFontCreationFlags  eFontCreationFlags = PdfFontCache::eFontCreationFlags_AutoSelectBase14,
bool  bEmbedd = true 
)

Creates a PdfFont object

Parameters
pszFontNamename of the font as it is known to the system
bSymbolCharsetwhether to use symbol charset, rather than unicode charset
pEncodingthe encoding of the font. The font will not take ownership of this object.
eFontCreationFlagsspecial flag to specify how fonts should be created
bEmbeddspecifies whether this font should be embedded in the PDF file. Embedding fonts is usually a good idea.
Returns
PdfFont* a pointer to a new PdfFont object. The returned object is owned by the PdfDocument.
PdfFont * PoDoFo::PdfDocument::CreateFont ( const char *  pszFontName,
bool  bBold,
bool  bItalic,
bool  bSymbolCharset = false,
const PdfEncoding *const  pEncoding = PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
PdfFontCache::EFontCreationFlags  eFontCreationFlags = PdfFontCache::eFontCreationFlags_AutoSelectBase14,
bool  bEmbedd = true,
const char *  pszFileName = NULL 
)

Creates a PdfFont object

Parameters
pszFontNamename of the font as it is known to the system
bBoldif true search for a bold font
bItalicif true search for an italic font
bSymbolCharsetwhether to use symbol charset, rather than unicode charset
pEncodingthe encoding of the font. The font will not take ownership of this object.
eFontCreationFlagsspecial flag to specify how fonts should be created
bEmbeddspecifies whether this font should be embedded in the PDF file. Embedding fonts is usually a good idea.
pszFileNamepath to a valid font file
Returns
PdfFont* a pointer to a new PdfFont object.
PdfFont * PoDoFo::PdfDocument::CreateFont ( FT_Face  face,
bool  bSymbolCharset = false,
const PdfEncoding *const  pEncoding = PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
bool  bEmbedd = true 
)

Creates a PdfFont object

Parameters
facea valid freetype font handle (will be free'd by PoDoFo)
bSymbolCharsetwhether to use symbol charset, rather than unicode charset
pEncodingthe encoding of the font. The font will not take ownership of this object.
bEmbeddspecifies whether this font should be embedded in the PDF file. Embedding fonts is usually a good idea.
Returns
PdfFont* a pointer to a new PdfFont object. The returned object is owned by the PdfDocument.
PdfFont * PoDoFo::PdfDocument::CreateFontSubset ( const char *  pszFontName,
bool  bBold,
bool  bItalic,
bool  bSymbolCharset = false,
const PdfEncoding *const  pEncoding = PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
const char *  pszFileName = NULL 
)
Creates a font subset which contains only a few characters and is embedded.

THIS WORKS ONLY FOR TTF FONTS!

Parameters
pszFontNamename of the font as it is known to the system
bBoldif true search for a bold font
bItalicif true search for an italic font
bSymbolCharsetwhether to use symbol charset, rather than unicode charset
pEncodingthe encoding of the font. The font will not take ownership of this object.
pszFileNameoptional path of a fontfile which should be used
Returns
PdfFont* a pointer to a new PdfFont object.
PdfPage * PoDoFo::PdfDocument::CreatePage ( const PdfRect rSize)

Creates a new page object and inserts it into the internal page tree. The returned page is owned by the PdfDocument and will get deleted along with it!

Parameters
rSizea PdfRect spezifying the size of the page (i.e the /MediaBox key) in 1/1000th mm
Returns
a pointer to a PdfPage object
void PoDoFo::PdfDocument::CreatePages ( const std::vector< PdfRect > &  vecSizes)

Creates several new page objects and inserts them into the internal page tree. The created pages are owned by the PdfDocument and will get deleted along with it!

Parameters
vecSizesa vector PdfRect's specifying the size of the pages (i.e the /MediaBox key) in PDF Units
void PoDoFo::PdfDocument::EmbedSubsetFonts ( )

Embeds all pending subset-fonts, is automatically done on Write(). Just call explicit in case PdfDocument is needed as XObject

PdfRect PoDoFo::PdfDocument::FillXObjectFromDocumentPage ( PdfXObject pXObj,
const PdfMemDocument rDoc,
int  nPage,
bool  bUseTrimBox 
)

Fill an existing empty XObject from a page of another document This will append the other document with this one

Parameters
pXObjpointer to the XOject
rDocthe document to embedd into XObject
nPagepage-number to embedd into XObject
bUseTrimBoxif true try to use trimbox for size of xobject
Returns
the bounding box
PdfRect PoDoFo::PdfDocument::FillXObjectFromExistingPage ( PdfXObject pXObj,
int  nPage,
bool  bUseTrimBox 
)

Fill an existing empty XObject from an existing page from the current document If you need a page from another document use FillXObjectFromDocumentPage, or append the documents manually

Parameters
pXObjpointer to the XOject
nPagepage-number to embedd into XObject
bUseTrimBoxif true try to use trimbox for size of xobject
Returns
the bounding box
PdfRect PoDoFo::PdfDocument::FillXObjectFromPage ( PdfXObject pXObj,
const PdfPage pPage,
bool  bUseTrimBox,
unsigned int  difference 
)

Fill an existing empty XObject from an existing page pointer from the current document This is the implementation for FillXObjectFromDocumentPage and FillXObjectFromExistingPage, you should use those directly instead of this

Parameters
pXObjpointer to the XOject
pPagepointer to the page to embedd into XObject
bUseTrimBoxif true try to use trimbox for size of xobject
Returns
the bounding box
void PoDoFo::PdfDocument::FixObjectReferences ( PdfObject pObject,
int  difference 
)
protected

Recursively changes every PdfReference in the PdfObject and in any child that is either an PdfArray or a direct object. The reference is changed so that difference is added to the object number if the reference.

Parameters
pObjectobject to change
differenceadd this value to every reference that is encountered
PdfAcroForm * PoDoFo::PdfDocument::GetAcroForm ( bool  bCreate = ePdfCreateObject,
EPdfAcroFormDefaulAppearance  eDefaultAppearance = ePdfAcroFormDefaultAppearance_BlackText12pt 
)

Get access to the AcroForm dictionary

Parameters
bCreatecreate the object if it does not exist (ePdfCreateObject) or return NULL if it does not exist
eDefaultAppearancespecifies if a default appearence shall be created
Returns
PdfObject the AcroForm dictionary
PdfFileSpec * PoDoFo::PdfDocument::GetAttachment ( const PdfString rName)

Get an attached file's filespec

Parameters
rNamethe name of the attachment
Returns
the file specification object if the file exists, NULL otherwise The file specification object is not owned by the document and must be deleted by the caller
PdfObject * PoDoFo::PdfDocument::GetCatalog ( )
inlineprotected

Get access to the internal Catalog dictionary or root object.

Returns
PdfObject the documents catalog
const PdfObject * PoDoFo::PdfDocument::GetCatalog ( ) const
inlineprotected

Get access to the internal Catalog dictionary or root object.

Returns
PdfObject the documents catalog
FT_Library PoDoFo::PdfDocument::GetFontLibrary ( ) const
inline

Returns the font library from font cache

Returns
the internal handle to the freetype library
PdfInfo* PoDoFo::PdfDocument::GetInfo ( ) const
inline

Get access to the internal Info dictionary You can set the author, title etc. of the document using the info dictionary.

Returns
the info dictionary
PdfObject * PoDoFo::PdfDocument::GetNamedObjectFromCatalog ( const char *  pszName) const
protected

Get a dictioary from the catalog dictionary by its name.

Parameters
pszNamewill be converted into a PdfName
Returns
the dictionary if it was found or NULL
PdfNamesTree * PoDoFo::PdfDocument::GetNamesTree ( bool  bCreate = ePdfCreateObject)

Get access to the Names dictionary (where all the named objects are stored) The returned PdfNamesTree object is owned by the PdfDocument.

Parameters
bCreatecreate the object if it does not exist (ePdfCreateObject) or return NULL if it does not exist
Returns
the Names dictionary
PdfVecObjects * PoDoFo::PdfDocument::GetObjects ( )
inline

Get access to the internal vector of objects or root object.

Returns
the vector of objects
const PdfVecObjects * PoDoFo::PdfDocument::GetObjects ( ) const
inline

Get access to the internal vector of objects or root object.

Returns
the vector of objects
PdfOutlines * PoDoFo::PdfDocument::GetOutlines ( bool  bCreate = ePdfCreateObject)

Get access to the Outlines (Bookmarks) dictionary The returned outlines object is owned by the PdfDocument.

Parameters
bCreatecreate the object if it does not exist (ePdfCreateObject) or return NULL if it does not exist
Returns
the Outlines/Bookmarks dictionary
PdfPage * PoDoFo::PdfDocument::GetPage ( int  nIndex) const

Get the PdfPage for a specific page in a document The returned page is owned by the PdfDocument and will get deleted along with it!

Parameters
nIndexwhich page (0-based)
Returns
a pointer to a PdfPage for the requested page. The returned object is owned by the PdfDocument.
int PoDoFo::PdfDocument::GetPageCount ( void  ) const

Get the total number of pages in a document

Returns
int number of pages
EPdfPageMode PoDoFo::PdfDocument::GetPageMode ( void  ) const

Gets the opening mode for a document

Returns
which mode is set
PdfPagesTree * PoDoFo::PdfDocument::GetPagesTree ( ) const
inline

Get access to the pages tree. Better use GetPage and CreatePage methods.

Returns
the PdfPagesTree of this document.
virtual EPdfVersion PoDoFo::PdfDocument::GetPdfVersion ( ) const
pure virtual

Get the PDF version of the document

Returns
EPdfVersion version of the pdf document

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

PdfObject * PoDoFo::PdfDocument::GetTrailer ( )
inlineprotected

Get access to the internal trailer dictionary or root object.

Returns
PdfObject the documents catalog
const PdfObject * PoDoFo::PdfDocument::GetTrailer ( ) const
inlineprotected

Get access to the internal trailer dictionary or root object.

Returns
PdfObject the documents catalog
virtual EPdfWriteMode PoDoFo::PdfDocument::GetWriteMode ( ) const
pure virtual

Get the write mode used for wirting the PDF

Returns
the write mode

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

void PoDoFo::PdfDocument::InitPagesTree ( )
protected

Internal method for initializing the pages tree for this document

const PdfDocument & PoDoFo::PdfDocument::InsertExistingPageAt ( const PdfMemDocument rDoc,
int  nPageIndex,
int  nAtIndex 
)

Inserts existing page from another PdfMemDocument to this document

Parameters
rDocthe document to append from
nPageIndexPage index to append (0-based), from rDoc
nAtIndexIndex at which add the page in this document
Returns
this document
PdfPage * PoDoFo::PdfDocument::InsertPage ( const PdfRect rSize,
int  atIndex 
)

Creates a new page object and inserts it at index atIndex. The returned page is owned by the pages tree and will get deleted along with it!

Parameters
rSizea PdfRect specifying the size of the page (i.e the /MediaBox key) in PDF units
atIndexindex where to insert the new page (0-based)
Returns
a pointer to a PdfPage object
virtual bool PoDoFo::PdfDocument::IsAccessibilityAllowed ( ) const
pure virtual

Checks if it is allowed to extract text and graphics to support users with disabillities Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to extract text and graphics to support users with disabillities
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsCopyAllowed ( ) const
pure virtual

Checks if text and graphics extraction is allowed. Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to extract text and graphics from this document
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsDocAssemblyAllowed ( ) const
pure virtual

Checks if it is allowed to insert, create, rotate, delete pages or add bookmarks Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to insert, create, rotate, delete pages or add bookmarks
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsEditAllowed ( ) const
pure virtual

Checks if modifiying this document (besides annotations, form fields or changing pages) is allowed. Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to modfiy this document
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsEditNotesAllowed ( ) const
pure virtual

Checks if it is allowed to add or modify annotations or form fields Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to add or modify annotations or form fields
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsFillAndSignAllowed ( ) const
pure virtual

Checks if it is allowed to fill in existing form or signature fields Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to fill in existing form or signature fields
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsHighPrintAllowed ( ) const
pure virtual

Checks if it is allowed to print a high quality version of this document Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to print a high quality version of this document
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsLinearized ( ) const
pure virtual

Returns wether this PDF document is linearized, aka weboptimized

Returns
true if the PDF document is linearized

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

virtual bool PoDoFo::PdfDocument::IsPrintAllowed ( ) const
pure virtual

Checks if printing this document is allowed. Every PDF consuming applications has to adhere this value!

Returns
true if you are allowed to print this document
See Also
PdfEncrypt to set own document permissions.

Implemented in PoDoFo::PdfMemDocument, and PoDoFo::PdfStreamedDocument.

void PoDoFo::PdfDocument::SetBaseURI ( const std::string &  inBaseURI)

Set the document's Viewer Preferences: Set the base URI of the document

TODO: DS document value!

void PoDoFo::PdfDocument::SetBindingDirection ( PdfName inDirection)

Set the document's Viewer Preferences:

void PoDoFo::PdfDocument::SetCatalog ( PdfObject pObject)
inlineprotected

Set the catalog of this PdfDocument deleting the old one.

Parameters
pObjectthe new catalog object It will be owned by PdfDocument.
void PoDoFo::PdfDocument::SetCenterWindow ( void  )

Set the document's Viewer Preferences: Center the document in the viewers window

void PoDoFo::PdfDocument::SetDisplayDocTitle ( void  )

Set the document's Viewer Preferences: Display the title from the document information in the title of the viewer.

See Also
SetTitle
void PoDoFo::PdfDocument::SetFitWindow ( void  )

Set the document's Viewer Preferences: Fit the document in the viewers window

void PoDoFo::PdfDocument::SetFontConfigWrapper ( const PdfFontConfigWrapper rFontConfig)
inline

Set wrapper for the fontconfig library. Useful to avoid initializing Fontconfig multiple times.

This setter can be called until first use of Fontconfig as the library is initialized at first use.

void PoDoFo::PdfDocument::SetHideMenubar ( void  )

Set the document's Viewer Preferences: Hide the menubar in the viewer

void PoDoFo::PdfDocument::SetHideToolbar ( void  )

Set the document's Viewer Preferences: Hide the toolbar in the viewer

void PoDoFo::PdfDocument::SetHideWindowUI ( void  )

Set the document's Viewer Preferences: Show only the documents contents and no controll elements such as buttons and scrollbars in the viewer

void PoDoFo::PdfDocument::SetInfo ( PdfInfo pInfo)
protected

Set the info object containing meta information. Deletes any old info object.

Parameters
pInfothe new info object (will be owned by PdfDocument)
void PoDoFo::PdfDocument::SetLanguage ( const std::string &  inLanguage)

Set the document's Viewer Preferences: Set the language of the document

void PoDoFo::PdfDocument::SetPageLayout ( EPdfPageLayout  inLayout)

Sets the page layout for a document

void PoDoFo::PdfDocument::SetPageMode ( EPdfPageMode  inMode)

Sets the opening mode for a document

Parameters
inModewhich mode to set
void PoDoFo::PdfDocument::SetPrintScaling ( PdfName inScalingType)

Set the document's Viewer Preferences: Set the default print scaling of the document

TODO: DS use an enum here!

void PoDoFo::PdfDocument::SetTrailer ( PdfObject pObject)
protected

Set the trailer of this PdfDocument deleting the old one.

Parameters
pObjectthe new trailer object It will be owned by PdfDocument.
void PoDoFo::PdfDocument::SetUseFullScreen ( void  )

Sets the opening mode for a document to be in full screen

void PoDoFo::PdfDocument::SetViewerPreference ( const PdfName whichPref,
const PdfObject valueObj 
)
protected

Low level APIs for setting a viewer preference

Parameters
whichPrefthe dictionary key to set
valueObjthe object to be set
void PoDoFo::PdfDocument::SetViewerPreference ( const PdfName whichPref,
bool  inValue 
)
protected

Low level APIs for setting a viewer preference Convinience overload.

Parameters
whichPrefthe dictionary key to set
inValuethe object to be set