Shawn Way
Shawn Way

Reputation: 233

Ghostscript 9.23 flattening of PDF annotations

Prior to Ghostscript 9.21, annotations could be flattened into the document using the following code:

c:\gs\gs9.23\bin\gswin64c  -dSAFER -dDOPDFMARKS -dBATCH -dNOPAUSE 
-sDEVICE=pdfwrite -dCompatibilityLevel=1.3
-sFONTPATH=c:/gs/fonts;%windir%/fonts;. -sPDFPassword= 
-dPDFSETTINGS=/prepress -dPassThroughJPEGImages=true 
-sOutputFile=file_noPW.pdf  file.pdf

This would make an annotations permanent to the file, much like Acrobat's preflight option. As of version 9.21, this no longer happens.

Is there a way to flatten the annotations? I use this to make sure pdf's that are imported using latex have all the annotations present, as pdflatex and xelatex do not import annotations.

Upvotes: 5

Views: 4113

Answers (1)

KenS
KenS

Reputation: 31141

Its always worth reading the documentation. If you look here section 7.4, PDF file output, you will see the PreserveAnnots switch described.

Upvotes: 6

Related Questions