1 Reply Latest reply on Apr 17, 2012 11:12 AM by lrosenth

    Image rendering


      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? 

        • 1. Re: Image rendering
          lrosenth Adobe Employee

          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.