-
Notifications
You must be signed in to change notification settings - Fork 43
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
ReportDialog: replace xhtml2pdf with WeasyPrint. #2034
Comments
@drew-parsons, just to clarify - By "deprecated" do you mean that xhtml2pdf is no longer going to be packaged in future Debian releases? Or that you have inside knowledge that the developer community has abandoned it (granted it seems quite small at the moment). I note that the latest release was only 17 days ago (March 31, 2022) with no evidence on github or PyPi that the project is no longer supported? |
My comment was based mainly on the comment that one of the xhtml2pdf upstream contributors themselves made, "xhtml2pdf is a very stale project", then going on to say "if you are doing something new, start off with WeasyPrint instead as suggested in the README". xhtml2pdf/xhtml2pdf#11 (comment) Apart from that, xhtml2pdf/xhtml2pdf#11 was filed in 2011, eleven years ago and still not fixed. Why would you use a library that fails to render in chinese, or arabic, or, thai ? (it will fail unless you explicitly hack the font used). Especially when there is an alternative recommended by xhtml2pdf authors which does not have that same problem. As for Debian support, the new version of xhtml2pdf switched to PyPDF3, which is not (yet) packaged for Debian. |
Weasyprint looks good. Its pretty big (I guess it needs to be to actually work well) and took a couple of minutes to download using anaconda. |
Hmmm, the default install on anaconda is broken too. I'm going to look for a more minimal option. |
pdfkit requires an external application |
however, xhtml2pdf does not support svg images. |
After playing with this a bit, I think xhtml2pdf is fine, will re-open if it becomes an issue. |
Hi I have really big problems with slavic characters when using xhtml2pdf. I think I tried everything and nothing worked. Could you please help me lol? |
qtgui/Utilities/ReportDialog.py uses xhtml2pdf to generate reports in pdf format.
xhtml2pdf is deprecated (no longer supported) and has operational problems, most egregiously it fails to handle non-latin1 characters, see xhtml2pdf/xhtml2pdf#11 . This places a bad restriction on the usability of sasview reports.
The xhtml2pdf documentation itself says to use WeasyPrint instead.
The text was updated successfully, but these errors were encountered: