I want to try the great pdfcrop.pl script by Heiko Oberdiek (http://www.ctan.org/pkg/pdfcrop) with LuaTeX engine.
Unfortunately my knowledge about LaTeX tools like LuaTeX is non existent. I'm looking for miniamalist setup instructions to make it work (on Windows 7 OS).
I downloaded miminal LuaTeX engine files from: http://minimals.contextgarden.net/current/bin/luatex/mswin/bin/
I'm using --luatex --luatexcmd switches for the script but it throws errors. I've made a lot of cobbling it together at that point (like copying missing .fmt and other files from other distributions like MikTeX, LeXlive etc..) but I guess it doesn't make sense to describe that exactly as I didn't really know what I was doing ;)
Best would be to start fresh So given the pdfcrop.pl script and the miminalist LuaTeX engine files - Coould somebody outline steps to make it work?
Thanks a lot!
UPDATE
When i'm running this with --debug
and --ini
switches:
pdfcropn.pl --debug --hires --gscmd="C:\Program Files\gs\bin\gswin32c.exe" --luatex --ini --luatexcmd="C:\PDFcrop\Luatex\luatex.exe" "CTGov PS model.pdf" "CTGov PS model.crop2.pdf"
it gives me this:
`PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
Restricted mode: disabled
Option `pdfversion': auto
Input file: CTGov PS model.pdf
Output file: CTGov PS model.crop2.pdf
Margins: 0 0 0 0
Input file name `CTGov PS model.pdf' contains special characters.
Copy input file to temporary file `tmp-pdfcrop-11176-img.pdf'.
PDF header: %PDF-1.5
Using PDF minor version: 5
Running ghostscript for BoundingBox calculation ...
Ghostscript call: "C:\Program Files\gs\bin\gswin32c.exe" -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f tmp-pdfcrop-11176-img.pdf
GPL Ghostscript 9.10 (2013-08-30)
Copyright (C) 2013 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Substituting font Helvetica for ArialMT.
Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 3590604 2239077 5213760 3919818 4 done.
%%BoundingBox: 32 199 555 644
%%HiResBoundingBox: 32.430022 199.070080 554.069936 643.009902
Page 1: 32.430022 199.070080 554.069936 643.009902
Running LuaTeX ...
LuaTeX call: C:\PDFcrop\Luatex\luatex.exe -no-shell-escape --ini --etex -interaction=nonstopmode tmp-pdfcrop-11176
warning: kpathsea: configuration file texmf.cnf not found in these directories: C:/PDFcrop/Luatex;C:/PDFcrop/Luatex/share/texmf-local/web2c;C:/PDFcrop/Luatex/share/texmf-dist/web2c;C:/PDFcrop/Luatex/share/texmf/web2c;C:/PDFcrop/Luatex/texmf-local/web2c;C:/PDFcrop/Luatex/texmf-dist/web2c;C:/PDFcrop/Luatex/texmf/web2c;C:/PDFcrop;C:/PDFcrop/share/texmf-local/web2c;C:/PDFcrop/share/texmf-dist/web2c;C:/PDFcrop/share/texmf/web2c;C:/PDFcrop/texmf-local/web2c;C:/PDFcrop/texmf-dist/web2c;C:/PDFcrop/texmf/web2c;C://texmf-local/web2c;C:/;C://share/texmf-local/web2c;C://share/texmf-dist/web2c;C://share/texmf/web2c;C://texmf-local/web2c;C://texmf-dist/web2c;C://texmf/web2c.
This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4774) (INITEX)
! I can't find file `tmp-pdfcrop-11176'.
<*> tmp-pdfcrop-11176
Please type another input file name
! Emergency stop.
<*> tmp-pdfcrop-11176
No pages of output.
Transcript written on texput.log.
Cleanup
Temporary files: tmp-pdfcrop-11176-img.pdf tmp-pdfcrop-11176.tex tmp-pdfcrop-11176.log
!!! Error: LuaTeX run failed with value 1!`
I can see tmp-pdfcrop-5448.tex
has been created in the directory where original PDF is.
Moreover by manually re-running luatex command with full path to the tex file it goes further but still breaks:
C:\PDFcrop>C:\PDFcrop\Luatex\luatex.exe -no-shell-escape --ini --etex -interaction=nonstopmode c:\pdfcrop\tmp-pdfcrop-5448
warning: kpathsea: configuration file texmf.cnf not found in these directories: C:/PDFcrop/Luatex;C:/PDFcrop/Luatex/share/texmf-local/web2c;C:/PDFcrop/Luatex/share/texmf-dist/web2c;C:/PDFcrop/Luatex/share/texmf/web2c;C:/PDFcrop/Luatex/texmf-local/web2c;C:/PDFcrop/Luatex/texmf-dist/web2c;C:/PDFcrop/Luatex/texmf/web2c;C:/PDFcrop;C:/PDFcrop/share/texmf-local/web2c;C:/PDFcrop/share/texmf-dist/web2c;C:/PDFcrop/share/texmf/web2c;C:/PDFcrop/texmf-local/web2c;C:/PDFcrop/texmf-dist/web2c;C:/PDFcrop/texmf/web2c;C://texmf-local/web2c;C:/;C://share/texmf-local/web2c;C://share/texmf-dist/web2c;C://share/texmf/web2c;C://texmf-local/web2c;C://texmf-dist/web2c;C://texmf/web2c.
This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4774) (INITEX)
(c:/pdfcrop/tmp-pdfcrop-5448.tex
!LuaTeX error (file tmp-pdfcrop-12368-img.pdf): cannot find image file 'tmp-pdfc
rop-12368-img.pdf'
==> Fatal error occurred, no output PDF file produced!