如何将 PDF 转换为不含文本的图像

发布于 2024-12-03 17:59:33 字数 484 浏览 4 评论 0原文

我想知道是否可以将 PDF 转换为没有字体的图像。我的目标是只有图像而没有文字?

如果是的话,我可以用 ImageMagick/GhostScript 来做吗?

这是一个示例

图像最终 http://crocodoc_public.s3.amazonaws.com/8b8aa154-45e3-41f9-a465-628e1b2e955d/images/page-001.png

和原始 PDF http://crocodoc.com/demo/efwpa(第2页)我们可以看到文本覆盖在图像上,我想要做同样的事情。

I would like to know if its possible to convert a PDF to and image without fonts. My goal is to have only the image without text ?

And if yes, can I do it with ImageMagick/GhostScript ?

Here an example

The image final http://crocodoc_public.s3.amazonaws.com/8b8aa154-45e3-41f9-a465-628e1b2e955d/images/page-001.png

and the original PDF http://crocodoc.com/demo/efwpa (page 2) We can see that the text are on overlay over the image, what I want is to do the same.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

晒暮凉 2024-12-10 17:59:33

因此,如果我没猜错的话,您想要的是从 PDF 中删除一些文本(而不是字体),并且您希望以编程方式执行此操作。我怀疑您已经知道,只有将文本放置在 PDF 文件中的某种单独图层上,这才有可能。您可以尝试使用 iText 来实现此目的。请注意,这意味着您将不得不花一些时间来学习如何使用该库。

So if I got you right, what you want is to remove some text from your PDF (not fonts), and you want to do it programmatically. I suspect you know already that this will only possible if the text is placed on some kind of separate layer in your PDF files. You can try to utilize iText for that. Beware, this will mean you will have to invest some days of learning how to use that library.

少钕鈤記 2024-12-10 17:59:33

我也在寻找类似的东西。
在使用 imagemagick 时,我尝试了这个命令并得到了一些意想不到的结果。

convert -input.pdf -blur 0x0 output.jpg

这会从我尝试过的 pdf 中删除文本图层。

我不能保证这对您有用,并且这是实现目标的正确方法,但您可以尝试。

I too am the lookout for something like that.
While playing with imagemagick I tried this a command and got some unexpected results.

convert -input.pdf -blur 0x0 output.jpg

this removes the text layers from the pdfs I tried.

I cannot guarantee that this will work for you and if this the right way to achieve, but you may try.

有木有妳兜一样 2024-12-10 17:59:33

您可以使用 Adob​​e Acrobat 来完成此操作。使用修饰工具选择文本并将其删除。我认为你不能用 Ghostscript 做到这一点。您可以考虑手动编辑 PDF(qpdf 有帮助)。

You can do that with Adobe Acrobat. Select the text with the touch up tool and delete it. I don't think you can do that with Ghostscript. You could consider editing the PDF by hand (qpdf helps).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文