# This sed script modifies the output of pnmtops such that distiller # will not apply lossy JPEG DCT compression to the image. # Markus Kuhn -- 2004-05-01 # WARNING: For ps2pdf, this works only for ghostscript-8.14 or newer, # because of http://bugs.ghostscript.com/show_bug.cgi?id=563287 # Details: # - Acrobat Distiller Parameters, Technical Note #5151, Adobe. # http://partners.adobe.com/asn/acrobat/docs/distparm.pdf # - /usr/share/ghostscript/7.07/doc/Ps2pdf.htm (SuSE Linux 9.1) # /usr/share/doc/ghostscript-7.05/Ps2pdf.htm (Red Hat Linux 9) # - http://netpbm.sourceforge.net/doc/pnmtops.html /^gsave$/a /setdistillerparams where {pop} {userdict /setdistillerparams {pop} put} ifelse /^gsave$/a << /AutoFilterGrayImages false /AutoFilterColorImages false /^gsave$/a /ColorImageFilter /FlateEncode /GrayImageFilter /FlateEncode /^gsave$/a >> setdistillerparams /^grestore$/i << /AutoFilterGrayImages true /AutoFilterColorImages true >> setdistillerparams