This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The iText tutorial has a couple of examples about encryption, and in general this works without problems.
Can you work with that file in other ways, e.g. add a watermark, so that it's clear that iText can handle the file in general?
Joined: Nov 10, 2005
Hi Ulf, I tried it with other PDF files and they run fine. The exception is caused by not adding "%%EOF" to the trailer, which I don't know how to do it. anyway thanks, I switched to use SecurSign to encrypt my PDFs instead. Can you possibly take a look what is wrong with my code in another thread?