Page 1 of 2
Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-12T06:10:15-07:00
by abbd
Hello,
When i convert the pdf to picture using : C:\\Program Files\\ImageMagick-6.4.9-Q16\\convert\\ +distort ScaleRotateTranslate -90 c:\mypdf.pdf c:\mypicture.jpg in my pc it work, but when i excute the same command in a server, it not work, we obtain an pictor with bad quality, i verify the version of ghostscript and imagemagick, it the same to that in my pc, please help me to resolve this great problem, thank you verry mutch.
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-12T09:46:35-07:00
by fmw42
I don't know if this will help, but the IM 6.x syntax is input image before options. see
http://www.imagemagick.org/Usage/basics/#why
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-12T18:48:36-07:00
by anthony
The SRT distort was not quite right when first released. It did not do 'perfect' rotates at 90 degree angles. As I worked on it this has improved, and now it does produce a perfect result for 90 degree rotations with integer translations (0,0 by default in this case).
Of course it also expands the image with a 1 pixel border, colored using the method set by the current virtual-pixel setting (I suggest you use
-virtual-pixel background ). That is to ensure that it does manage to capture any and all edge interaction effects from the distortion, though in this special case their are none.
All versions of IM however produce PERFECT rotates of 90 degrees using
-rotate. See
Warping Images, Simple Distortions, Rectangular Rotates
http://www.imagemagick.org/Usage/warping/#rect_rotates
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-13T00:57:47-07:00
by abbd
Hello,
Thank you verry mutch for your answer, i try for a command without disort, but there are alwas a bad quality, i don't understand why in mu pc work, and in server i have a bad quality, i verify the version of gostscript and imagemagick, it's the same, please help me to resolve this problem, thank you verry mutch.
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-13T11:55:41-07:00
by abbd
Hello,
Can help me please, i excute the command on Windows server 2003 i obtain a verry bad quality, but when i excut the same command in my pc with Windows XP, i obtain a best quality.
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-13T12:54:26-07:00
by fmw42
what are your IM versions on both machines? what is the exact command line? Can you post the pictures? do you have the same version of ghostscript installed on both machines?
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-14T03:04:43-07:00
by abbd
Thank you,
i use the same version of ghostscript (8.64) in the both machine (mu pc with windows XP and server with windows server2003),
i use the same command [C:\\Program Files\\ImageMagick-6.4.9-Q16\\convert c:\mypdf.pdf c:\mypicture.jpg]
i my machine it work, i obtain a good quality, but in the server i obtain a bad quality (blur)
Thank you verry mutch.
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-14T09:21:42-07:00
by fmw42
are you absolutely sure you don't have multiple versions of IM or Ghostscript on the computer giving bad results?
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-14T10:36:04-07:00
by abbd
Hello,
Yes, iam sure, i test this in another server, it give the same eror, bad quality of picture, please help me to resolve this great problem, thank you verry mutch
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-14T12:20:33-07:00
by fmw42
you probably should post a link to your original pdf so others can test and review it.
I don't know if this is relevant, but do you have the very same fonts on both machines. Not just the font names but the very same files.
Again I am not an expert, but do you have fontconfig and freetype installed on both machines. I am not sure if they are needed.
convert -list configure
DELEGATES bzlib fontconfig freetype gs jpeg jng jp2 lcms lqr openexr png tiff x11 xml zlib
What does your DELEGATES include on each machine?
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-14T16:41:00-07:00
by anthony
It may also depend on your ghostscript installation. Maybe the ghostscript does not have a a particular output device to allow IM to get a better quality raster image of the PDF.
Also are you using the super-sampling technique to improve the aliasing results from ghostscript.
See IM Examples,Text Handling, Postscript (this is the same for PDF)
http://www.imagemagick.org/Usage/text/#postscript
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-15T00:29:36-07:00
by abbd
Hello,
thank you verry mutch, how i can verify if i use the super-sampling in the server? thank you verry mutch.
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-15T09:07:38-07:00
by fmw42
Supersampling is a set of commands not a setting while installing IM. Read Anthony's page at
http://www.imagemagick.org/Usage/text/#postscript for how to do supersampling
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-18T07:03:37-07:00
by abbd
thank you for your answers,
When i excut command : convert -list configure, i obtain this
I don't find the option of sampling on the installation,
they are :
Create a desktop icon
Update executable search path
Associate supported files extention with imagemagick
Install developpment headers and library for c ans c++
Intstall perlMagick for active state.....
Install ImageMagickObject OLE Control for VB script, visual basic....
pleause help met , thank you verry mutch
Re: Convert a pdf to picture using ghostscript and imagemagick
Posted: 2009-05-18T10:55:06-07:00
by fmw42
AGAIN. Supersampling is a set of commands not a setting while installing IM. Read Anthony's page at
http://www.imagemagick.org/Usage/text/#postscript for how to do supersampling
Anthony describes one approach to supersampling above as
convert -density 196 ps_version.ps'[0]' -resample 72 \
-trim +repage -bordercolor white -border 3 ps_version.gif
Here is another approach
convert -density 400 inputimage -resize 25% outputimage
Supersampling has
nothing to do with how you set up and compile IM