pdfcrop 无法在文件上运行

pdfcrop 无法在文件上运行

我正在尝试删除以下 PDF 文件上的巨大边距,以便每张纸打印两页:

http://math.stanford.edu/~vakil/216blog/FOAGaug1612public.pdf

当我跑步时:

$ pdfcrop FOAGaug1612public.pdf test.pdf

我得到以下输出:


kpathsea: Running mktexfmt pdftex.fmt
fmtutil: running `pdftex -ini   -jobname=pdftex -progname=pdftex -translate-file=cp227.tcx *pdfetex.ini' ...
This is pdfTeX, Version 3.1415926-2.5-1.40.13 (TeX Live 2013/dev) (INITEX)
 restricted \write18 enabled.
 (/usr/share/texlive/texmf/web2c/cp227.tcx)
entering extended mode
(/usr/share/texlive/texmf-dist/tex/plain/config/pdfetex.ini
(/usr/share/texlive/texmf/tex/generic/config/pdftexconfig.tex)
(/usr/share/texlive/texmf-dist/tex/plain/etex/etex.src
(/usr/share/texlive/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/share/texlive/texmf/tex/generic/hyphen/hyphen.tex
[skipping from \patterns to end-of-file...]))
(/usr/share/texlive/texmf-dist/tex/plain/etex/etexdefs.lib
Skipping module "grouptypes"; Loading module "interactionmodes";
Skipping module "nodetypes"; Skipping module "iftypes";)
(/usr/share/texlive/texmf/tex/generic/config/language.def
(/usr/share/texlive/texmf/tex/generic/hyphen/hyphen.tex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-pl.tex
QX Polish hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-qx.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-pl.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-ru.tex
T2A Russian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/ruhyphen.tex
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/catkoi.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/koi2t2a.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/ruhyphal.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/cyryoal.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/hypht2.tex)))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-uk.tex
T2A Ukrainian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/ukrhyph.tex
Ukrainian hyphenation patterns in t2a encoding
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/catlcy.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/lcy2t2a.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/ukrhypmp.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/hypht2.tex)))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-ca.tex
EC Catalan hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ca.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-sk.tex
EC Slovak hyphenation patterns (Jana Chlebikova, 1992)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-sk.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-nl.tex
EC Dutch hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-nl.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-hu.tex
EC Hungarian hyphenation patterns (v20110815)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex
Huhyphn - hungarian hyphenation patterns v20110815))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-bg.tex
T2A Bulgarian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-t2a.
tex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-rm.tex
ASCII Romansh hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-rm.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex
EC Afrikaans hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-tk.tex
EC Turkmen hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-tk.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-tr.tex
EC Turkish hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-tr.tex))
! Missing number, treated as zero.
<to be read again> 
                   \chardef 
<to be read again> 
                   \rhm@arabic 
\addlanguage ...\chardef \csname rhm@#1\endcsname 
                                                  =#5 \uselanguage {#1}\inpu...
l.43 \addlanguage{arabic}{zerohyph.tex}{}{}{}

? 
! Emergency stop.
<to be read again> 
                   \chardef 
<to be read again> 
                   \rhm@arabic 
\addlanguage ...\chardef \csname rhm@#1\endcsname 
                                                  =#5 \uselanguage {#1}\inpu...
l.43 \addlanguage{arabic}{zerohyph.tex}{}{}{}

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on pdftex.log.
Error: `pdftex -ini  -jobname=pdftex -progname=pdftex -translate-file=cp227.tcx *pdfetex.ini' failed

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
  /home/efagerho/.texlive2012/texmf-var/web2c
for details.
###############################################################################

This is a summary of all `failed' messages:
`pdftex -ini  -jobname=pdftex -progname=pdftex -translate-file=cp227.tcx *pdfetex.ini' failed
warning: kpathsea: mktexfmt output `This is pdfTeX, Version 3.1415926-2.5-1.40.13 (TeX Live 2013/dev) (INITEX)
 restricted \write18 enabled.
 (/usr/share/texlive/texmf/web2c/cp227.tcx)
entering extended mode
(/usr/share/texlive/texmf-dist/tex/plain/config/pdfetex.ini
(/usr/share/texlive/texmf/tex/generic/config/pdftexconfig.tex)
(/usr/share/texlive/texmf-dist/tex/plain/etex/etex.src
(/usr/share/texlive/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/share/texlive/texmf/tex/generic/hyphen/hyphen.tex
[skipping from \patterns to end-of-file...]))
(/usr/share/texlive/texmf-dist/tex/plain/etex/etexdefs.lib
Skipping module "grouptypes"; Loading module "interactionmodes";
Skipping module "nodetypes"; Skipping module "iftypes";)
(/usr/share/texlive/texmf/tex/generic/config/language.def
(/usr/share/texlive/texmf/tex/generic/hyphen/hyphen.tex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-pl.tex
QX Polish hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-qx.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-pl.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-ru.tex
T2A Russian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/ruhyphen.tex
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/catkoi.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/koi2t2a.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/ruhyphal.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/cyryoal.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/hypht2.tex)))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-uk.tex
T2A Ukrainian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/ukrhyph.tex
Ukrainian hyphenation patterns in t2a encoding
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/catlcy.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/lcy2t2a.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ukrhyph/ukrhypmp.tex)
(/usr/share/texlive/texmf-dist/tex/generic/ruhyphen/hypht2.tex)))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-ca.tex
EC Catalan hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-ca.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-sk.tex
EC Slovak hyphenation patterns (Jana Chlebikova, 1992)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-sk.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-nl.tex
EC Dutch hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-nl.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-hu.tex
EC Hungarian hyphenation patterns (v20110815)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex
Huhyphn - hungarian hyphenation patterns v20110815))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-bg.tex
T2A Bulgarian hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-t2a.
tex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-rm.tex
ASCII Romansh hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-rm.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex
EC Afrikaans hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-tk.tex
EC Turkmen hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-tk.tex))
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-tr.tex
EC Turkish hyphenation patterns
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.t
ex)
(/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-tr.tex))
! Missing number, treated as zero.
<to be read again> 
                   \chardef 
<to be read again> 
                   \rhm@arabic 
\addlanguage ...\chardef \csname rhm@#1\endcsname 
                                                  =#5 \uselanguage {#1}\inpu...
l.43 \addlanguage{arabic}{zerohyph.tex}{}{}{}

? 
! Emergency stop.
<to be read again> 
                   \chardef 
<to be read again> 
                   \rhm@arabic 
\addlanguage ...\chardef \csname rhm@#1\endcsname 
                                                  =#5 \uselanguage {#1}\inpu...
l.43 \addlanguage{arabic}{zerohyph.tex}{}{}{}

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on pdftex.log.' instead of a filename.
!!! Error: pdfTeX run failed!

答案1

错误消息显示,纯 pdfTeX 格式生成失败。请尝试

fmtutil --byfmt pdftex

如果成功,那么你可以再试pdfcrop一次。否则,尝试更新 TeX 发行版,也许错误已经修复。

pdfcrop也可以不使用格式:

$ pdfcrop --ini FOAGaug1612public.pdf test.pdf

该文件FOAGaug1612public.pdf包含无内容的页面,这会导致一些警告,并且xref表格中某些条目不正确。而且该文件是由 LaTeX 生成的,包含大量溢出\hboxes。除此之外,您应该会得到一个裁剪过的test.pdf

相关内容