0

I have installed and setup PDFPreview module according to the instructions. The PDF attachment file name has disappeared from the article pages with nothing in its place. When I examined the HTML, there's an img tag pointing to the preview image, but it doesn't work.

When I access the preview image directly, it produces a 500 error with a (translated) error message indicating an error while producing the image. The Drupal log at Reports > Recent log messages contains the error message

Unable to generate the derived image located at public://styles/medium/public/pdfpreview/3b350fd949abe27c0778b0f857ffa352.jpg.

I found this error report and tried the steps instructed in message #2. I created the directory sites/default/files/styles/medium/public/pdfpreview/, have tested directory permissions up to 777, and tried switching the 'Image style' preference back and forth with no success. The web server has ImageMagick 6.7.7-10 installed.

I have no idea how to even debug the issue further. The Apache error logs contain nothing, and the Drupal error message doesn't provide any indication on what has caused the failure.

How can I further debug the issue?

Detailed Drupal error log: Drupal error message

(I have since reverted the configuration, so that users at least have the file name link visible.)

2

Its possible that there is an issue with ImageMagick.

  1. Check your Drupal status report. Does it show any issues? Check the Image Toolkit page at admin/config/media/image-toolkit. Does it show any issues?

  2. Check your PHP error log. More detail or a stacktrace may have been logged there.

| improve this answer | |
  • I fixed two issues from the report, no avail. I tried changing image-toolkit to use ImageMagick instead of GD2, no change. It's a hosted environment and I don't have access to any other logs than the Apache error logs that contain nothing. – Sampo Mar 22 '14 at 14:49
1

According to this thread, if you visit the configuration page of PDFPreview at admin/config/media/pdfpreview first and click Save, even if you haven't changed anything, it will work. It did in my case.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.