Question

PNG/GIF transparency in Adobe Geospatial PDF

  • 15 November 2016
  • 2 replies
  • 1 view

Hello,

I am using a Adobe Geospatial PDF writer (pdf2d) with a PDFPageFormatter to place a map and some other items into a PDF where map layers can be turned on and off.

When reading it PNGs or GIFs with transparency, and placing them into the PDF using the PDFPageFormatter, the transparency doesn't seem to be preserved (for PNGs, the transparent part goes white - for GIFs, it goes black).

Is there a way to change the PNG/GIF feature's attributes in some way to allow the transparency to work for an image placed on top of a map in an Adobe Geospatial PDF?


2 replies

Userlevel 5
Badge +25

I've done a bit of research and it looks like this is a known issue in PDF.

Any chance you can turn those elements into vector? The RasterCellCoercer can create polygons of your pixels, and retain the RGBA values in a list so you can re-colorize them.

Userlevel 5
Badge +25

I've done a bit of research and it looks like this is a known issue in PDF.

Any chance you can turn those elements into vector? The RasterCellCoercer can create polygons of your pixels, and retain the RGBA values in a list so you can re-colorize them.

Although the funny thing is that if I place a transparent PNG on top of other stuff in Adobe Illustrator and save it as a PDF from there it does work...

 

 

Reply