Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.
— George W. Bush, Aug. 5, 2004
PDF::Builder::NamedDestination - Add named destinations (views) to a PDF
Inherits from PDF::Builder::Basic::PDF::Dict
$dest = PDF::Builder::NamedDestination->new($pdf, ...)
Creates a new named destination object. Any optional additional arguments will be passed on to destination
.
$dest->dest($page, %opts)
A destination (dest) is a particular view of a PDF, consisting of a page object, the location of the window on that page, and possible coordinate and zoom arguments.
# The XYZ location takes three arguments
my $dest1 = PDF::Builder::NamedDestination->new($pdf);
$dest->dest($pdf->open_page(1), 'xyz' => [$x, $y, $zoom]);
# The Fit location doesn't require any arguments, but one is still
# needed for the hash array
my $dest2 = PDF::Builder::NamedDestination->new($pdf);
$dest->dest($pdf->open_page(2), 'fit' => 1);
See "Page Fit Options" in PDF::Builder::Docs for a listing of the available locations and their syntax.
"xyz" is the default fit setting, with position (left and top) and zoom the same as the calling page's.
$dest->link($page, %opts)
A go-to (link) action changes the view to a specified destination (page, location, and magnification factor).
Parameters are as described in dest
.
Alternate name: goto
Originally this method waslink
, but recently PDF::API2 changed the name togoto
. "goto" is added for compatibility.
$dest->uri($url)
Defines the destination as launch-url with uri $url
.
Alternate name: url
Originally this method wasurl
, but recently PDF::API2 changed the name touri
. "url" is retained for compatibility.
$dest->launch($file)
Defines the destination as launch-file with filepath $file
and page-fit options %opts. The target application is run. Note that this is not a PDF or a browser file -- it is a local application.
Alternate name: file
Originally this method wasfile
, but recently PDF::API2 changed the name tolaunch
. "file" is retained for compatibility.
$dest->pdf($pdf_file, $pagenum, %opts)
Defines the destination as a PDF-file with filepath$pdf_file
, on page$pagenum
, and options %opts (same as dest()).
Alternate names:pdf_file
andpdfile
Originally this method waspdfile
, and had been earlier renamed topdf_file
, but recently PDF::API2 changed the name to
Master Index
PDF::Builder -- Facilitates the creation and modification of PDF files
PDF::Builder::Annotation -- Add annotations to a PDF
PDF::Builder::Basic::PDF -- Various utilities and support routines
PDF::Builder::Content -- Methods for adding graphics and text to a PDF
PDF::Builder::Docs -- Additional documentation for Builder module
PDF::Builder::FontManager -- Managing the font library for PDF::Builder
PDF::Builder::Lite -- Lightweight PDF creation methods
PDF::Builder::Matrix -- Matrix operations library
PDF::Builder::Outline -- Manage PDF outlines (a.k.a. bookmarks)
PDF::Builder::Outlines -- Further Outline handling
PDF::Builder::Page -- Methods to interact with individual pages
PDF::Builder::Resource -- Base class for PDF resources
PDF::Builder::UniWrap -- Support routines for finding line breakpoints with Unicode text
PDF::Builder::Util -- Utility package for often-used methods across the package
PDF::Builder::ViewerPreferences -- How the PDF should be displayed or printed
All content © copyright 2005 – 2025
by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this
site remains under the copyright and license of its owners.
Catskill Technology Services, LLC does not claim copyright over such software.
This page is https://www.catskilltech.com/Documentation/PDF/Builder/NamedDestination.html
Search Quotations database.
Last updated Sat, 09 Dec 2023 at 10:59 PM