如何使用Ghostscript设置PDF页面的物理尺寸? [英] How to set the physical size of PDF pages with Ghostscript?
问题描述
我想使用Ghostscript将一堆.eps图像转换为一个PDF.
I want to convert a bunch of .eps images to a single PDF using Ghostscript.
但是当我在PDF查看器中查看PDF文件并将视图设置为文件物理尺寸的100%时,这是巨大的!
But when I look at the PDF file in a PDF viewer and set view to 100% to physical size of the file is huge!
我想强制gs以字母大小创建PDF,但是我尝试的所有操作均失败. 这是我正在使用的命令:
I would like to force gs to create the PDF in letter size, but everything I tried failed. Here's the command I'm using:
gs -dBATCH -dNOPAUSE -dEPSFitPage -dEPSCrop \
-q -sDEVICE=pdfwrite -sOutputFile=out.pdf \
file1.eps file2.eps
我对-sPAPERSIZE=legal
和-dDEVICEWIDTHPOINTS=w -dDEVICEHEIGHTPOINTS=h
的所有尝试均无效.
All my attempts with -sPAPERSIZE=legal
and -dDEVICEWIDTHPOINTS=w -dDEVICEHEIGHTPOINTS=h
had no effect.
推荐答案
问题是-dEPSFitPage
,它正在使用-dPDFFitPage
使页面大小适合.eps文件大小...(并跳过了互斥的
The problem was -dEPSFitPage
it was fitting the page size to the .eps file size... using -dPDFFitPage
(and skipping the mutually exclusive -dEPSCrop
) solved my problem.
gs -dBATCH -dNOPAUSE -sPAPERSIZE=letter \
-dPDFFitPage -q -sDEVICE=pdfwrite \
-sOutputFile=out.pdf \
file1.eps file2.eps
这篇关于如何使用Ghostscript设置PDF页面的物理尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!