> By any > chance, is your compiler/source-code using UTF-16 instead of ASCII/ > UTF-8? I'm only wondering whether the constant is like wchar_t or char.
The Visual Studio 2019 setting is both (podofo-lib and main project) to Unicode. I never had problems with the generation of PDF’s with podofo. Drawing texts correctly… However, also i tried this: std::string pass(ownerPassword->GetCStringPtr(), ownerPassword->Textlen()); encrypt = PdfEncrypt::CreatePdfEncrypt(pass, pass, 0, PdfEncrypt::ePdfEncryptAlgorithm_AESV2, PdfEncrypt::ePdfKeyLength_128); It also does not accept the password. > Did you try the podofoencrypt tool, if you compile it? Yes, the same. Does not open the PDF. -- Grüße/Regards, [heubach-media] | Christian Sakowski christian.sakow...@heubach-media.de Tel: +49/(0)40/41 455 455 > Am 02.02.2022 um 15:21 schrieb zyx <z...@gmx.us>: > > On Wed, 2022-02-02 at 14:38 +0100, Christian Sakowski wrote: >> I cannot open the PDF with the password „user“! > > Hi, > neither I can open it, using evince. It rejects both passwords. By any > chance, is your compiler/source-code using UTF-16 instead of ASCII/ > UTF-8? I'm only wondering whether the constant is like wchar_t or char. > > Anyway, attached is my little test code, which does work. I attached > also one of the result PDF files. They do work properly here. > > Did you try the podofoencrypt tool, if you compile it? > > Bye, > zyx > > By the way, 500KB+ mail attachment is a very bad idea, especially on > the mailing lists. You should avoid that, in general. > <encrypt.cpp><aesv3.pdf>_______________________________________________ > Podofo-users mailing list > Podofo-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/podofo-users _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users