Generalpdfcrop results in pdfTEX error

LaTeX specific issues not fitting into one of the other forums of this category.
jorgenschelleman
Posts: 4
Joined: Sat Jul 17, 2010 4:48 am

pdfcrop results in pdfTEX error

Post by jorgenschelleman »

I have used pdfcrop (from Oberdiek) about 3 months before to trim PDF graphs. This morning I tried it again and I got an error. Tried updating but I got the same error. There is a second pdfcrop script out there but that one doesn't suit me.

!!! Error: pdfTeX run failed!
error message - debug:

Code: Select all

PDFCROP 1.23, 2010/01/09 - Copyright (c) 2002-2010 by Heiko Oberdiek.
* System: unix
* Not found (gs): /usr/local/sbin/gs
* Not found (gs):/usr/localbin/gs
* Not found (gs): /usr/sbin/gs
* Found (gs): /usr/bin/gs
* Autodetected ghostscript command: gs
* Input file: BehaviourTO1.pdf
* Output file: BehaviourTO1new.pdf
* Margins: 0 0 0 0
* Running ghostscript for BoundingBox calculation ...
* Ghostscript call: gs -sDEVICE=bbox -dBATCH -dNOPAUSE -c save pop -f BehaviourTO1.pdf
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 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
%%BoundingBox: 99 386 775 535
* Page 1: 99 386 775 535
%%BoundingBox: 99 386 775 535
* Page 2: 99 386 775 535
%%HiResBoundingBox: 99.323997 386.819988 774.433594 534.995984
%%HiResBoundingBox: 99.323997 386.819988 774.433594 534.995984
* Running pdfTeX ...
* pdfTeX call: pdftex -no-shell-escape -interaction=nonstopmode tmp-pdfcrop-6117
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.                                           
entering extended mode
(./tmp-pdfcrop-6117.tex [1 <./BehaviourTO1.pdf>]
!pdfTeX error: pdftex (file ./BehaviourTO1.pdf): PDF inclusion: required page does not exist <1>
==> Fatal error occurred, no output PDF file produced!
* Cleanup
* Temporary files: tmp-pdfcrop-6117.tex tmp-pdfcrop-6117.log
!!! Error: pdfTeX run failed
Any suggestions, how to resolve this?

Jorgen

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

pdfcrop results in pdfTEX error

Post by frabjous »

You could try a different cropping tool, e.g., briss.
jorgenschelleman
Posts: 4
Joined: Sat Jul 17, 2010 4:48 am

Re: pdfcrop results in pdfTEX error

Post by jorgenschelleman »

Thanks, for the suggestion. The graphs need be cut exact the same size as they are put on one page. As well I have 42 graphs to do which are paired in groups of 2 and 3 so a command line tool would be preferable. :-)
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

pdfcrop results in pdfTEX error

Post by frabjous »

You could try the "pdfmanipulate crop" commandline tool that comes with calibre, though it may rely on the same technique as pdfcrop, not sure.
jorgenschelleman
Posts: 4
Joined: Sat Jul 17, 2010 4:48 am

pdfcrop results in pdfTEX error

Post by jorgenschelleman »

workaround:

- used a bash script that I found on the internet:
http://konrad.familie-kieling.de/comput ... -crop-pdfs

made it in shell script and used pdfcrop to find the right pixels.
amicke
Posts: 4
Joined: Fri Jul 23, 2010 10:40 pm

Re: pdfcrop results in pdfTEX error

Post by amicke »

Are you using Ubuntu?

I had the same problem since last ghostscript upgrade earlier in July.

My workaround was to downgrade to the minor version "8.64.dfsg.1-0ubuntu8" of both ghostscript and libgs8 (from 8.64.dfsg.1-0ubuntu8.1).

Best,
Maciek
jorgenschelleman
Posts: 4
Joined: Sat Jul 17, 2010 4:48 am

Re: pdfcrop results in pdfTEX error

Post by jorgenschelleman »

Yes I am using ubuntu. That must be the problem, Thanks.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: pdfcrop results in pdfTEX error

Post by localghost »

As far as I can see everything is up to date except PDFTeX (your version is 1.40.3, current version is 1.40.10). Perhaps this causes the problem and a newer version available with Ubuntu 10.04 could solve that.


Best regards and welcome to the board
Thorsten
amicke
Posts: 4
Joined: Fri Jul 23, 2010 10:40 pm

Re: pdfcrop results in pdfTEX error

Post by amicke »

Looks like a ghostscript issue to me.

pdfcrop worked fine for years until ghostscript upgrade to 8.64.dfsg.1-0ubuntu8.1.

Downgrading to 8.64.dfsg.1-0ubuntu8 restores pdfcrop operation.

System summary:
* Ubuntu 9.04
* PDFCROP 1.5, 2004/06/24 - Copyright (c) 2002, 2004 by Heiko Oberdiek.
* pdfTeX using libpoppler 3.141592-1.40.3-2.2 (Web2C 7.5.6)

Best,
Maciek
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pdfcrop results in pdfTEX error

Post by localghost »

Seems to be an issue related to the versions shipped with Ubuntu. On my system it works fine.
  • openSUSE 11.2
  • PDFCROP 1.20, 2009/10/06 - Copyright (c) 2002-2009 by Heiko Oberdiek.
  • pdfTeX using libpoppler 3.1415926-1.40.10-2.2 (TeX Live 2009/obs://build.opensuse.org/Publishing)
  • GPL Ghostscript 8.70 (2009-07-31)
Post Reply