Hmm not sure if that is the best (and for your special case a working) solution but you could convert this pdf to an image (for example with imagick), render it to a route/view, add some div layers / content over the image and then re-take a snapshot pdf for example with the Spatie Browsershot library (https://github.com/spatie/browsershot) from the url.
Oct 1, 2022
2
Level 2
Library to add text and shape to an existing PDF
Hello,
I am looking for a library to add annotations: shapes, images and text to an existing PDF file (from a given page and coordinate).
dompdf seems to be widely used, but I can not find how to use it with an existing PDF.
Do you have any ideas?
Thanks
Please or to participate in this conversation.