Haru Free PDF Library
Document properties

Functions

HPDF_STATUS HPDF_SetInfoAttr (HPDF_Doc pdf, HPDF_InfoType type, const char *value)
 Set the text of info dictionary attribute using current encoding of the document. If encoding is not set, PDFDocEncoding is used. More...
 
const char * HPDF_GetInfoAttr (HPDF_Doc pdf, HPDF_InfoType type)
 Get attribute value from info dictionary. More...
 
HPDF_STATUS HPDF_SetInfoDateAttr (HPDF_Doc pdf, HPDF_InfoType type, HPDF_Date value)
 Set datetime attribute at info dictionary. More...
 

Detailed Description

Routines for document attributes processing

Function Documentation

◆ HPDF_GetInfoAttr()

const char* HPDF_GetInfoAttr ( HPDF_Doc  pdf,
HPDF_InfoType  type 
)

Get attribute value from info dictionary.

Parameters
pdfDocument object handle.
typeOne of the following values:
Returns
String value from info dictionary. If the infomation has not been set or an error has occurred, it returns NULL.
Error codes
See also
HPDF_SetInfoAttr(), HPDF_SetInfoDateAttr()

◆ HPDF_SetInfoAttr()

HPDF_STATUS HPDF_SetInfoAttr ( HPDF_Doc  pdf,
HPDF_InfoType  type,
const char *  value 
)

Set the text of info dictionary attribute using current encoding of the document. If encoding is not set, PDFDocEncoding is used.

Todo:
Clarify what PDFDocEncoding is.
Parameters
pdfDocument object handle.
typeOne of the following values:
valueAttribute text to be set.
Returns
HPDF_OK on success, otherwise returns error code and calls error handler.
Error codes
See also
HPDF_GetInfoAttr(), HPDF_SetInfoDateAttr()

◆ HPDF_SetInfoDateAttr()

HPDF_STATUS HPDF_SetInfoDateAttr ( HPDF_Doc  pdf,
HPDF_InfoType  type,
HPDF_Date  value 
)

Set datetime attribute at info dictionary.

Parameters
pdfDocument object handle.
typeOne of the following attributes:
valueNew attribute value
Returns
HPDF_OK on success, otherwise returns error code and calls error handler.
Error codes
See also
HPDF_GetInfoAttr(), HPDF_SetInfoAttr(), _HPDF_Date