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::Outline

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

NAME

PDF::API2::Outline - Manage PDF outlines (a.k.a. bookmarks)


SYNOPSIS

    # Get/create the top-level outline tree
    my $outline = $pdf->outline();
    # Add an entry
    my $item = $outline->outline();
    $item->title('First Page');
    $item->destination($pdf->open_page(1));


METHODS

Examine the Outline Tree

has_children

    my $boolean = $outline->has_children();

Return true if the current outline item has child items.

count

    my $integer = $outline->count();

Return the number of descendants that are visible when the current outline item is open (expanded).

first

    my $child = $outline->first();

Return the first child of the current outline level, if one exists.

last

    my $child = $outline->last();

Return the last child of the current outline level, if one exists.

parent

    my $parent = $outline->parent();

Return the parent of the current item, if not at the top level of the outline tree.

prev

    my $sibling = $outline->prev();

Return the previous item of the current level of the outline tree.

next

    my $sibling = $outline->next();

Return the next item of the current level of the outline tree.

Modify the Outline Tree

outline

    my $child = $outline->outline();

Add an outline item at the end of the current outline's list of children.

insert_after

    my $sibling = $outline->insert_after();

Add an outline item immediately following the current item.

insert_before

    $sibling = $outline->insert_before();

Add an outline item immediately preceding the current item.

delete

    $outline->delete();

Remove the current outline item from the outline tree. If the item has any children, they will effectively be deleted as well since they will no longer be linked.

is_open

    # Get
    my $boolean = $outline->is_open();
    # Set
    my $outline = $outline->is_open($boolean);

Get/set whether the outline is expanded or collapsed.

Set Outline Attributes

title

    # Get
    my $title = $outline->title();
    # Set
    $outline = $outline->title($text);

Get/set the title of the outline item.

destination

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

Set the destination page and optional position of the outline. $location and @args are as defined in destination in the PDF::API2::NamedDestination manpage.

$destination can optionally be the name of a named destination defined elsewhere.

uri

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

Launch a URI -- typically a web page -- when the outline item is activated.

launch

    $outline->launch($file);

Launch an application or file when the outline item is activated.

pdf

    $outline = $outline->pdf($filename, $page_number, $location, @args);

Open another PDF file to a particular page number (first page is zero, which is also the default). The page can optionally be positioned at a particular location if $location and @args are set -- see destination in the PDF::API2::NamedDestination manpage for possible settings.

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