Name: print bookmark

Type: command

Syntax: print [ unicode ] bookmark <title> [ with level <level> ] [ at <location> ] [ initially ( open | closed )]

Summary: Creates a document outline in a PDF generated by the pdf printing commands.

Introduced: 4.6

OS: mac,windows,linux,ios

Platforms: desktop,web,mobile

Example:
print bookmark "Chapter 1"

Example:
print bookmark "Chapter 1.1" with level 2 at 100,150

Parameters:
title: The name of the bookmark.
level: The depth at which the entry should be placed.
location: A point describing where on the current page the bookmark should refer.

Description:
Use the <print bookmark> command to create a document outline in a PDF generated by the pdf printing commands.

The <print bookmark> command allows the creation of a document outline in PDFs generated by the pdf printing commands. Individual entries in the document outline are referred to as 'bookmarks'.

If the unicode adjective is specified, then title is interpreted as a UTF-16 encoded string, otherwise it is interpreted as the native (single-byte) text encoding.

If <level> is not present, then the entry is inserted at the level of the previously inserted item, defaulting to the top-most level if no previous entries have been made.

If <location> is not present, the top-left of the current page is taken as the location.

If an initially clause is present it determines the default 'open' state of the bookmark item. Bookmarks are open by default.

References: print link (command), print anchor (command), open printing to pdf (command), cancel printing (command)

Tags: printing
