1

我不知道如何使用该工具将带有单张图片的“横向”PDF 文件(例如,paperwidth=842 和 paperheight=595 点以及填充整个页面的图像)pdftocairo转换为 EPS 文件。

我得到的输出要么是原始文件的缩小版本(宽度从 842 缩放到 595 以适应 EPS 文件的“不正确”页宽 595),要么是 595 和 842 之间的内容被截断的 EPS(与-noshrink参数)。

有任何想法吗?

编辑1:pdftocairo version 0.43.0

输入PDF: pdfinfo test.pdf Creator: DocType PDF-Emitter (DocType PDF-Emitter v1.9.37-9-g1b2b6f3) Producer: Haru Free PDF Library 2.3.0RC2 CreationDate: Mon Jun 4 11:18:30 2018 Tagged: no UserProperties: no Suspects: no Form: none JavaScript: no Pages: 1 Encrypted: no Page size: 595.44 x 841.68 pts Page rot: 90 File size: 149246 bytes Optimized: no PDF version: 1.3

横向 PDF

用 pdftocairo -eps test.pdf 转换

景观 EPS

4

1 回答 1

0

最新版本的 Poppler(在我的系统上为 v0.42.0)具有以下命令行选项,可能会有所帮助:

$ pdftocairo -h
   pdftocairo version 0.42.0
   Copyright 2005-2016 The Poppler Developers - http://poppler.freedesktop.org
   Copyright 1996-2011 Glyph & Cog, LLC

Usage: pdftocairo [options] <PDF-file> [<output-file>]
   [....]
  -eps              : generate Encapsulated PostScript (EPS)
   [....]
  -r <fp>           : resolution, in PPI (default is 150)
  -rx <fp>          : X resolution, in PPI (default is 150)
  -ry <fp>          : Y resolution, in PPI (default is 150)
  -scale-to <int>   : scales each page to fit within scale-to*scale-to pixel box
  -scale-to-x <int> : scales each page horizontally to fit in scale-to-x pixels
  -scale-to-y <int> : scales each page vertically to fit in scale-to-y pixels
  -x <int>          : x-coordinate of the crop area top left corner
  -y <int>          : y-coordinate of the crop area top left corner
  -W <int>          : width of crop area in pixels (default is 0)
  -H <int>          : height of crop area in pixels (default is 0)
  -sz <int>         : size of crop square in pixels (sets W and H)
  -cropbox          : use the crop box rather than media box
   [....]
  -level2           : generate Level 2 PostScript (PS, EPS)
  -level3           : generate Level 3 PostScript (PS, EPS)
  -origpagesizes    : conserve original page sizes (PS, PDF, SVG)
  -paper <string>   : paper size (letter, legal, A4, A3, match)
  -paperw <int>     : paper width, in points
  -paperh <int>     : paper height, in points
  -nocrop           : don't crop pages to CropBox
  -expand           : expand pages smaller than the paper size
  -noshrink         : don't shrink pages larger than the paper size
  -nocenter         : don't center pages smaller than the paper size
   [....]
于 2016-03-23T17:50:29.800 回答