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

Docker - wkhtmltopdf doesn't render headers #349

Closed
pofider opened this issue Oct 10, 2017 · 6 comments
Closed

Docker - wkhtmltopdf doesn't render headers #349

pofider opened this issue Oct 10, 2017 · 6 comments
Labels

Comments

@pofider
Copy link
Contributor

pofider commented Oct 10, 2017

The wkhtmltopdf recipe doesn't render headers after the dockerfile changes introduced in 1.8.0

The debug message stays

wkhtmltopdf --debug-javascript --disable-local-file-access --margin-top 30mm --header-spacing 10 --header-html file:////tmp/jsreport-temp/f5228280-ada8-11e7-98b4-b915cd663418header.html /tmp/jsreport-temp/f5228280-ada8-11e7-98b4-b915cd663418.html /tmp/jsreport-temp/f5228280-ada8-11e7-98b4-b915cd663418.pdf
+484 The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.Loading page (1/2)
`

We should likely use the wkhtmltopdf installed through npm instead from the one from apt-get.

@pofider pofider added the bug label Oct 10, 2017
@pofider
Copy link
Contributor Author

pofider commented Oct 10, 2017

@notatestuser @bjrmatos Does any of you please remember what was the reason for installing the wkhtmltopdf through apt-get instead of the npm in the full docker image? I mean this line Merged through this PR. It seems that the wkhtmltopdf installed through apt-get doesn't support headers for some reasons.

@bjrmatos
Copy link
Collaborator

i think there was not a good reason and it was just a mistake, according to the docker file we also install jsreport-wkhtmltopdf so i'm not sure why that change, probably just mistake.

does removing that line makes it work normally again (since it would use the wkhtmltopdf of node_modules)?

pofider pushed a commit that referenced this issue Oct 15, 2017
@pofider
Copy link
Contributor Author

pofider commented Oct 15, 2017

It seems it was really a mistake. Removing wkhtmltopdf from apt-get makes the header working. Will be part of the next release.

@pofider pofider closed this as completed Oct 15, 2017
@notatestuser
Copy link
Contributor

notatestuser commented Oct 15, 2017

Please check that it is not being downloaded/installed more than once like that though. That was happening to phantomjs when installed through npm.

Edit: Just concerned about image size 💾

@pofider
Copy link
Contributor Author

pofider commented Oct 16, 2017

@notatestuser Thank you for following here. I did check the image size and the new one is smaller. So it should be even better now. The reason for phantomjs were being installed multiple times is because we depend on it in several packages. This is not the case for wkhtmltopdf where there is only one package installing it.

@notatestuser
Copy link
Contributor

Great, thanks!

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

No branches or pull requests

3 participants