PoDoFo
1.0.0-dev
|
A destination in a PDF file. More...
#include <PdfDestination.h>
Inherits PoDoFo::PdfArrayElement.
Public Member Functions | |
void | SetDestination (const PdfPage &page, PdfDestinationFit fit=PdfDestinationFit::Fit) |
Create a new PdfDestination with a page as destination. More... | |
void | SetDestination (const PdfPage &page, const Rect &rect) |
Create a destination to a page with its contents magnified to fit into the given rectangle. More... | |
void | SetDestination (const PdfPage &page, double left, double top, double zoom) |
Create a new destination to a page with specified left and top coordinates and a zoom factor. More... | |
void | SetDestination (const PdfPage &page, PdfDestinationFit fit, double value) |
Create a new destination to a page. More... | |
PdfPage * | GetPage () |
Get the page that this destination points to Requires that this PdfDestination was somehow created by or from a PdfDocument. More... | |
PdfDestinationType | GetType () const |
Get the destination fit type. More... | |
double | GetZoom () const |
Get the destination zoom Destination must be of type XYZ otherwise exception is thrown. More... | |
Rect | GetRect () const |
Get the destination rect Destination must be of type FirR otherwise exception is thrown. More... | |
double | GetTop () const |
Get the destination Top position Destination must be of type XYZ, FitH, FitR, FitBH otherwise exception is thrown. More... | |
double | GetLeft () const |
Get the destination Left position Destination must be of type XYZ, FitV or FitR otherwise exception is thrown. More... | |
double | GetDValue () const |
Get the destination Value Destination must be of type FitH, FitV or FitBH, otherwise exception is thrown. More... | |
Static Public Member Functions | |
static bool | TryCreateFromObject (PdfObject &obj, std::unique_ptr< PdfDestination > &dest) |
Friends | |
class | PdfDocument |
class | PdfAnnotationLink |
class | PdfOutlineItem |
class | PdfNameTreeBase |
A destination in a PDF file.
A destination can either be a page or an action.
double PdfDestination::GetDValue | ( | ) | const |
Get the destination Value Destination must be of type FitH, FitV or FitBH, otherwise exception is thrown.
double PdfDestination::GetLeft | ( | ) | const |
Get the destination Left position Destination must be of type XYZ, FitV or FitR otherwise exception is thrown.
PdfPage * PdfDestination::GetPage | ( | ) |
Get the page that this destination points to Requires that this PdfDestination was somehow created by or from a PdfDocument.
Won't work otherwise.
Rect PdfDestination::GetRect | ( | ) | const |
Get the destination rect Destination must be of type FirR otherwise exception is thrown.
double PdfDestination::GetTop | ( | ) | const |
Get the destination Top position Destination must be of type XYZ, FitH, FitR, FitBH otherwise exception is thrown.
PdfDestinationType PdfDestination::GetType | ( | ) | const |
Get the destination fit type.
double PdfDestination::GetZoom | ( | ) | const |
Get the destination zoom Destination must be of type XYZ otherwise exception is thrown.
Create a destination to a page with its contents magnified to fit into the given rectangle.
page | a page which is the destination |
rect | magnify the page so that the contents of the rectangle are visible |
void PdfDestination::SetDestination | ( | const PdfPage & | page, |
double | left, | ||
double | top, | ||
double | zoom | ||
) |
Create a new destination to a page with specified left and top coordinates and a zoom factor.
page | a page which is the destination |
left | left coordinate |
top | top coordinate |
zoom | zoom factor in the viewer |
void PdfDestination::SetDestination | ( | const PdfPage & | page, |
PdfDestinationFit | fit, | ||
double | value | ||
) |
Create a new destination to a page.
page | a page which is the destination |
fit | fit mode for the Page. Allowed values are PdfDestinationFit::FitH, PdfDestinationFit::FitV, PdfDestinationFit::FitBH, PdfDestinationFit::FitBV |
value | value which is a required argument for the selected fit mode |
void PdfDestination::SetDestination | ( | const PdfPage & | page, |
PdfDestinationFit | fit = PdfDestinationFit::Fit |
||
) |
Create a new PdfDestination with a page as destination.
page | a page which is the destination |
fit | fit mode for the page. Must be PdfDestinationFit::Fit or PdfDestinationFit::FitB |