Receiving "Error: /syntaxerror in pdfopen" on pdf conversion

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
DarkAngelBGE
Posts: 2
Joined: 2011-01-05T03:10:21-07:00
Authentication code: 8675308

Receiving "Error: /syntaxerror in pdfopen" on pdf conversion

Post by DarkAngelBGE »

Hi there,

I am new here and not all too familiar with ImageMagick. I ran into a problem, which I could not get any answers to via Google or the search function on this forum.

I simply want to convert the first page of a pdf file into a jpg image. Here is the command and its output:

convert -density 150 -quality 100 'mypdf.pdf[0]' test.jpg

Error: /syntaxerror in pdfopen
Operand stack:
(/tmp/gs_a4lF42) (\377\330\377\340\000\020JFIF\000\001\002\001\001M\001M\000\000\377\341\020\241Exif\000\000MM\000*\000\000\000\b\000\007\001\022\000\003\000\000\000\001\000\001\000\000\001\032\000\005\000\000\000\001\000\000\000b\001\033\000\005\000\000\000\001\000\000\000j\001\(\000\003\000\000\000\001\000\002\000\000\0011\000\002\000\000\000\036\000\000\000r\0012\000\002\000\000\000\024\000\000\000\220\207i\000\004\000\000\000\001\000\000\000\244\000\000\000\320\0002\317\320\000\000'\020\0002\317\320\000\000'\020Adobe Photoshop CS3 Macintosh\0002008:11:05 11:28:26\000\000\003\240\001\000\003...)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:285/300(ro)(G)-- --dict:7/15(L)--
Current allocation mode is local
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
convert: Postscript delegate failed `mypdf.pdf': No such file or directory @ pdf.c/ReadPDFImage/612.
convert: missing an image filename `test.jpg' @ convert.c/ConvertImageCommand/2775.


Image Magick version:
Version: ImageMagick 6.5.1-0 2009-08-27 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

Ghostscript Version:
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.

The pdf is an eBook with 400 pages which I cannot publish here unfortunately. : /
DarkAngelBGE
Posts: 2
Joined: 2011-01-05T03:10:21-07:00
Authentication code: 8675308

Re: Receiving "Error: /syntaxerror in pdfopen" on pdf conver

Post by DarkAngelBGE »

Fyi, I also tried repairing the pdf first via pdftk:

pdftk mypdfpdf output fixed.pdf

Without luck. Still getting the same error on fixed.pdf.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Receiving "Error: /syntaxerror in pdfopen" on pdf conver

Post by fmw42 »

Have you tried without the quotes? Just a thought. I suspect your GS install may be corrupt or missing the GS fonts library or you did not point IM to the GS fonts library. All things to double check. I am not an expert on any of this, but these are the main things that typically go wrong that I am aware of.
Post Reply