The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

METHODS

$otl = PDF::Builder::Outline->new($api, $parent, $prev)

Returns a new outline object (called from $otls->outline()).

$otl->title($text)

Set the title of the outline.

$otl->closed()

Set the status of the outline to closed.

$otl->open()

Set the status of the outline to open.

$sotl=$otl->outline()

Returns a new sub-outline.

$otl->dest($pageobj, %opts)
$otl->dest($pageobj)

Sets the destination page of the outline.

$otl->dest($page, -fit => 1)

Display the page designated by $page, with its contents magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.

$otl->dest($page, -fith => $top)

Display the page designated by $page, with the vertical coordinate $top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window.

$otl->dest($page, -fitv => $left)

Display the page designated by $page, with the horizontal coordinate $left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window.

$otl->dest($page, -fitr => [$left, $bottom, $right, $top])

Display the page designated by $page, with its contents magnified just enough to fit the rectangle specified by the coordinates $left, $bottom, $right, and $top entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the window in the other dimension.

$otl->dest($page, -fitb => 1)

Display the page designated by $page, with its contents magnified just enough to fit its bounding box entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the bounding box within the window in the other dimension.

$otl->dest($page, -fitbh => $top)

Display the page designated by $page, with the vertical coordinate $top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of its bounding box within the window.

$otl->dest($page, -fitbv => $left)

Display the page designated by $page, with the horizontal coordinate $left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of its bounding box within the window.

$otl->dest($page, -xyz => [$left, $top, $zoom])

Display the page designated by $page, with the coordinates [$left, $top] positioned at the top-left corner of the window and the contents of the page magnified by the factor $zoom. A zero (0) value for any of the parameters $left, $top, or $zoom specifies that the current value of that parameter is to be retained unchanged.

$otl->dest($name)

(PDF 1.2) Connect the Outline to a "Named Destination" defined elsewhere.

$otl->url($url, %opts)
$otl->url($url)

Defines the outline as launch-url with url $url.

$otl->file($file, %opts)
$otl->file($file)

Defines the outline as launch-file with filepath $file.

$otl->pdfile($pdfile, $pagenum, %opts)
$otl->pdfile($pdfile, $pagenum)

Defines the destination of the outline as PDF-file with filepath $pdfile, $pagenum and options %opts (same as dest()).