Rajesh
Rajesh

Reputation: 11

Pdf text box markups missing in the converted tiff file (GhostScript)

I am trying to convert pdf to tiff. You can view the pdf in the below link: Original pdf

http://bugs.ghostscript.com/attachment.cgi?id=7736

I currently having Ghostscript 9.02 installed in my system.

I am using the below command to convert the pdf files to tiff.

gswin32 -dSAFER -dNOPAUSE -dBATCH -q -sPAPERSIZE=a4 -r300 -sDEVICE=tiffg4
-dPDFFitPage -dGraphicalAlphaBits=1 -dTextAlphaBits=1
-sOutputFile="d:/temp/test/ConvertedPage%06d.tiff"
"d:/temp/test/TextBoxMarkupfile.pdf"

There are 3 marked up text box available in the second page. After conversion those text values are missing in the tiff file.

Is there any options available in the ghostscript to include those text values in the converted image?

If any workarounds available please suggest me.

Thanks, Rajesh

Upvotes: 1

Views: 1028

Answers (1)

Michael Paulukonis
Michael Paulukonis

Reputation: 9100

A similar question+answer recommended pdftk.

I used a two-step process of [pdf] >> pdftk >> ImageMagick:

pdftk original_form.pdf output flattened_form.pdf flatten

convert -define quantum:polarity=min-is-white -endian MSB 
        -units PixelsPerInch -density 204x196 -monochrome 
        -compress Fax -sample 1728 
        "flattened_form.pdf" "final.tif"

Since ImageMagick uses GhostScript for pdf conversion it should be possible to use GS directly, but I've gotten better quality from ImageMagick; perhaps I'm not just using the right GS settings.

Upvotes: 1

Related Questions