1
0
Fork
You've already forked py2pdf
0
Minimalistic library to format python source in the style of a2ps.
  • Python 100%
Find a file
2020年08月29日 16:04:33 +02:00
etc Version 0.1.2 2020年08月29日 15:45:03 +02:00
LICENSE Initial commit 2020年08月29日 15:39:29 +02:00
py2pdf.py Improved documentation. 2020年08月29日 16:04:33 +02:00
README Corrected "unicode string" to "string". 2020年08月29日 15:48:12 +02:00
setup.py Version 0.1.3 2020年08月29日 15:50:59 +02:00

py2pdf
======
Description
-----------
py2pdf has one simple purpose: It takes a string with python source 
code and creates a nice looking pdf file. The library is simple and 
self-contained. All pdf generation is done by py2pdf itself. No font 
files are needed.
Quick example
-------------
::
 >>> import py2pdf
 >>> text = open('py2pdf.py').read()
 >>> f = open('tmp.pdf', 'wb')
 >>> py2pdf.create_pdf(
 ... text, f, 
 ... title='py2pdf', 
 ... pagesize=py2pdf.A4,
 ... printed_by='Printed by ME', 
 ... file_date='2020年08月01日')
 >>> py2pdf.startfile('tmp.pdf')