status = doc:SetCompressionMode(mode)
doc:SetCompressionMode()
sets the mode of compression. mode
can be a combination
of the following flags:
#HPDF_COMP_NONE:
#HPDF_COMP_TEXT:
#HPDF_COMP_IMAGE:
#HPDF_COMP_METADATA:
#HPDF_COMP_ALL:
#HPDF_COMP_TEXT
, #HPDF_COMP_IMAGE
,
and #HPDF_COMP_METADATA
together.
When doc:SetCompressionMode()
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_INVALID_COMPRESSION_MODE
- An invalid compression mode was specified.
#HPDF_FAILED_TO_ALLOC_MEM
- Memory allocation failed.