6
Pandoc (lemmy.ml)
submitted 6 months ago by Kcg@lemmy.ml to c/markdown@lemmy.ml

I've had great fun working with converting md files to PDF with pandoc. Only annoying element is that it needs a pdflatex engine to be installed also.

top 3 comments
sorted by: hot top controversial new old
[-] 56_@lemmy.ml 1 points 6 months ago

PDF generation can also be done via HTML using wkhtmltopdf or weasyprint. Wkhtmltopdf isn't able to handle internal links correctly (those beginning with a # in html), so the table of contents doesn't work. Weasyprint does this correctly, but it doesn't handle numbered lists not starting at 1. My project requires both, as well as special unicode characters which latex can't handle, so I'm looking for some additional tool to convert from HTML to PDF correctly.

[-] Kcg@lemmy.ml 1 points 6 months ago

Sounds great must give it a look!

[-] 56_@lemmy.ml 1 points 6 months ago

re-reading my comment, it seems I forgot to point out that these are pdf engines for pandoc, and can be used with --pdf-engine=wkhtmltopdf or --pdf-engine=weasyprint once you have installed the correct dependencies.

this post was submitted on 23 Mar 2024
6 points (100.0% liked)

Markdown users

35 readers
2 users here now

founded 6 months ago
MODERATORS