Page 1 of 1

PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T03:26:18-07:00
by renaud
Hello all,

I'm using ImageMagick 6.3.9 03 to convert PDF to JPG (our PDF files are maximum size 15 Mo, not too big).
The problem is that in some PDF (not all) some parts of contents are truncated.
You can see the following images to understand what i mean :

Screenshot of the PDF :
Image

Screenshots of the JPG :
Image

You can see that the right part of the text has disappear.
It's really problematic for us because our customer absolutely want that we solve this problem.

Is anybody that have solve this issue ?

Thanks in advance for your help and time...

Re: PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T06:15:58-07:00
by magick
Make sure you have the very latest Ghostscript installed. If it still fails, post a URL to your original PDF so we can download and reproduce the problem.

Re: PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T06:28:46-07:00
by renaud
First of all, thanks for your quick answer.
Our server is already using the last available version of Ghostscript : 8.62.

You can find one of the "problematic" PDF by following this link : http://tinyurl.com/62v2nw

Thanks for giving your time to this problem

Re: PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T09:19:40-07:00
by magick
The conversion worked for us (no text was truncated). We're using ImageMagick 6.4.0-6 and Ghostscript 8.60.

Re: PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T09:25:24-07:00
by renaud
Really strange :)

You can found below the code used to do the conversion :

Code: Select all

// Convert PDF to JPG by exec() function
exec($this->config->path->imagemagick.' -quality 100 -type truecolor '.$pdfFile.' '.$highResFile);	
exec($this->config->path->imagemagick.' -quality 100 -type truecolor '.$pdfFile.' '.$lowResFile);	
exec($this->config->path->imagemagick.' -quality 100 -type truecolor '.$pdfFile.' '.$thumbnailFile);
I'm using ImageMagick 6.3.9 03.
Do you think this version of IM could be responsible of that problem or may i have to found the problem in another place ?

Another question (maybe a stupid one) : Do you think that the conversion render can be random ?
Because i have maybe 4, 5 PDF on 23 that got this problem...

I didn't found any relations between those PDF.

BTW thanks for your help (and excuse my english skill, i'm french) :p

Re: PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T10:20:54-07:00
by magick
We used this command for the conversion:
  • convert -colorspace rgb -density 400 image.pdf -resize 25% -quality 100 image.jpg

[SOLVED] PDF to JPEG : Image is partially truncated

Posted: 2008-04-14T12:58:31-07:00
by renaud
I try your command and all works fine now.
Treatment time is longer but the quality is better, no comparison possible.

Hope that the server will accept load of charge ;)

Btw, thanks for your help guys, you're making an amazing work with this program...

Thanks a lot