1

Is it possible to auto-generate PDF preview images with Craft 3 transforms?

Or are there any Craft 3 plugins that do this? I see a few Craft 2 versions.

1

Craft 3 doesn't do this natively and I'm not seeing any existing Craft 3 plugins that would do this, so at the moment, you'd need to write your own.

3

I created a plugin specifically to do this - https://github.com/bymayo/craft-pdf-transform

It takes Asset PDF files and coverts them to JPEG / PNG files automatically when they are uploaded.

Or, do theres a Twig method that lets you convert the PDF to an image if the image already exists in Assets. But this can be a bit labour intensive on the server to do when a template is rendering so is only advised for small files.

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.