Post ATJoKUA6IdGrnhZY36 by philipp@social.anoxinon.de
(DIR) More posts by philipp@social.anoxinon.de
(DIR) Post #ATIXyuGEcyfuosyDGi by a@social.exozy.me
2023-03-05T07:19:12Z
0 likes, 0 repeats
I'm writing something in Markdown and converting it to a PDF using pandoc with the wkhtmltopdf backend, and outrageously, wkhtmltopdf doesn't support emojis!!! 😱I switched to the WeasyPrint backend and it's slower but now I can 🎉🚀😎🍰 all I want.
(DIR) Post #ATIdAZ1DvlRuBUKK9Y by computersandblues@post.lurk.org
2023-03-05T08:17:18Z
0 likes, 0 repeats
@a wkhtmltopdf is also unmaintained iirc? i used it to print html mails to pdf and switched to weasyprint as well
(DIR) Post #ATIv2yjeEQnenidelM by philipp@social.anoxinon.de
2023-03-05T11:37:37Z
0 likes, 0 repeats
@a I read bad things about pdf (accessibility, file size etc) and wonder what the alternatives are. Why do you use pdf?
(DIR) Post #ATJTiHmbsShpJx5n3Q by computersandblues@post.lurk.org
2023-03-05T08:18:24Z
0 likes, 0 repeats
@a just checked, when i run `nix run nixpkgs#wkhtmltopdf -- --help` i get the following message: "QtWebkit upstream is unmaintained and receives no security updates, see https://blogs.gnome.org/mcatanzaro/2022/11/04/stop-using-qtwebkit/"
(DIR) Post #ATJTiINpe4TpBOVW4W by a@social.exozy.me
2023-03-05T18:06:04Z
0 likes, 0 repeats
@computersandblues Yes, that's right. I still use (a 2020 build of) wkhtmltopdf for some old Markdown+style.css files, since WeasyPrint renders things differently such as making fonts look twice as big, but I'll have to migrate to it someday.
(DIR) Post #ATJU4xGILCHGKsmpt2 by a@social.exozy.me
2023-03-05T18:10:11Z
0 likes, 0 repeats
@philipp I think PDF gets a bad rap because it is a very complicated format and easy to abuse. (ex: https://github.com/osnr/horrifying-pdf-experiments)However, my pandoc-generated PDFs contain basically only text, with an image as the cover page, so the file size and accessibility is fine. Also, PDF is widely supported everywhere.I guess if you really care about file size and accessibility, you could also read the raw Markdown files.
(DIR) Post #ATJoKUA6IdGrnhZY36 by philipp@social.anoxinon.de
2023-03-05T21:57:04Z
0 likes, 0 repeats
@a this sounds scary 😮. I always thought about .docx files when it comes to vulnerabilities, not .pdf. Raw markdown might be something I will look into, it would play nicely as I love obsidian. Im a web designer and most of my clients offer pdf downloads like whitepapers on their websites. These files are not accessible, so I try to find alternatives that I can recommend. Making them accessible is also an option, but it takes them too long I think.
(DIR) Post #ATLtT1Dk9yLija5IW0 by a@social.exozy.me
2023-03-06T22:04:04Z
0 likes, 0 repeats
The only redeeming factor about wkhtmltopdf is that it's 🚀 fast (which it would render as □🚀), but WeasyPrint is really superior in every other way.I finally finished tweaking all my Markdown stylesheets to look good with WeasyPrint. I guess the whole reason I originally went down the wkhtmltopdf path is because that's the default in pandoc, but defaults aren't always the best.
(DIR) Post #ATLtTrZVWIej68fPeq by a@social.exozy.me
2023-03-06T22:04:17Z
0 likes, 0 repeats
The only redeeming factor about wkhtmltopdf is that it's 🚀 fast (which it would render as □ fase), but WeasyPrint is really superior in every other way.I finally finished tweaking all my Markdown stylesheets to look good with WeasyPrint. I guess the whole reason I originally went down the wkhtmltopdf path is because that's the default in pandoc, but defaults aren't always the best.
(DIR) Post #ATLtUVz5GcskR2wP4q by a@social.exozy.me
2023-03-06T22:04:25Z
0 likes, 0 repeats
The only redeeming factor about wkhtmltopdf is that it's 🚀 fast (which it would render as □ fast), but WeasyPrint is really superior in every other way.I finally finished tweaking all my Markdown stylesheets to look good with WeasyPrint. I guess the whole reason I originally went down the wkhtmltopdf path is because that's the default in pandoc, but defaults aren't always the best.
(DIR) Post #ATLtep5Z5kkUaBt6OW by a@social.exozy.me
2023-03-06T22:06:14Z
0 likes, 0 repeats
And don't get me started on using LaTeX as the pandoc intermediary format. HTML/CSS is annoying and all, but with LaTeX you're basically surrendering all control over appearance (which is fine for writing math).
(DIR) Post #ATjE3aOGFMRa4epugC by a@social.exozy.me
2023-03-18T04:13:08Z
0 likes, 0 repeats
@computersandblues Apparently one of my professors uses wkhtmltopdf. (this is a practice exam from a previous year)
(DIR) Post #ATjS6fCaDE7JDxjg1o by computersandblues@post.lurk.org
2023-03-18T06:50:32Z
0 likes, 0 repeats
@a send a prayer to the frugal computing deities whenever somebody fires up webkit to produce a pdf from a text file https://limited.systems/articles/frugal-computing/