status = doc:SetCurrentEncoder(encodingname)
doc:SetCurrentEncoder() sets the current encoder for the document.
See Encodings for a list of valid encoding names.
When doc:SetCurrentEncoder() succeeds, it returns #HPDF_OK. Otherwise, it returns an error code and the error handler is invoked.
#HPDF_INVALID_DOCUMENT - An invalid document handle was set.
#HPDF_FAILED_TO_ALLOC_MEM - Memory allocation failed.
#HPDF_INVALID_ENCODING_NAME - An invalid encoding name was set.