Python source to pdf conversion library.
Project description
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')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py2pdf-0.1.3.tar.gz
(6.5 kB
view details)
File details
Details for the file py2pdf-0.1.3.tar.gz
.
File metadata
- Download URL: py2pdf-0.1.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d7f1aafb3ec0fce00559a28550367af21ddbe4c2e5f80cf2d192f65196ea587 |
|
MD5 | 755ebcde8b3418db3baf45aae5a9742d |
|
BLAKE2b-256 | 8beef58749dd0f102f0021f8f5b3bd20367d7cd8001d75202ceedab62fb113c4 |