Scroll to navigation

PDF::Builder::Outline(3pm) User Contributed Perl Documentation PDF::Builder::Outline(3pm)

NAME

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

METHODS

$outline = PDF::Builder::Outline->new($api, $parent, $prev)
Returns a new outline object (called from $outlines->outline()).
$outline->title($text)
Set the title of the outline.
$outline->closed()
Set the status of the outline to closed (i.e., collapsed).
$outline->open()
Set the status of the outline to open (i.e., expanded).
$child_outline = $parent_outline->outline()
Returns a new sub-outline (nested outline).
$outline->dest($page_object, %position)
$outline->dest($page_object)
Sets the destination page and optional position of the outline.

%position can be any of the following:

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.
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.
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.
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.
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.
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.
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.
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.

This 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.
$outline->url($url)
Defines the outline as launch-url with url $url.
$outline->file($file)
Defines the outline as launch-file with filepath $file.
$outline->pdf_file($pdffile, $page_number, %position)
$outline->pdf_file($pdffile, $page_number)
Defines the destination of the outline as a PDF-file with filepath $pdffile, on page $pagenum (default 0), and position %position (same as dest()).
2021-03-28 perl v5.32.1