Page 1 of 1
convert pdf to png doesn't work complete
Posted: 2009-09-16T09:17:16-07:00
by brush51
Hi folks,
i have a little problem mit imagemagick(version 6.5.5-10) on a Debian Server.
I am root on this server.
I want to convert a PDF to PNG with the following commands:
Code: Select all
convert -scale 100x100 "test.pdf[0]" output.png
convert test.pdf -density 600x600 -resize 800x560 PNG:'output.png'
The conversion doesn't work correctly. The output.png is not an png. I have checked the header of this file and it is a pdf with the ending of .png.
But i want a original png. Can someone help me?
greets,
brush51
Re: convert pdf to png doesn't work complete
Posted: 2009-09-16T10:27:06-07:00
by magick
Type
If the PNG format is supported, you get a PNG with a mode of rw-. If its not there, ImageMagick was built without ImageMagick support. To fix download and install the PNG library. Also be sure you have the PNG header files (e.g. png.h). When you configure ImageMagick it tells you whether it validates a particular delegate library. Be sure it does not complain about PNG. Now rebuild ImageMagick and reinstall. Now your PDF to PNG conversion should work as expected.
Re: convert pdf to png doesn't work complete
Posted: 2009-09-17T03:20:21-07:00
by brush51
Hello magick,
yes you're right. I have installed the libpng and after that reinstalled imagemagick.
convert works now!
thanks a lot!
brush51
Re: convert pdf to png doesn't work complete
Posted: 2009-09-17T10:36:39-07:00
by brush51
Now i have a new problem with several pdf's.
i get this error:
Code: Select all
Error: /invalidfont in /findfont
Operand stack:
--dict:9/18(L)-- F1 72 --dict:9/9(L)-- --dict:9/9(L)-- Arial Arial
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1889 1 3 %oparray_pop 1888 1 3 %oparray_pop 1872 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- 1847 7 9 %oparray_pop
Dictionary stack:
--dict:1152/1684(ro)(G)-- --dict:2/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:274/300(ro)(G)-- --dict:21/25(L)-- --dict:4/6(L)-- --dict:24/31(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.60: Unrecoverable error, exit code 1
convert: Postscript delegate failed `arial.pdf': Datei oder Verzeichnis nicht gefunden @ pdf.c/ReadPDFImage/630.
convert: missing an image filename `ausgabe.png' @ convert.c/ConvertImageCommand/2819.
[/code]
I dont really understand this error. convert cant find the font arial, but the error comes from ghostscript? right?
thanks a lot for helping
brush51
Re: convert pdf to png doesn't work complete
Posted: 2009-09-17T12:58:40-07:00
by fmw42
not sure but perhaps you need to install freetype as well as ghostscript.
Re: convert pdf to png doesn't work complete
Posted: 2009-09-18T04:12:24-07:00
by brush51
i have installed ghostscript and i moved a downloaded fontpackage into the font-folder from ghostscript.
it works now.