PDF::Builder::Outline(3) | User Contributed Perl Documentation | PDF::Builder::Outline(3) |
NAME
PDF::Builder::Outline - Manage PDF outlines (a.k.a. bookmarks)
SYNOPSIS
# Get/create the top-level outline tree my $outlines = $pdf->outline(); # Add an entry my $item = $outlines->outline(); $item->title('First Page'); $item->dest($pdf->open_page(1), fit-def);
METHODS
new
$outline = PDF::Builder::Outline->new($api, $parent, $prev)
Examine the Outline Tree
has_children
$boolean = $outline->has_children()
count
$integer = $outline->count()
first
$child = $outline->first()
last
$child = $outline->last()
parent
$parent = $outline->parent()
prev
$sibling = $outline->prev()
next
$sibling = $outline->next()
Modify the Outline Tree
outline
$child_outline = $parent_outline->outline()
insert_after
$sibling = $outline->insert_after()
insert_before
$sibling = $outline->insert_before()
delete
$outline->delete()
is_open
$boolean = $outline->is_open() # Get $outline = $outline->is_open($boolean) # Set
open
$outline->open()
This is an alternate method to using is_open(true).
closed
$outline->closed()
This is an alternate method to using is_open(false).
Set Outline Attributes
title
$title = $outline->title() # Get $outline = $outline->title($text) # Set
dest
$outline->dest($page_object, %position) $outline->dest($page_object)
%position can be any of those listed in "Page Fit Options" in PDF::Builder::Docs.
"xyz" is the default fit setting, with position (left and top) and zoom the same as the calling page's.
$outline->dest($name, %position) $outline->dest($name)
Connect the Outline to a "Named Destination" defined elsewhere, and optional positioning as described above.
Destination targets
uri, url
$outline->uri($url)
Alternate name: "url"
Either "uri" or "url" may be used; "uri" is for compatibility with PDF::API2.
launch, file
$outline->launch($file)
Alternate name: "file"
Either "launch" or "file" may be used; "launch" is for compatibility with PDF::API2.
pdf, pdf_file, pdfile
$outline->pdf($pdffile, $page_number, %position, %args) $outline->pdf($pdffile, $page_number)
Alternate names: "pdf_file" and "pdfile"
Either "pdf" or "pdf_file" (or the older "pdfile") may be used; "pdf" is for compatibility with PDF::API2.
2023-12-21 | perl v5.38.1 |