#include <PdfDestination.h>
Inherits PoDoFo::PdfArrayElement.
A destination in a PDF file. A destination can either be a page or an action.
- See also
- PdfOutlineItem
-
PdfAnnotation
-
PdfDocument
◆ PdfDestination() [1/6]
PdfDestination::PdfDestination |
( |
PdfObject & |
obj | ) |
|
Create a new PdfDestination from an existing PdfObject (such as loaded from a doc)
- Parameters
-
obj | the object to construct from |
◆ PdfDestination() [2/6]
Create an empty destination - points to nowhere
◆ PdfDestination() [3/6]
PdfDestination::PdfDestination |
( |
const PdfPage & |
page, |
|
|
PdfDestinationFit |
fit = PdfDestinationFit::Fit |
|
) |
| |
Create a new PdfDestination with a page as destination
- Parameters
-
page | a page which is the destination |
fit | fit mode for the page. Must be PdfDestinationFit::Fit or PdfDestinationFit::FitB |
◆ PdfDestination() [4/6]
PdfDestination::PdfDestination |
( |
const PdfPage & |
page, |
|
|
const Rect & |
rect |
|
) |
| |
Create a destination to a page with its contents magnified to fit into the given rectangle
- Parameters
-
page | a page which is the destination |
rect | magnify the page so that the contents of the rectangle are visible |
◆ PdfDestination() [5/6]
PdfDestination::PdfDestination |
( |
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.
- Parameters
-
page | a page which is the destination |
left | left coordinate |
top | top coordinate |
zoom | zoom factor in the viewer |
◆ PdfDestination() [6/6]
PdfDestination::PdfDestination |
( |
const PdfPage & |
page, |
|
|
PdfDestinationFit |
fit, |
|
|
double |
value |
|
) |
| |
Create a new destination to a page.
- Parameters
-
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 |
◆ AddToDictionary()
void 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
-
dictionary | the destination will be added to this dictionary |
◆ GetDValue()
double PdfDestination::GetDValue |
( |
| ) |
const |
Get the destination Value Destination must be of type FitH, FitV or FitBH, otherwise exception is thrown
- Returns
- the destination Value
◆ GetLeft()
double PdfDestination::GetLeft |
( |
| ) |
const |
Get the destination Left position Destination must be of type XYZ, FitV or FitR otherwise exception is thrown.
- Returns
- the Left position
◆ GetPage()
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.
- Returns
- the referenced PdfPage
◆ GetRect()
Rect PdfDestination::GetRect |
( |
| ) |
const |
Get the destination rect Destination must be of type FirR otherwise exception is thrown
- Returns
- the destination rect
◆ GetTop()
double PdfDestination::GetTop |
( |
| ) |
const |
Get the destination Top position Destination must be of type XYZ, FitH, FitR, FitBH otherwise exception is thrown.
- Returns
- the Top position
◆ GetType()
Get the destination fit type
- Returns
- the fit type
◆ GetZoom()
double PdfDestination::GetZoom |
( |
| ) |
const |
Get the destination zoom Destination must be of type XYZ otherwise exception is thrown.
- Returns
- the zoom