Thursday, December 29, 2016

Create PDF from Python

I was googling for a python library that I can use to write strings to a PDF file but mostly I found out programs to copy data from one PDF and write it to another PDF, another programs and solutions I found were for editing existing PDF, it was not what I was looking for.

I wanted to create a PDF from scratch.

After hours of searching finally I found my solution when I arrived on this page by David Fischer and it just uses one module called reportlab.

Code is share via this gist on my GitHub.