Outline¶
The document outline (otherwise known as “bookmarks”) is a property of Document (see Document.outline). If not None, it stands for the first outline item of the document. Its properties in turn define the characteristics of this item and also point to other outline items in “horizontal” or downward direction. The full tree of all outline items for e.g. a conventional table of contents (TOC) can be recovered by following these “pointers”.
Method / Attribute |
Short Description |
|---|---|
next item downwards |
|
next item same level |
|
page number (0-based) |
|
title |
|
string further specifying outline target |
|
target outside document |
|
whether sub-outlines are open or collapsed |
|
points to destination details object |
Class API
- class Outline¶
- down¶
The next outline item on the next level down. Is
Noneif the item has no children.- Type:
- next¶
The next outline item at the same level as this item. Is
Noneif this is the last one in its level.- Type:
- page¶
The page number (0-based) this bookmark points to.
- Type:
int
- title¶
The item’s title as a string or
None.- Type:
str
- is_open¶
Indicator showing whether any sub-outlines should be expanded (
True) or be collapsed (False). This information is interpreted by PDF reader software.- Type:
bool
- is_external¶
A bool specifying whether the target is outside (
True) of the current document.- Type:
bool
- uri¶
A string specifying the link target. The meaning of this property should be evaluated in conjunction with property
is_external:is_externalis true:uripoints to some target outside the current PDF, which may be an internet resource (uristarts withhttp://or similar), another file (uristarts withfile:orfile://) or some other service like an e-mail address (uristarts withmailto:).is_externalis false:uriwill beNoneor point to an internal location. In case of PDF documents, this should either be #nnnn to indicate a 1-based (!) page number nnnn, or a named location. The format varies for other document types, for example “../FixedDoc.fdoc#PG_2_LNK_1” for page number 2 (1-based) in an XPS document.
- Type:
str
