class HexaPDF::Document::Destinations::Destination

Parent

Wraps an explicit destination array to allow easy access to query its properties.

A *destination array* has the form

[page, type, *arguments]

where page is either a page object or a page number (in case of a destination to a page in a remote PDF document), type is the destination type (see below) and arguments are the required arguments for the specific type of destination.

Destination Types

There are eight different types of destinations, each taking different arguments. The arguments are marked up in the list below and are in the correct order for use in the destination array. The first name in the list is the PDF internal name, the second one the explicit, more descriptive one used by HexaPDF:

:XYZ, :xyz

Display the page with the given (left, top) coordinate at the upper-left corner of the window and the specified magnification (zoom) factor. A nil value for any argument means not changing it from the current value.

:Fit, :fit_page

Display the page so that it fits horizontally and vertically within the window.

:FitH, :fit_page_horizontal

Display the page so that it fits horizontally within the window, with the given top coordinate being at the top of the window. A nil value for top means not changing it from the current value.

:FitV, :fit_page_vertical

Display the page so that it fits vertically within the window, with the given left coordinate being at the left of the window. A nil value for left means not changing it from the current value.

:FitR, :fit_rectangle

Display the page so that the rectangle specified by (left, bottom)-(right, top) fits horizontally and vertically within the window.

:FitB, :fit_bounding_box

Display the page so that its bounding box fits horizontally and vertically within the window.

:FitBH, :fit_bounding_box_horizontal

Display the page so that its bounding box fits horizontally within the window, with the given top coordinate being at the top of the window. A nil value for top means not changing it from the current value.

:FitBV, :fit_bounding_box_vertical

Display the page so that its bounding box fits vertically within the window, with the given left coordinate being at the left of the window. A nil value for left means not changing it from the current value.