Create a pdf using Python. Explanation in this Medium article.
This project create a receipt in PDF using 'PyFPDF' Library and
Python. PyFPDF is a library for PDF document generation under
Python, ported from PHP 'FPDF', a well-known PDFlib-extension
replacement.
To include font in languages other than English, we use the
extended version 'tFPDF' library that adds UTF-8 support.
To use a new font, add the font.ttf file in './font/unifont/'
and call the font using add_font in main.py. Please take
note that not all font is compatible and able to be used
with 'tFPDF'.
You can find the documentation of PyFPDF and tFPDF here:
$ git clone https://github.com/Techyhans/pdf-python.git
- Install PHP
$ pip install fpdf
$ python sample.py