• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem reading pdf with iText Library

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic