-
Notifications
You must be signed in to change notification settings - Fork 97
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
stdout of wkhtmltopdf will be added to pdf #19
Comments
It is possible to use |
Sorry for the late reply. Please, can you check if the command generated by the wrapper can be properly used on the command line? You can use the method |
I seem to be running into the exact same problem on: The command im running: As Stepan wrote; the problem is mitigated by adding '-q'... The problem did not occur on OSX so maybe its an wkhtmltopdf problem (it seems like it has had similar bugs before which were supposed to be fixed). BR, |
I have the same problem, but -q flags hide only wkhtmltopdf logs(loading page), libEGL and QPainter logs don't disappear.
Created PDF:
|
I ended up creating a new class that I named Pdf2 and copied the code from the original Pdf class. I added a property for "pdfFileOut" and then in the saveAs set that property. In the build command I then check and if that property is set send it instead of the '-' to the wkhtmltopdf command; this saves the file directly and by-passes the stdout issues. I initially looked into simply subclassing Pdf but some of the key methods are private so it didn't make that much sense to do that - if those methods were protected there would be more flexibility (alternatively a pluggable get command class). |
@rrsdev nice that you were able to solve and posted the solution you've adopted. Thanks! I'll try to fix it in future releases and improve the code to be more flexible. Anyway, pull requests are welcomed =) |
A pull request #53, created by @rrsdev (thanks!), was merged and now we have a method Please, check it out in the release 1.0.10-RELEASE. I've also created a |
When running the following code on Linux, the standard output of wkhtmltopdf will be added to the created pdf. Without xvfb on Windows the created pdf is as expected.
Linux environment:
Ubuntu 14.04.3 LTS
wkhtmltopdf 0.12.2.1 (with patched qt)
Windows environment:
Windows 10
wkhtmltopdf 0.12.4 (with patched qt)
Created PDF
The text was updated successfully, but these errors were encountered: