• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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
 
Are you here to take over the surface world? Because this tiny ad will stop you!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic