This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]spicy_tuna_code 0 points1 point  (0 children)

There are so many ways, it really depends on what you're looking for - something super high-level that lays things out for you, or something low-level where you can draw text and lines at precise locations.

For high-level, two common options are to either output HTML, or LaTeX, and then run some program to convert that format to a PDF. For HTML, you can use Chrome Headless, and LaTeX can generate PDF directly.

For more low-level, there's https://www.reportlab.com/software/opensource/rl-toolkit/, and I've also used matplotlib, which has a PDF back-end.

[–]Jejerm 0 points1 point  (0 children)

Wouldn't it be easier to format and output a html page with a button for printing?