File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes problem reading pdf with iText Library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "problem reading pdf with iText Library" Watch "problem reading pdf with iText Library" New topic
Author

problem reading pdf with iText Library

Nicolas Stern
Ranch Hand

Joined: Apr 26, 2002
Posts: 57
Hello,

I have the follwing problem using iText.

I�m getting a byte array that is generated using a pdf generator library.

When I try to instanciate a PdfReader from this byte array, � java.io.IOException: Encrypted files are not supported � is thrown

When the same byte[] is viewed in Adobe Acrobat Reader (after having been sent to the browser with the according MIME type) and then saved physically, the file can be opened as argument to instanciate the pdfReader.

Looks like my byte array is recognized as an encrypted pdf.

The byte array is generated from a separate library from HTML.

What I don't get is why iText can open the file that has been created from the Byte array, but not the byte array itself.

Any hint ?

Thanks in advance
Nicolas Stern
Ranch Hand

Joined: Apr 26, 2002
Posts: 57
Problem solved.

I did not realize that the pdf generation process explicitely encrypted the file. All we had to do was to proceed to encryption later in the process.

Cheers - Nic
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem reading pdf with iText Library