Skip to content

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

Merged
merged 2 commits into from
Jun 14, 2019

Conversation

cnfw
Copy link
Contributor

@cnfw cnfw commented Apr 23, 2019

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 documentation

IE: WKHTMLTOPDF=/usr/bin/wkhtmltopdf

@cnfw cnfw mentioned this pull request Apr 23, 2019
@LinuxServer-CI
Copy link
Collaborator

@mainmachine
Copy link
Contributor

please merge this!

@LinuxServer-CI
Copy link
Collaborator

@aptalca aptalca merged commit 9a12c05 into linuxserver:master Jun 14, 2019
@cnfw cnfw deleted the feature/wkhtmltopdf branch June 14, 2019 21:43
@mainmachine
Copy link
Contributor

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. 👍

@cnfw
Copy link
Contributor Author

cnfw commented Jun 14, 2019

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.

image

@mainmachine
Copy link
Contributor

@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.

@cnfw
Copy link
Contributor Author

cnfw commented Jun 22, 2019

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.
background-color: #F2F2F2;

I don't have any custom CSS, so I'm now looking to see if this happens on a clean instance of BookStack.

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

Successfully merging this pull request may close these issues.

5 participants