Fixed the above error on your site and in the next release.
There were a number of issues here:
- The exception was not properly caught for sites that once did but no longer support PDF as an image type (i.e. Imagick or GhostScript are missing).
- The code used to read the PDF for resizing was incorrect.
- The code used to resize the PDF was incorrect, leading to a thumbnail the same size as the original.
- In general, we try to generate thumbnails in the same file-type as the original file. However, since browsers don't render PDFs (and some other "image" types) as images, the thumbnail needed to be changed to a different file-type.
- The main attachment page displays the full image. However, since browsers don't render PDFs inline, a "thumbnail" in a format supported by browsers at the full resolution of the PDF was needed. This also required a change to the vw_attach_main template. Likewise, this will require a change to the FILE BB-Code. The FILE BB-Code should behave the same as a non-image type when used without the "thumb" argument for files that the browser cannot natively render as images.
- The current version of the attachment display script uses only the width argument to locate and generate thumbnails. However, Imagick will not generate thumbnails if no height is provided. This required refactoring some of vw_Asset_Controller. Additionally, the previous behavior allowed some thumbnails to occasionally exceed thumbnail height rules.
- When PDFs are uploaded, they incorrectly have their heights recorded as 0. In some cases, any file type could have its uploaded width recorded using its original height. Again, Imagick doesn't work if no or a zero height is provided. For the most part, this will require an upgrade script to fix.
I am still working on some of these related issues. This report will not be marked fixed until they are all handled appropriately.