Page 1 of 1

Problems with converting PDF files

Posted: 2012-08-15T05:40:18-07:00
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

Re: Problems with converting PDF files

Posted: 2012-08-15T10:46:40-07:00
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.