pimcore / web-to-print-bundle

Web-to-Print community bundle adds web-to-print features to Pimcore documents.
https://pimcore.com/docs/platform/Web_To_Print/
Other
4 stars 12 forks source link

[Gotenberg] Additional Files (Images, CSS, JS) are not applied #32

Closed matthiashamacher closed 1 year ago

matthiashamacher commented 1 year ago

When generating a PDF with additional files they are not applied in the result. It is obvious with Images, after the generation there is just the default no image icon and an outline where the image should have been. I've used the area bricks and templates from the demo project. But CSS Files are also not applied correctly as visible in the screenshots

PDF Page in Editor CleanShot 2023-06-08 at 18 03 16

Resulted PDF CleanShot 2023-06-08 at 18 03 26

I think this is because Gotenberg cannot handle additional files that are not sent via the api. At least I understand the documentation the way that all additional files need to be send via the assets part

I've implemented a possible solution for the assets function and will create a pull request and link it to this issue. But I actually don't really like that solution as it is a little bit hacky so any input would be appreciated. With the implemented changes the pdf is generated correctly with all images and styles:

CleanShot 2023-06-08 at 18 14 57

kingjia90 commented 1 year ago

Fixed by #41