Name
csurface:AddOutline -- add outline
Synopsis
id = csurface:AddOutline(parent_id, name$, link$, flags)
Function
For PDF surfaces, this adds an item to the document outline hierarchy with the name name$ that links to the location specified by link$. Link attributes have the same keys and values as the link tag, excluding the rect attribute. The item will be a child of the item with id parent_id. Use #CAIRO_PDF_OUTLINE_ROOT as the parent id of top level items. The flags parameter can be set to a combination of the following flags:

#CAIRO_PDF_OUTLINE_FLAG_OPEN
The outline item defaults to open in the PDF viewer.
#CAIRO_PDF_OUTLINE_FLAG_BOLD
The outline item is displayed by the viewer in bold text.
#CAIRO_PDF_OUTLINE_FLAG_ITALIC
The outline item is displayed by the viewer in italic text.

This function returns the id for the added item.

Inputs
parent_id
the id of the parent item or #CAIRO_PDF_OUTLINE_ROOT if this is a top level item
name$
the name of the outline
link$
the link attributes specifying where this outline links to
flags
outline item flags (see above)
Results
id
id for the added item

Show TOC