Everything worked well on version 5.6.0. After updating to 6.0.1, some PDFs started to produce incorrect thumbnails.
After some debugging I have found that $pdf->setLayerMethod(NULL)
is the reason. When it's commented out, the thumbnail looks good again:
I was really curious why it worked on version 5.6.0. It turned out that it worked by accident 😅 This line was always erroring (imagick couldn't read the doc), and the catch
block did not include setLayerMethod
.
Try to make a thumbnail for the attached invoicesample.pdf file.
Delete $pdf->setLayerMethod(NULL)
?
Active
6.0
Code