status = doc:SetInfoAttr(type, value)
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:
#HPDF_INFO_CREATOR:
#HPDF_INFO_TITLE:
#HPDF_INFO_SUBJECT:
#HPDF_INFO_KEYWORDS:
When doc:SetInfoAttr()
succeeds, it returns #HPDF_OK
. Otherwise, it returns an error code and the error handler is called.
#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.