Add option use_xvfb
to emulate an X server
#909
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
so I really struggled to get
wkhtmltopdf
(which is obviously used bywicked_pdf
) working without having an X server running on my virtual server. Unfortunately, the best solution I found, was to wrap allwkhtmltopdf
around thexvfb-run
command which is - from my understanding - emulating an X server for systems where a real X server is not available. Doing so, made my PDF's generating normally again.I'm not really sure whether there's any better solution. I didn't find anything working so far besides the approach I'm following.
As there are many topics/issues about generating PDF's without an X server being available, I decided to propose my code changes to
wicked_pdf
. Let's discuss whether this is a good approach or if you see anything else, which seems to be more suitable.Commit Message:
On some systems an X server is not available, and thus a PDF generation
is not possible. This can be avoided when installing
xvfb-run
whichemulates an X server.
Enabling the
use_xvfb
option will wrap anywkhtmltopdf
commandsaround the command
xvfb-run
, in order to be able to create PDF's, evenwithout having an X server running.