PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
PDF::Dest Class Reference

Represents a destination in a PDF document. More...

#include <pdfsdk/cxx/dest.h>

Inheritance diagram for PDF::Dest:

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
 
Destoperator= (const Dest &rhs) noexcept
 
 Dest (Dest &&rhs) noexcept
 
Destoperator= (Dest &&rhs) noexcept
 

Static Public Member Functions

static Dest CreateFromPdfObject (const Object &object)
 Returns a destination associated with a PDF object.
 

Detailed Description

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

Member Function Documentation

◆ CreateFromPdfObject()

static Dest PDF::Dest::CreateFromPdfObject ( const Object & object)
static

Returns a destination associated with a PDF object.

Parameters
objectThe PDF object to retrieve the destination for.
Returns
The destination associated with the object.

◆ GetDestType()

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
Returns
The type of the destination.

◆ GetPageIndex()

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.
Returns
The page index associated with the destination. Returns kPDPageIndexNull if the page index is not found.

◆ GetParams()

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.

Returns
The parameters associated with the destination.

◆ GetPdfObject()

Object PDF::Dest::GetPdfObject ( ) const

Gets the PDF object associated with a destination.

Returns
The PDF object associated with a destination.

The documentation for this class was generated from the following file: