GhostScript,如何使用命令行设置自定义页面大小? [英] GhostScript, How to set custom page size using command line?

查看:45
本文介绍了GhostScript,如何使用命令行设置自定义页面大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一个类似的问题:如何进行更改Ghostscript输出文件(在打印机后台处理程序中)

I know that have a simillar question : How to change Ghostscript output file (in printer spooler)

但是答案没有帮助

我使用命令:

-q -dBATCH -dNOPAUSE -dNODISPLAY -c标记/NoCancel true/OutputFile(%printer%Ricoh c2051)/UserSettings<</DocumentName(Test)/MaxResolution 600 >>(mswinpr2)finddevice putdeviceprops setdevice"-f"C:\ duplex.pdf"

-q -dBATCH -dNOPAUSE -dNODISPLAY -c "mark /NoCancel true /OutputFile (%printer%Ricoh c2051) /UserSettings << /DocumentName (Test) /MaxResolution 600 >> (mswinpr2) finddevice putdeviceprops setdevice" -f "C:\duplex.pdf"

设置文档的自定义名称,但是如果尝试使用"-sPAPERSIZE = a4",输出纸的尺寸仍然是"LETTER".

to set a custom name for document, but if a try to use "-sPAPERSIZE=a4" still the outputpaper size is "LETTER".

然后,当我使用这些设置时如何更改纸张类型?

then,how to change the paper type when I use these settings?

----编辑

研究之后,我发现了如何设置纸张类型.

after researching, I found out how to set the paper type.

在提示处仅添加了"/PageSize [595 842]"(a4)

just added "/ PageSize [595 842]" (a4) at the prompt

然后该行变为:

-q-dBATCH-dNOPAUSE-dNODISPLAY-c标记/NoCancel true/OutputFile(%打印机%理光c2051)/PageSize [595 842] /UserSettings<</DocumentName(测试)/maxResolution 600 >>(mswinpr2)FindDevice setdevice putdeviceprops"-f" C:\ duplex.pdf"****

-q-dBATCH-dNOPAUSE-dNODISPLAY-c "mark / NoCancel true / OutputFile (% printer% Ricoh c2051) / PageSize [595 842] / UserSettings << / DocumentName (Test) / maxResolution 600 >> (mswinpr2) FindDevice setdevice putdeviceprops "-f" C: \ duplex.pdf "****

推荐答案

您的基本问题是,除非您设置固定的介质大小,否则Ghostscript会将介质大小设置为PDF文件中要求的大小(它将对此进行处理)以及PostScript输入).设置-dFIXEDMEDIA可以修复媒体大小.

Your basic problem is that unless you set a fixed media size Ghostscript will set the media size to that which is requested n the PDF file (it will do this for PostScript input as well). Set -dFIXEDMEDIA to fix the media size.

此外,mswinpr2设备不会尝试在打印机上设置介质尺寸(假设它有多个介质),而只是使用默认值.

In addition, the mswinpr2 device does not attempt to set the media size on the printer (assuming it has more than one), but simply uses the default.

这篇关于GhostScript,如何使用命令行设置自定义页面大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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