Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
matthiashamacher opened this issue Jun 8, 2023 · 1 comment · Fixed by #41
Closed

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

matthiashamacher opened this issue Jun 8, 2023 · 1 comment · Fixed by #41
Assignees
Labels
Milestone

Comments

@matthiashamacher
Copy link
Contributor

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
Copy link
Contributor

Fixed by #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants