Skip navigation
bmcgin
Currently Being Moderated

Image rendering

Apr 17, 2012 8:07 AM

Is there a single approach to adding images into PDFs regardless of image type?  I am working with a pdf library which has limited image processing capabilities.  The code looks at the header of the image and if it’s a .jpg it goes down one set of code and if a .png a different approach is taken.

 

Is there a way to give the pdf the entire image and let it figure out how to render it (much like a browser)? 

 

Specifically I’m trying to embed an .png which has an Alpha Channel.  My pdf generator knows enough to stop processing because it’s not yet been coded.   

 

It is crazy to have to parse the image and do all sorts of manipulation based on the type of image and then furthermore processing for transparency and image layers.  The image header has all this infomation, so why can't the pdf read it and know what  to do?

 

Has Adobe provided such an api? 

 
Replies
  • Currently Being Moderated
    Apr 17, 2012 11:12 AM   in reply to bmcgin

    PDF supports two types of images – JPEG/JFIF and "raw bits".   Any other format (PNG, TIFF, etc.) needs to be converted.

     

    Yes, if you were to use Adobe's libraries for creating PDF, then you would have more capabilities.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points