This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Insufficient data for an image error when opening a PDF generated by iText

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am doing JPG to PDF conversion for this i am using iText, for some JPG images its working perfectly but for few JPG images the code is executing with out any errors but while opening the generated PDF, i am getting the error as "Insufficient data for an image" and the page is blank.
Utility i am developing should be converting 100's of JPG to PDF per day, so it will be problem for checking all the generated PDF's for the errored once, so need to have a fool proof conversion to be happened.

The problem is not with the resolution as the utility has converted many images which has larger resolution than this.

If i open the same JPG in paint and do save as to a new file and give that file to the code then its converting to PDF with out any problem.

Is it problem related to the JPG file and do this can be handled at code level

 
venkata vinay bysani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can any one please look into this and let me know your thoughts on why this is happening like this
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!