PDF-Encryption

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
softwaretechnik
Posts: 3
Joined: Fri Oct 07 2005

PDF-Encryption

Post by softwaretechnik »

We just bought a Developer Version of the Amyuni PDF-Converter 2.5 Profressional.
Creating a PDF from within our app works fine until we try to encrypt the document.

We try to encrypt the document after creating the PDF-File with following code:
bRet = m_pEncryptPDFDocument128(m_sOutPutFile, m_sOwnerPWD, m_sUserPWD, -64+4);

this code calls your function:
BOOL WINAPI EncryptPDFDocument( LPCSTR FileName, LPCSTR Owner, LPCSTR User, DWORD Permissions );

After calling the function I get the MessageBox from Amyuni PDF Converter:
This is a demo. Password used to crypt file are:
'aaaaaa' for owner password
'bbbbbb' for owner password

Does this mean I can't encrypt a PDF with a developer version or
can anybody tell me what I'm doing wrong.

Thanks for any help.
softwaretechnik
Posts: 3
Joined: Fri Oct 07 2005

another posting in the forum solved my problem

Post by softwaretechnik »

I found another post which described the way of using encryption of an already created PDF-Doc.

In my problem I didn't call SetLicenseKey before the encryption-function as I thought the Key sent by EnablePrinter is enough because im calling the encryption before DisablePrinter.

But this seems to bo wrong. so now I'm calling SetLicenseKey just before Encrypt.....() and everthings works fine.
Post Reply