使用ghostscript将pdf页面的整个媒体框渲染为png文件 [英] Rendering the whole media box of a pdf page into a png file using ghostscript

查看:103
本文介绍了使用ghostscript将pdf页面的整个媒体框渲染为png文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Ghostscript v9.02将Pdfs页面渲染为png文件.为此,我使用以下命令行:

I'm trying to render Pdfs pages into png files using Ghostscript v9.02. For that purpose I'm using the following command line:

gswin32c.exe -sDEVICE=png16m -o outputFile%d.png mypdf.pdf

当pdf裁剪框与媒体框相同时,此方法工作正常,但如果裁剪框小于媒体框,则仅显示媒体框,并且pdf页面的边框丢失.
我知道通常pdf查看器仅显示裁剪框,但我需要能够在png文件中看到整个媒体页面.

This is working fine when the pdf crop box is the same as the media box, but if the crop box is smaller than the media box, only the media box is displayed and the border of the pdf page is lost.
I know usually pdf viewers only display the crop box but I need to be able to see the whole media page in my png file.

Ghostscript文档说,默认情况下会呈现文档的媒体盒,但这在我的情况下不起作用. 有人知道如何使用ghostscript渲染整个媒体盒吗?
难道对于png文件设备来说,只渲染了裁切盒吗?我可能会忘记特定的命令吗?

Ghostscript documentation says that per default the media box of a document is rendered, but this does not work in my case. As anyone an idea how I could achieve rendering the whole media box using ghostscript?
Could it be that for png file device, only the crop box is rendered? Am I maybe forgetting a specific command?

例如,此pdf 包含一些在裁剪框之外的注册标记,这些注册标记在输出png文件中不存在.有关此pdf的更多信息:

For example, this pdf contains some registration marks outside of the crop box, which are not present in the output png file. Some more information about this pdf:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆