> We have functions to initialize a pdf_text_t object from an ASCII > string but I dont know if we can set an arbitrary ("binary") string as > the value of a pdf_text_t. It is interesting since we may want to > store encrypted strings in pdf_text_t when generating pdf content. On > the other hand it is not critical since we for sure will be able to > tell the writer module to use raw strings. Aleks wi
No, we cannot set (with the present API) an arbitrary "binary" string as the value of the pdf_text_t. That would involve changing the API, which of course could be done. Internally, the pdf_text_t stores the text encoded in UTF-32HE (host-endian). If we really need to encrypt/decrypt whatever data we want, I guess that it shouldn't be stored in a pdf_text_t. It is in fact something completely independent to the final purpose of the text module, I think. I agree. The encryption of the strings will be done in writing time (the writer module in the object layer) and the output will be written into some stream, but not stored in a pdf_text variable.