Haru Free PDF Library
Outlines

Functions

HPDF_Outline HPDF_CreateOutline (HPDF_Doc pdf, HPDF_Outline parent, const char *title, HPDF_Encoder encoder)
 Create new outline object. More...
 
HPDF_STATUS HPDF_Outline_SetOpened (HPDF_Outline outline, HPDF_BOOL opened)
 Set whether this outline node is opened when the outline is displayed for the first time. More...
 
HPDF_STATUS HPDF_Outline_SetDestination (HPDF_Outline outline, HPDF_Destination dst)
 Set target destination object to jump to when outline object is clicked. More...
 

Detailed Description

Function Documentation

◆ HPDF_CreateOutline()

HPDF_Outline HPDF_CreateOutline ( HPDF_Doc  pdf,
HPDF_Outline  parent,
const char *  title,
HPDF_Encoder  encoder 
)

Create new outline object.

Parameters
pdfDocument object handle.
parentOutline object handle which comes to the parent of the created outline object. If NULL, the outline is created as a root outline.
titleCaption of the outline object.
encoderEncoding object handle applied to the title. If NULL, PDFDocEncoding is used.
Returns
Created outline object handle on success, otherwise, it returns NULL and calls error handler.
Error codes
Examples
character_map.c, encoding_list.c, jpfont_demo.c, outline_demo.c, and page_sizes_demo.c.

◆ HPDF_Outline_SetDestination()

HPDF_STATUS HPDF_Outline_SetDestination ( HPDF_Outline  outline,
HPDF_Destination  dst 
)

Set target destination object to jump to when outline object is clicked.

Parameters
outlineOutline object handle.
dstDestination object handle
Returns
HPDF_OK on success, otherwise returns error code and calls error handler.
Error codes
Examples
character_map.c, encoding_list.c, jpfont_demo.c, outline_demo.c, outline_demo_jp.c, and page_sizes_demo.c.

◆ HPDF_Outline_SetOpened()

HPDF_STATUS HPDF_Outline_SetOpened ( HPDF_Outline  outline,
HPDF_BOOL  opened 
)

Set whether this outline node is opened when the outline is displayed for the first time.

Parameters
outlineOutline object handle.
openedSpecify whether outline node is opened or not.
Returns
HPDF_OK on success, otherwise returns error code and calls error handler.
Error codes
Examples
character_map.c, encoding_list.c, jpfont_demo.c, outline_demo.c, outline_demo_jp.c, and page_sizes_demo.c.