Title: program generates blank thumbnails
Last modified: October 5, 2016

---

# program generates blank thumbnails

 *  Resolved [mohamed.belhassen](https://wordpress.org/support/users/mohamedbelhassen/)
 * (@mohamedbelhassen)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/)
 * Hi,
 * For some PDF documents, the plugin generates blank thumbnails.
 * You can see the problem in this image ([https://goo.gl/miWJLg](https://goo.gl/miWJLg))
 * After a manual replacement of the image thumbnail, my website show the image 
   correctly (see [https://goo.gl/2KycJ6](https://goo.gl/2KycJ6))
 * Note that the inserted pdf that cause the problem are not password protected (
   see example here [https://goo.gl/VmAvPd](https://goo.gl/VmAvPd))
 * I checked the log of my websites and did not noticed new entries.
 * Could you please assist me to resolve this problem?
 * Cordially,
    Mohamed

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [stianlik](https://wordpress.org/support/users/stianlik/)
 * (@stianlik)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8256410)
 * I can try. Do you have a PDF available for testing? It’s hard to pinpoint the
   reason before I’m able to reproduce the problem. It could be related to the file
   size, is this a large PDF? The code I use to generate a thumbnail is as follows:
 *     ```
       $imagick = new Imagick($filename);
       $imagick->setIteratorIndex(0);
       $imagick->setImageFormat('jpg');
       return $imagick->getImageBlob();
       ```
   
 * Other than that, it’s mostly just code to update metadata for WordPress, not 
   directly related to image generation.
 * Image generation can be overridden by the `pdf_thumbnails_generate_image_blob`
   filter as described under developer API for this plugin. If you feel confident
   coding PHP, I suggest using that filter and see if you can figure out how Imagick
   handles the uploaded files that are failing, maybe you can get some useful debugging
   information from there.
    -  This reply was modified 9 years, 6 months ago by [stianlik](https://wordpress.org/support/users/stianlik/).
 *  Thread Starter [mohamed.belhassen](https://wordpress.org/support/users/mohamedbelhassen/)
 * (@mohamedbelhassen)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8259374)
 * Dear stianlik,
 * In my post, I have already given a sample of pdf that generates the problem (
   third link).
    As you can see it is a small file (less than 1 MB).
 * Cordially,
    Mohamed Belhassen
 *  Plugin Author [stianlik](https://wordpress.org/support/users/stianlik/)
 * (@stianlik)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8402270)
 * Than you. I can confirm that I’m getting the same error on my side. Will look
   into the issue.
 *  Plugin Author [stianlik](https://wordpress.org/support/users/stianlik/)
 * (@stianlik)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8402374)
 * The problem is that the PDF does not have a background, and the transparency 
   is rendered as black. I did not find any good solutions to handle this type of
   PDF, other than saving the PDF with a white background before uploading. You 
   can observe the same problem by using ImageMagick in the command line:
 * \`
    convert 275_tp1_integration_web_statique_html_css.pdf[0] foo.jpg `
 * Currently, it does not seem to be a good solution that handles these PDFs using
   imagick. I was able to avoid the issue by opening the file in a PDF-editor and
   setting page background to white. Marking the issue as resolved.
 *  Thread Starter [mohamed.belhassen](https://wordpress.org/support/users/mohamedbelhassen/)
 * (@mohamedbelhassen)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8402388)
 * Dear Stialik,
 * Coould you please mention the name of the PDF editor that let us modify the backgroud?
   
   I am using Foxit Reader but no similar option is available.
 * Cordially,
    M.B
 *  Plugin Author [stianlik](https://wordpress.org/support/users/stianlik/)
 * (@stianlik)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8402488)
 * For the first test, I opened the file using LibreOffice, set background to white
   and saved the file. However, LibreOffice did not handle the PDF too well, some
   of the text got scrambled. It looks like the PDF originally was generated using
   Word, so it may be possible to fix the background using Word.
 * In my second test, I simply opened the PDF using [Evince](https://wiki.gnome.org/Apps/Evince),
   and chose print to PDF, and uploaded the “printed” file. Evince gave good results.
   I’m testing on Linux, but I assume there is similar functionality in Windows 
   or OSX.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘program generates blank thumbnails’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pdf-thumbnails.svg)
 * [PDF Thumbnails](https://wordpress.org/plugins/pdf-thumbnails/)
 * [Support Threads](https://wordpress.org/support/plugin/pdf-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/pdf-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pdf-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pdf-thumbnails/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [stianlik](https://wordpress.org/support/users/stianlik/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/program-generates-blank-thumbnails/#post-8402488)
 * Status: resolved