Unicode Passwords


Are Unicode passwords supported? I am moving the Unicode strings
directly into the character buffer and it does not work. I am
guessing that leading nul for each character are not interpreted
correctly. Can you shed some light on this issue for me?

A: Using PDFNet SDK you can use arbitrary data buffer (including raw
Unicode strings) as a password.

Acrobat GUI assumes that passwords text is always encoded using
PDFDocEncoding (Appendix D in PDF reference). To maintain
compatibility with Acrobat, it is a good idea to convert passwords to
PDFDocEncoding before securing PDF documents.

You can convert to PDFDocEncoding using the table from Appendix D in
PDFReference. PDFNet SDK also offers a utility method
pdftron::UString::ConvertToPDFText() that can be used to convert
Unicode strings to 'PDF Text' (i.e. PDFDocEncoding or Unicode PDF