Name
doc:SetInfoAttr -- set text of info dictionary attribute
Synopsis
status = doc:SetInfoAttr(type, value)
Function
doc:SetInfoAttr() sets the text of an info dictionary attribute, using the current encoding of the document. The type parameter can be one of the following constants:

#HPDF_INFO_AUTHOR:
Document's author
#HPDF_INFO_CREATOR:
Document's creator
#HPDF_INFO_TITLE:
Document's title
#HPDF_INFO_SUBJECT:
Document's subject
#HPDF_INFO_KEYWORDS:
Keywords describing the document

When doc:SetInfoAttr() succeeds, it returns #HPDF_OK. Otherwise, it returns an error code and the error handler is called.

Inputs
type
one of the constants listed above
value
text to use for setting the attribute
Results
status
status code
Errors
#HPDF_INVALID_DOCUMENT - An invalid document handle was set.

#HPDF_FAILED_TO_ALLOC_MEM - Memory allocation failed.

#HPDF_INVALID_PARAMETER - An invalid type parameter was set.


Show TOC