Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

PDF::API2::NamedDestination

Name PDF::API2::NamedDestination
Version 2.043
Located at /usr/local/share/perl5
File /usr/local/share/perl5/PDF/API2/NamedDestination.pm
Is Core No
Search CPAN for this module PDF::API2::NamedDestination
Documentation PDF::API2::NamedDestination
Module Details PDF::API2::NamedDestination

NAME

PDF::API2::NamedDestination - Add named destinations (views) to a PDF


METHODS

new

    $destination = PDF::API2::NamedDestination->new($pdf, ...);

Creates a new named destination object. If any additional arguments are present, they will be passed to destination().

destination

    $destination = $destination->destination($page, $location, @args);

A destination 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::API2::NamedDestination->new($pdf);
    $dest->destination($pdf->open_page(1), 'xyz' => ($x, $y, $zoom));
    # The Fit location doesn't require any arguments
    my $dest2 = PDF::API2::NamedDestination->new($pdf);
    $dest->destination($pdf->open_page(2), 'fit');

The following locations are available:

goto

    $destination = $destination->goto($page, $location, @args);

A go-to action changes the view to a specified destination (page, location, and magnification factor).

Parameters are as described in destination.

uri

    $destination = $destination->uri($uri);

A URI action indicates that a URI -- typically a web page -- should be launched.

launch

    $destination = $destination->launch($file);

A launch action runs an application or opens or prints a document.

$file contains the path to the application to be launched or the document to be opened or printed.

pdf

    $destination = $destination->pdf($file, $page_number, $location, @args);

Similar to goto, but the destination is in a different PDF file located at $file. $page_number is an integer rather than a page object, and the other parameters are as described in destination.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024