Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flatten images with transparency in PDF

How to flatten images in PDF files with transparency?

convert PDF to PS (postscript)

pdftops input.pdf output.pdf.ps

If a PDF file contains eg. PNG files with alpha channel (transparency) the PDF is rendered/rasterized to an image and that is not a solution because then you lose the plain text in the file

Is there a tool (linux command line) to flatten images in PDF files with transparency?

like image 204
clarkk Avatar asked Nov 19 '25 16:11

clarkk


1 Answers

Its not clear why you want to do this. If you want PostScript then Ghostscript can produce PostScript for you from a PDF file (use the ps2write device). Obviously transparency will have to be rendered to an image, in which case the resolution is important. The default is 720 dpi which is probably higher than you might need.

Note that a PDF file can't contain a PNG, that's not a possible image type in PDF. A PNG would have to be stored as an image with a separate alpha.

like image 124
KenS Avatar answered Nov 21 '25 08:11

KenS



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!