Problems with converting PDF files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hagen
Posts: 1
Joined: 2012-08-15T05:03:05-07:00
Authentication code: 67789

Problems with converting PDF files

Post by hagen »

Hi there,

as one of the functions of CrushFTP, the software that is running on aLinux server, I try to convert PDFs into jpgs, that are then saved in different sizes in separate directories to be used as previews for the WebInterface. When executing I find the following error message in the log:

Code: Select all

08/15/2012 10:49:17 AM|Preview:./convert -colorspace RGB -strip -geometry 800x800 -quality 75 /media/file.pdf[0] /var/opt/CrushFTP6_PC/Preview/media/file.pdf/p1/3.jpg

08/15/2012 10:49:20 AM|Preview:convert: no decode delegate for this image format `/tmp/magick-Jq06AIWJ-00000001' @ error/constitute.c/ReadImage/550.

08/15/2012 10:49:20 AM|Preview:convert: Postscript delegate failed `/media/file.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/678.

08/15/2012 10:49:20 AM|Preview:convert: no images defined `/var/opt/CrushFTP6_PC/Preview/media/file.pdf/p1/3.jpg' @ error/convert.c/ConvertImageCommand/3044.

08/15/2012 10:49:21 AM|Preview:Preview cannot be generated, adding to list of bad files:/media/file.pdf
I updated to the latest version of IM as well as the latest version of GhostScript that is said to be needed for PDF conversion. Any ideas on what I'm doing wrong?

Thx

Hagen
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems with converting PDF files

Post by fmw42 »

-geometry 800x800 is meaningless in your command line and does not have the offsets +X+Y. It is a setting and there is no command to use that setting. Try removing it or explain why you think you need it.

Also -quality should follow the input pdf file.

Also the size of pdf files is dictated by using the -density parameter before the input pdf. PDF files are vector files and have no inherent size in pixels.

If this does not help, please identify your IM version and Platform and post a link to an example pdf and explain what you are trying to do especially in terms of size for the jpg.
Post Reply