Custom thumbnail

I’m currently converting PDFs to JPEG via getThumbnail and embedding them into HTML which I then print via puppeteer. I just discovered today that the thumbnail conversion only does the first page. I can easily convert them all via Imagemagick, but it would be preferable if I could add a transformation versus manually converting all the PDFs to JPEG and then loading them back into the PIM. Can I create a custom transformation?

BTW, I see Adding Custom Callbacks / Transformations / Filters in the docs; however, the explanation and example are completely without context. Is this supposed to be in my Controller that renders the thumbnail config? How does the code get called in a more bootstrap way?

to render other pages than the first page see Asset Document Thumbnails - it’s just an additional parameter.

Concerning custom callbacks - this code needs to live somewhere in your application, either in the controller, or in a service, or in a command - depending on where you need it.