最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Ghostscript: Pdf page converted to png is missing the text - Stack Overflow

programmeradmin1浏览0评论

I am struggling with a problem and I have no idea how to fix it. I use Ghostscript to extract a png from the pdf page but the thing is the resulting png has only the table borders from the original pdf, the text from the table cells is missing.

The result:

The code I use:

gs -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 
'-sDEVICE=png16m' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dBackgroundColor=16#ffffff '-r300x300' 
-sOutputFile=/tmp/testpdf/res1.png /tmp/testpdf/1.pdf

The output:

GPL Ghostscript 9.56.1 (2022-04-04)
Page 1
Loading CIDFont TimesNewRoman substitute from /usr/share/ghostscript/Resource/CIDFSubst/DroidSansFallback.ttf
Loading CIDFont TimesNewRoman,Bold substitute from /usr/share/ghostscript/Resource/CIDFSubst/DroidSansFallback.ttf
Loading font Times-Roman (or substitute) from /usr/share/ghostscript/Resource/Font/NimbusRoman-Regular

I run this on an Amazon Linux 2023 machine.

Any idea what is going on here?

发布评论

评论列表(0)

  1. 暂无评论