开发者

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

开发者 https://www.devze.com 2023-03-26 06:40 出处:网络
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 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 -sPAPERSI开发者_StackOverflow社区ZE=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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消