Page 1 of 1
Some PDF thumbnails are all black!
Posted: 2008-03-31T08:27:06-07:00
by mvigor
This morning I've added a system call to convert into my PHP and it worked beautifully to create thumbnails for the first page of my PDF documents...for MOST of the books.
However, for a certain few books, each chapter's thumbnail is just a black square.
http://www.teachinglearning.com/freebie ... php?type=B
Look at the linked page and scroll down through it. Notice that for most books, every thumbnail was created successfully. Then notice that for other entire books, every thumbnail is just a black rectangle.
Does 'convert' choke on certain fonts or other PDF elements?
The command I am using with mixed success is
convert -quality 50 -border 3x3 -bordercolor #000000 filename.pdf[0] -resize 100x120 filenumber_thumb.jpg
Re: Some PDF thumbnails are all black!
Posted: 2008-03-31T08:51:16-07:00
by magick
ImageMagick uses the Ghostscript delegate program to render PDF. To ensure a successful conversion install the very latest Ghostscript and ImageMagick releases. If you still have problems, post a URL to one or two of your PDF's that fail to convert properly and we will download and see if we can reproduce the problem.
Re: Some PDF thumbnails are all black!
Posted: 2008-03-31T08:54:58-07:00
by mvigor
I was afraid you were going to say that! I'm at the mercy of my web host to keep your scripts updated and they are quite difficult to get a response from. I'll ask them, but in the mean time I'll post a few links for you.
Please keep in mind that it is strange that my failures are grouped by the fact that they are all from the same book, while my successes are also grouped the same way. My instinct tells me it's font related, but it would take a good bit of testing to know for sure.
Re: Some PDF thumbnails are all black!
Posted: 2008-03-31T08:56:22-07:00
by mvigor
Re: Some PDF thumbnails are all black!
Posted: 2008-03-31T09:54:44-07:00
by magick
This command works from us:
- convert -quality 50 -border 3x3 -bordercolor #000000 -colorspace rgb filename.pdf'[0]' -thumbnail 100x120 filenumber_thumb.jpg
The colorspace option converts CMYK PDF files to RGB and the thumbnail option is optimized for generating thumbnail images.
Re: Some PDF thumbnails are all black!
Posted: 2008-03-31T10:39:29-07:00
by mvigor
It works! Thank you!
:happy dance:
Re: Some PDF thumbnails are all black!
Posted: 2009-11-18T02:12:53-07:00
by nabritta
How do I change a PDF file to a different program? Okay, So I have a picture in a PDF file that I was trying to upload onto facebook. It didn't let me do so. My question today is, how am I able to put the picture that I have in the PDF file into another program which I can upload these onto Facebook?
______________________
market samurai ~
marketsamurai ~
marketsamurai.com