Created
April 23, 2014 03:54
-
-
Save luxinyan/11202273 to your computer and use it in GitHub Desktop.
python generate pdf with reportlab.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is a simple code for generate pdf with reportlab. | |
More information:http://www.reportlab.com/software/opensource/rl-toolkit/faq/ | |
''' | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.units import cm | |
my_pdf = canvas.Canvas("hello.pdf") | |
my_pdf.drawString(9*cm, 22*cm, "Hello World!") | |
my_pdf.showPage() | |
my_pdf.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment