October 2013
Beginner to intermediate
364 pages
8h 8m
English
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 layout items at specific locations on a page. As a quick example, we'll import our hancock.png image created from the PIL example into a PDF called map.pdf to create a simple PDF map. The map will have 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", ...Read now
Unlock full access