The pure Python PyFPDF library is a lightweight way to create PDFs, including maps. Because the PDF format is a widely used standard, PDFs are commonly used to distribute maps. You can install it via PyPI as fpdf. The official name of the software is PyFPDF because it is a part of the PHP language module called fpdf. This module uses a concept called a cell to lay items out at specific locations on a page. As a quick example, we'll import the hancock.png image we created from the PIL example into a PDF called map.pdf to create a simple PDF map. The map will have the header text at the top that says Hancock County Boundary, followed by the map image:
>>> import fpdf
>>> # PDF constructor:
>>> # Portrait, millimeter units, A4 page size
>>> pdf=fpdf.FPDF("P", "mm", "A4")
>>> # create a new page
>...