pyFPDF Hello world example

# Import FPDF class
from fpdf import FPDF

# Create instance of FPDF class
# Add new page. Without this you cannot create the document.
# Set font to Arial, 'B'old, 16 pts.  If you don't declare your font
# parameters you may get some font related errors.
# Put a cell (box) 40 units wide and 10 units tall, 
# beginning from the left margin, and write 'Hello World!' inside it.
pdf.cell(40,10,'Hello World!')
# Output content into a file ('F') named 'hello.pdf'



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s