-
-
Notifications
You must be signed in to change notification settings - Fork 124
Add WKHTMLTOPDF for use in .env file if desired #28
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
Conversation
please merge this! |
just did a pull, added the env variable to use wkhtmltopdf, stop/rm and recreated the container, re-added an external font that was breaking PDF exports with the default PDF generation tool, exported and it is working great. Thank you for this work. 👍 |
Thanks for merging. I deployed the new tag on my main instance this evening and updated my environment variables to enable WKHTMLTOPDF. It's working great except I'm seeing some strange background issues. This might be an upstream issue with BookStack itself that @ssdanbrown might be able to pinpoint more easily. The issue is that the background of the page below the content is a grey colour when it should remain white. I wasn't seeing this when I was testing the changes in this PR during development, but the redesign work has since been merged. |
@cw1998 - I don't see that on my end - do you have any custom CSS? My code blocks look different in the PDF vs. on the webpage, but I am using custom CSS styling for those, so I suspect the issue is parsing some CSS. |
Had a bit of a closer look. I exported the page as contained HTML and saw the same thing. The background of the content is white, but the background of the HTML element itself is the light grey seen in the image. The same light grey that surrounds a page on BookStack itself. I don't have any custom CSS, so I'm now looking to see if this happens on a clean instance of BookStack. |
BookStack has built-in support for
wkhtmltopdf
, but it must be installed on the system or be added to the application directory.This PR adds the dependencies and
wkhtmltopdf
itself from the alpine test repo.Users of the image can then modify their instance's
.env
file to use wkhtmltopdf instead as described in the BookStack documentationIE:
WKHTMLTOPDF=/usr/bin/wkhtmltopdf