Comprehensive Guide for Developers: Features, Integration, and API Reference
Represents a destination in a PDF document. More...
#include <pdfsdk/cxx/dest.h>
Public Member Functions | |
| Object | GetPdfObject () const |
| Gets the PDF object associated with a destination. | |
| PDDestType | GetDestType () const |
| Gets the type of the destination. | |
| size_t | GetPageIndex () const |
| Gets the page index associated with the destination. | |
| std::vector< float > | GetParams () const |
| Gets the parameters associated with the destination. | |
| Dest (PDDest handle, bool adopt=false) noexcept | |
| Dest (const Dest &rhs) noexcept | |
| Dest & | operator= (const Dest &rhs) noexcept |
| Dest (Dest &&rhs) noexcept | |
| Dest & | operator= (Dest &&rhs) noexcept |
Static Public Member Functions | |
| static Dest | CreateFromPdfObject (const Object &object) |
| Returns a destination associated with a PDF object. | |
Represents a destination in a PDF document.
A destination consists of a page, what part of the page is displayed and how much it is magnified. Destinations work together with Actions, Annotations and Document outlines to take the viewer of a document to a specific location. The Dest class provides methods to retrieve information about a destination, such as its type, associated PDF object, page index, and parameters. Not all PDF objects contain a destination, but for the ones that do, it can be returned as well. A destination is of the form /Dest [3 0 R /XYZ 0 792 0], where 3 - object number, 0 - object's generation number, R - reference (indirect reference to another object), /XYZ - destination type, 0, 792 - page coordinates, 0 - magnification factor (zoom).
ISO 32000-2:2020 - 12.3.2 Destinations
Returns a destination associated with a PDF object.
| object | The PDF object to retrieve the destination for. |
| PDDestType PDF::Dest::GetDestType | ( | ) | const |
Gets the type of the destination.
The type of a destination refers to the way the destination is specified. There are 9 different types of destinations, including one of the Unknown type. @see PDDestType
| size_t PDF::Dest::GetPageIndex | ( | ) | const |
Gets the page index associated with the destination.
A page index indicates the position of page objects in the page tree. Similar array indexing, the first page of a document has index 0.
| std::vector< float > PDF::Dest::GetParams | ( | ) | const |
Gets the parameters associated with the destination.
Destination parameters follow the destination type and specify coordinates and/or magnification (zoom) factor. For the destination of type kPDDestXYZ i.e. [page /XYZ left top zoom], the parameters are the coordinates left, top and zoom.
| Object PDF::Dest::GetPdfObject | ( | ) | const |
Gets the PDF object associated with a destination.