LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 04-26-2006, 04:47 PM   #1
Rayaru
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora Core 2
Posts: 1
Thanked: 0
ImageMagick/Ghostscript Troubles


[Log in to get rid of this advertisement]
Hi all,

I'm trying to convert a PDF document to a JPG image using ImageMagick. The file is called "front.pdf" and I want to convert it to "front.jpg." When I use the convert command, I am getting an error:

Code:
$ convert front.pdf front.jpg
Error: /undefined in --filter--
Operand stack:
   --dict:7/7(L)--   false   false   --dict:10/14(L)--   --nostringval--   --nostringval--   JPXDecode
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   6851   2   11   %oparray_pop   --nostringval--   false   1   %stopped_push   2   11   %oparray_pop   --nostringval--   --nostringval--   --dict:0/0(L)--   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   182845   2   12   %oparray_pop   --nostringval--   false   1   %stopped_push   2   12   %oparray_pop   --nostringval--   --nostringval--   --dict:3/3(L)--   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   182239   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   7   14   %oparray_pop   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1072/1123(ro)(G)--   --dict:0/20(G)--   --dict:93/200(L)--   --dict:93/200(L)--   --dict:97/127(ro)(G)--   --dict:229/230(ro)(G)--   --dict:19/24(L)--   --dict:4/6(L)--   --dict:20/31(L)--   --dict:14/20(L)--   --dict:1/1(ro)(G)--   --dict:1/1(ro)(G)--   --dict:1/1(ro)(G)--   --dict:7/16(L)--
Current allocation mode is local
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
convert: Postscript delegate failed `front.pdf'.
Any help would be greatly appreciated!
Rayaru is offline  
Tag This Post , ,
Reply With Quote
Old 04-27-2006, 05:02 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Etch/Lenny/Squeeze
Posts: 2,300
Thanked: 89
Should work.

It is either a pdf in non-standard format, or too new a format. Or you have a version of convert which contains a bug.

Code:
jlinkels@jlinkels_pc:~$ convert -version
Version: ImageMagick 6.0.6 11/29/04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC
Just tried a conversion and it works without a problem. I created the pdf from a ps file using ps2pdf.

jlinkels
jlinkels is offline     Reply With Quote
Old 04-27-2006, 11:19 PM   #3
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495
Thanked: 2
I am guessing that Imagemagick itself cannot display PDF directly, but needs a helper app like Ghostscript.

Ghostscript should be able to generate a jpeg directly, with something like

$ gs -sDEVICE=jpeg -o image.jpg file.pdf

Command 'gs -h' shows all the output 'devices' for Ghostscript, including various other image formats.
maroonbaboon is offline     Reply With Quote
Old 12-17-2008, 07:08 PM   #4
jpwdesigns
LQ Newbie
 
Registered: Dec 2008
Posts: 1
Thanked: 0
Ghostscript error

HI Im getting a similar error and cant find any help anywhere.
This same script works on some pdf and not on others and i cant seem to figure out why or how to get it to work on all of the pdf im needing images from.

heres the error:
Code:
[root@XXXXXX files]# gs -SDEVICE=jpeg -r72 -sOutputFile=../img/newsletter/asid_occ_summer2008.jpg -dNOPAUSE -dBATCH -dGraphicsAlphaBits=4 -dUseCIEColor -dLastPage=1 -- asid_occ_summer2008.pdf
GNU Ghostscript 7.07 (2003-05-17)
Copyright (C) 2003 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Error: /undefined in --filter--
Operand stack:
   --dict:9/9(L)--   false   false   --dict:10/14(L)--   --nostringval--   --nostringval--   JPXDecode
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   5918   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   7   11   %oparray_pop   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1064/1123(ro)(G)--   --dict:0/20(G)--   --dict:74/200(L)--   --dict:74/200(L)--   --dict:97/127(ro)(G)--   --dict:229/230(ro)(G)--   --dict:19/24(L)--   --dict:4/6(L)--   --dict:20/31(L)--   --dict:1/1(ro)(G)--   --dict:7/16(L)--
Current allocation mode is local
GNU Ghostscript 7.07: Unrecoverable error, exit code 1

Last edited by jpwdesigns; 12-17-2008 at 07:10 PM..
jpwdesigns is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Imagemagick and abiword troubles, help!! eonicrush Linux - Newbie 1 04-14-2005 09:35 PM
Where is ghostscript Kocil Slackware 2 10-18-2003 10:56 PM
GhostScript 7.05 polarcat Slackware 1 01-14-2003 06:44 PM
need ghostscript help!!! sarah_777 Linux - Newbie 7 05-09-2002 10:40 AM
Ghostscript Bill Moehring Linux - Newbie 0 08-23-2001 07:59 PM


All times are GMT -5. The time now is 08:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration