PoDoFo::PdfPagesTree Class Reference

#include <PdfPagesTree.h>

Inheritance diagram for PoDoFo::PdfPagesTree:

PoDoFo::PdfElement

List of all members.

Public Member Functions

 PdfPagesTree (PdfVecObjects *pParent)
 PdfPagesTree (PdfObject *pPagesRoot)
virtual ~PdfPagesTree ()
int GetTotalNumberOfPages () const
PdfPageGetPage (int nIndex)
PdfPageGetPage (const PdfReference &ref)
void InsertPage (int inAfterPageNumber, PdfObject *pPage)
void InsertPage (int inAfterPageNumber, PdfPage *inPage)
PdfPageCreatePage (const PdfRect &rSize)
void DeletePage (int inPageNumber)


Detailed Description

Class for managing the tree of Pages in a PDF document Don't use this class directly. Use PdfDocument instead.

See also:
PdfDocument

Constructor & Destructor Documentation

PoDoFo::PdfPagesTree::PdfPagesTree ( PdfVecObjects pParent  ) 

Construct a new PdfPagesTree

PoDoFo::PdfPagesTree::PdfPagesTree ( PdfObject pPagesRoot  ) 

Construct a PdfPagesTree from the root /Pages object

Parameters:
pPagesRoot pointer to page tree dictionary

PoDoFo::PdfPagesTree::~PdfPagesTree (  )  [virtual]

Close/down destruct a PdfPagesTree


Member Function Documentation

PdfPage * PoDoFo::PdfPagesTree::CreatePage ( const PdfRect rSize  ) 

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

Parameters:
rSize a PdfRect specifying the size of the page (i.e the /MediaBox key) in PDF units
Returns:
a pointer to a PdfPage object

void PoDoFo::PdfPagesTree::DeletePage ( int  inPageNumber  ) 

Delete the specified page object from the internal pages tree. It does NOT remove any PdfObjects from memory - just the reference from the tree

Parameters:
inPageNumber the page number (0-based) to be removed
The PdfPage object refering to this page will be deleted by this call!

PdfPage * PoDoFo::PdfPagesTree::GetPage ( const PdfReference ref  ) 

Return a PdfPage for the specified Page reference. The returned page is owned by the pages tree and deleted along with it.

Parameters:
ref the reference of the pages object
Returns:
a pointer to the requested page

PdfPage * PoDoFo::PdfPagesTree::GetPage ( int  nIndex  ) 

Return a PdfPage for the specified Page index The returned page is owned by the pages tree and deleted along with it.

Parameters:
nIndex page index, 0-based
Returns:
a pointer to the requested page

int PoDoFo::PdfPagesTree::GetTotalNumberOfPages (  )  const

Return the number of pages in the entire tree

Returns:
number of pages

void PoDoFo::PdfPagesTree::InsertPage ( int  inAfterPageNumber,
PdfPage inPage 
)

Inserts an existing page object into the internal page tree. after the specified page number

Parameters:
inAfterPageNumber an integer specifying after what page - may be one of the special values
inPage a PdfPage to be inserted

void PoDoFo::PdfPagesTree::InsertPage ( int  inAfterPageNumber,
PdfObject pPage 
)

Inserts an existing page object into the internal page tree. after the specified page number

Parameters:
inAfterPageNumber an integer specifying after what page - may be one of the special values
pPage musst be a PdfObject with type /Page


Generated on Sat May 2 02:52:31 2009 for PoDoFo by  doxygen 1.5.8