Error converting pdf to jpgs
Posted: 2010-10-01T03:04:16-07:00
Hi,
I'm currently working on a script that converts a pdf to a bunch of jpgs. Everything works fine on my local windows pc, but on my shared host it works on some pdfs and on some it doesn't which is strange. It always seems to stop on pdfs that are a bit more "complex", like images etc. Whenever I try the following command:
I get the error:
In my error log I get the following error:
The output of the command is the following:
My host has been very helpful so far and updated imagemagick and ghostscript to the latest versions, but it didn't change anything. Is there anyway I can see which version of ghostscript imagemagick is using, because I'm thinking its still using the old version.
I hope you guys can help me on this one, because I can't figure this out.
Thank you.
I'm currently working on a script that converts a pdf to a bunch of jpgs. Everything works fine on my local windows pc, but on my shared host it works on some pdfs and on some it doesn't which is strange. It always seems to stop on pdfs that are a bit more "complex", like images etc. Whenever I try the following command:
Code: Select all
exec("convert -blur 0 -density 300 -quality 95 fout_resultaat.pdf -scale 800x1033 fout_resultaat.jpg", $array);
Code: Select all
Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop --nostringval-- --nostringval-- 7 1 9 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1793 0 9 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82/200(L)-- --dict:108/127(ro)(G)-- --dict:293/300(ro)(G)-- --dict:23/30(L)-- --dict:6/8(L)-- --dict:22/40(L)--
Current allocation mode is local
Last OS error: 122
Code: Select all
[Fri Oct 01 11:15:46 2010] [error] [client 83.163.187.108] convert: Postscript delegate failed `/home/pdfbroch/public_html/app/webroot/files/123/fout_resultaat.pdf': @ error/pdf.c/ReadPDFImage/645., referer: http://www.pdfbrochure.nl/categories/view/1
Code: Select all
command -list configure
Code: Select all
Array
(
[0] =>
[1] => Path: /usr/lib/ImageMagick-6.6.4/config/configure.xml
[2] =>
[3] => Name Value
[4] => -------------------------------------------------------------------------------
[5] => CC gcc -std=gnu99 -std=gnu99
[6] => CFLAGS -fopenmp -g -O2 -Wall -pthread
[7] => CONFIGURE ./configure '--prefix=/usr'
[8] => COPYRIGHT Copyright (C) 1999-2010 ImageMagick Studio LLC
[9] => CPPFLAGS -I/usr/include/ImageMagick
[10] => CXX g++
[11] => CXXFLAGS -g -O2 -pthread
[12] => DEFS -DHAVE_CONFIG_H
[13] => DELEGATES fontconfig freetype jpeg jng jp2 png tiff x11 xml zlib
[14] => DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no
[15] => EXEC-PREFIX /usr
[16] => FEATURES OpenMP
[17] => HOST x86_64-unknown-linux-gnu
[18] => LDFLAGS -L/usr/lib
[19] => LIB_VERSION 0x664
[20] => LIB_VERSION_NUMBER 6,6,4,8
[21] => LIBS -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lxml2 -lz -lm -lgomp -lpthread
[22] => NAME ImageMagick
[23] => PCFLAGS -fopenmp
[24] => PREFIX /usr
[25] => QuantumDepth 16
[26] => RELEASE_DATE 2010-09-30
[27] => VERSION 6.6.4
[28] => WEBSITE http://www.imagemagick.org
[29] =>
[30] => Path: [built-in]
[31] =>
[32] => Name Value
[33] => -------------------------------------------------------------------------------
[34] => NAME ImageMagick
)
I hope you guys can help me on this one, because I can't figure this out.
Thank you.