I'm looking for a way to output a VERY simple pdf file from Python. Basically it will consist of two columns of words, one in Russian (so utf-8 characters) and the other in English.
I've been googling for about an hour, and the packages I've found are either massive overkill (and still don't provide useful examples) such as ReportLab, or seem to assume that the only thing anyone would ever do with pdfs is concatenate several of them together (PyPdf, pdfrw).
Maybe I'm just missing something obvious, but all the ones I've seen seem to launch into some massive discussion about taking 17 pdf files and converting them into a 60 foot wide poster with 23 panes (slight exaggeration maybe), and leave me wondering how to get the "Hello World" program working. Any help would be appreciated.
Fortunately, the Python ecosystem has some great packages for reading, manipulating, and creating PDF files. In this tutorial, you'll learn how to: Read text from a PDF.
Open Acrobat and choose “Tools” > “Create PDF”. Select the file type you want to create a PDF from: single file, multiple files, scan, or other option. Click “Create” or “Next” depending on the file type. Follow the prompts to convert to PDF and save to your desired location.
You may use wkhtmltopdf. It is a command line utility that uses Webkit to convert html to pdf.
You can generate your data as html and style it with css if you want, then, use wkhtmltopdf to generate the pdf file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With