PoDoFo 0.9.1
Public Member Functions

PoDoFo::PdfDestination Class Reference

#include <PdfDestination.h>

List of all members.

Public Member Functions

 PdfDestination (PdfVecObjects *pParent)
 PdfDestination (PdfObject *pObject, PdfDocument *pDocument)
 PdfDestination (PdfObject *pObject, PdfVecObjects *pVecObjects)
 PdfDestination (const PdfPage *pPage, EPdfDestinationFit eFit=ePdfDestinationFit_Fit)
 PdfDestination (const PdfPage *pPage, const PdfRect &rRect)
 PdfDestination (const PdfPage *pPage, double dLeft, double dTop, double dZoom)
 PdfDestination (const PdfPage *pPage, EPdfDestinationFit eFit, double dValue)
 PdfDestination (const PdfDestination &rhs)
const PdfDestination & operator= (const PdfDestination &rhs)
PdfPage * GetPage (PdfDocument *pDoc)
PdfPage * GetPage (PdfVecObjects *pVecObjects)
EPdfDestinationType GetType () const
double GetZoom () const
PdfRect GetRect () const
double GetTop () const
double GetLeft () const
double GetDValue () const
PdfObject * GetObject ()
const PdfObject * GetObject () const
PdfArray & GetArray ()
const PdfArray & GetArray () const
void AddToDictionary (PdfDictionary &dictionary) const

Detailed Description

A destination in a PDF file. A destination can either be a page or an action.

See also:
PdfOutlineItem
PdfAnnotation
PdfDocument

Constructor & Destructor Documentation

PoDoFo::PdfDestination::PdfDestination ( PdfVecObjects *  pParent)

Create an empty destination - points to nowhere

PoDoFo::PdfDestination::PdfDestination ( PdfObject *  pObject,
PdfDocument *  pDocument 
)

Create a new PdfDestination from an existing PdfObject (such as loaded from a doc)

Parameters:
pObjectthe object to construct from
pDocumenta PDF document owning this destination, needed to resolve pages
PoDoFo::PdfDestination::PdfDestination ( PdfObject *  pObject,
PdfVecObjects *  pVecObjects 
)

Create a new PdfDestination from an existing PdfObject (such as loaded from a doc)

Parameters:
pObjectthe object to construct from
pVecObjectsa PdfVecObjects owning this destination, needed to resolve pages
PoDoFo::PdfDestination::PdfDestination ( const PdfPage *  pPage,
EPdfDestinationFit  eFit = ePdfDestinationFit_Fit 
)

Create a new PdfDestination with a page as destination

Parameters:
pPagea page which is the destination
eFitfit mode for the page. Must be ePdfDestinationFit_Fit or ePdfDestinationFit_FitB
PoDoFo::PdfDestination::PdfDestination ( const PdfPage *  pPage,
const PdfRect &  rRect 
)

Create a destination to a page with its contents magnified to fit into the given rectangle

Parameters:
pPagea page which is the destination
rRectmagnify the page so that the contents of the rectangle are visible
PoDoFo::PdfDestination::PdfDestination ( const PdfPage *  pPage,
double  dLeft,
double  dTop,
double  dZoom 
)

Create a new destination to a page with specified left and top coordinates and a zoom factor.

Parameters:
pPagea page which is the destination
dLeftleft coordinate
dToptop coordinate
dZoomzoom factor in the viewer
PoDoFo::PdfDestination::PdfDestination ( const PdfPage *  pPage,
EPdfDestinationFit  eFit,
double  dValue 
)

Create a new destination to a page.

Parameters:
pPagea page which is the destination
eFitfit mode for the Page. Allowed values are ePdfDestinationFit_FitH, ePdfDestinationFit_FitV, ePdfDestinationFit_FitBH, ePdfDestinationFit_FitBV
dValuevalue which is a required argument for the selected fit mode
PoDoFo::PdfDestination::PdfDestination ( const PdfDestination &  rhs)

Copy an existing PdfDestination

Parameters:
rhscopy this PdfDestination

Member Function Documentation

void PoDoFo::PdfDestination::AddToDictionary ( PdfDictionary &  dictionary) const

Adds this destination to an dictionary. This method handles the all the complexities of making sure it's added correctly

If this destination is empty. Nothing will be added.

Parameters:
dictionarythe destination will be added to this dictionary
PdfArray & PoDoFo::PdfDestination::GetArray ( ) [inline]

Get access to the internal array

Returns:
the internal PdfArray
const PdfArray & PoDoFo::PdfDestination::GetArray ( ) const [inline]

Get access to the internal array This is an overloaded member function.

Returns:
the internal PdfArray
double PoDoFo::PdfDestination::GetDValue ( ) const [inline]

Get the destination Value Destination must be of type FitH, FitV or FitBH, otherwise exception is thrown

Returns:
the destination Value
double PoDoFo::PdfDestination::GetLeft ( ) const [inline]

Get the destination Left position Destination must be of type XYZ, FitV or FitR otherwise exception is thrown.

Returns:
the Left position
const PdfObject * PoDoFo::PdfDestination::GetObject ( ) const [inline]

Get access to the internal object This is an overloaded member function.

Returns:
the internal PdfObject
PdfObject * PoDoFo::PdfDestination::GetObject ( ) [inline]

Get access to the internal object

Returns:
the internal PdfObject
PdfPage * PoDoFo::PdfDestination::GetPage ( PdfDocument *  pDoc)

Get the page that this destination points to Requires that this PdfDestination was somehow created by or from a PdfDocument. Won't work otherwise.

Parameters:
pDoca PDF document owning this destination, needed to resolve pages
Returns:
the referenced PdfPage
PdfPage * PoDoFo::PdfDestination::GetPage ( PdfVecObjects *  pVecObjects)

Get the page that this destination points to Requires that this PdfDestination was somehow created by or from a PdfDocument. Won't work otherwise.

Parameters:
pVecObjectsa PdfVecObjects owning this destination, needed to resolve pages
Returns:
the referenced PdfPage
PdfRect PoDoFo::PdfDestination::GetRect ( ) const [inline]

Get the destination rect Destination must be of type FirR otherwise exception is thrown

Returns:
the destination rect
double PoDoFo::PdfDestination::GetTop ( ) const [inline]

Get the destination Top position Destination must be of type XYZ, FitH, FitR, FitBH otherwise exception is thrown.

Returns:
the Top position
EPdfDestinationType PoDoFo::PdfDestination::GetType ( ) const [inline]

Get the destination fit type

Returns:
the fit type
double PoDoFo::PdfDestination::GetZoom ( ) const [inline]

Get the destination zoom Destination must be of type XYZ otherwise exception is thrown.

Returns:
the zoom
const PdfDestination & PoDoFo::PdfDestination::operator= ( const PdfDestination &  rhs)

Copy an existing PdfDestination

Parameters:
rhscopy this PdfDestination
Returns:
this object