如何使用Ghostscript设置PDF页面的物理尺寸? [英] How to set the physical size of PDF pages with Ghostscript?

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

问题描述

我想使用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屋!

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