Please enable JavaScript to view this site.

PDFX Reference

Navigation: GDI Print Directives > Bookmarks

Explicit Bookmark Template Definition

Scroll Prev Top Next More

An Explicit Bookmark is one that you embed explicitly in the document using the //PDFX,Bookmarks.Insert directive. Before you can do that, you must define a template. Although you can do that manually in the driver properties dialog, it is generally much easier and more practical to insert the template definition into the document directly. The template definition for an Explicit Bookmark simply defines how the bookmark will appear in the bookmark pane of the viewer (color and attributes), and assigns an ID to the template so it can be referenced when inserting individual (explicit) bookmark locations.

//PDFX,Bookmarks.DefineTemplate,ID,parentID{,dspColor,dspAttributes}

Parameters

Symbol

Values

Description

ID

Numeric,1 to 127

Identifies the bookmark template. You must supply the same ID value when inserting the individual bookmarks. It is also used to identify the parent bookmark template when defining child-level bookmarks.

parentID

 

Used to specify the parent when defining a lower-level bookmark. For top-level bookmarks, set it to 0.

dspColor

 

Optionally defines the display color of the bookmark (in the bookmark pane of the viewer). Use the format &hBBGGRR where BB, GG, and RR are the blue, green and red RGB values in hex (each ranging from 00 to FF). For example, &h800000 would define a medium blue color. Default is black (0 or &h000000)

dspAttributes

Optionally defines display attributes of the bookmark (in the bookmark pane of the viewer), by combining zero or more of the following values. Default is 0, i.e. normal.

&h0001

When this bit is set, the bookmark item will be drawn using a bold font.

&h0002

When this bit is set, the bookmark item will be drawn using an italic font.

&h0004

When this bit is set, the bookmark item will be initially opened in the bookmark tree window of the viewing application. This flag is used only when the property Bookmarks.DisplayMode has a value ByItem.

 

Comments

See Explicit Bookmark Insert to insert the individual bookmarks

Examples

//;Define template 1, top level, display in medium red bold

//PDFX,Bookmarks.DefineTemplate,1,0,&h0000a0,1

//;Define template 2, second level (below template 1), display in default black

//PDFX,Bookmarks.DefineTemplate,2,1

 

Compatibility

Requires PDFXv5+.