PaPDF
Python library to create PDF
Features:
- Basic text writing with TrueType font embedding (including propper font subsetting)
- Image insertion (JPEG images and PNG with transparency images support)
- EAN13 barcode insertion
Installation:
Use pip3for the installation of PaPDF:
pip3 install PaPDF
Simple usage example:
The following snippet will create a pdf (test.pdf) with two pages and two
texts.
from PaPDF import PaPDF
with PaPDF("test.pdf") as pdf:
pdf.addText(40, 290, "Hello world")
pdf.addPage()
pdf.addText(40, 10, 'Hello world')
TrueType font embedding:
More advanced example with the usage of a (subsetted) TrueType font. Basically the same example as above but with a custom font, loaded from a font file.
from PaPDF import PaPDF
with PaPDF("test.pdf") as pdf:
pdf.addTrueTypeFont("<FontUserName>", "/path/to/font.ttf")
pdf.currentFontName = "<FontUserName>"
pdf.addText(40, 290, "Hello world")
pdf.addPage()
pdf.addText(40, 10, 'Hello world')
Adding EAN13 Barcode:
Adding a barcode is pretty straight forward. Warning: make sure the last digit checksum is correctly computed, when calling the addEAN13() function.
from PaPDF import PaPDF
with PaPDF("barcode.pdf") as pdf:
pdf.addText(20, 250, "Simple EAN13 barcode example:")
pdf.addEAN13(20, 225, "4012345123456")
Metadata
Release files for PaPDF 1.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PaPDF-1.1.8.tar.gz | 25.2 kB | Without provenance | Details for PaPDF-1.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PaPDF-1.1.8-py3-none-any.whl | Python 3 | none | any | Details for PaPDF-1.1.8-py3-none-any.whl |
Total release size: 50.5 kB
Release files / PaPDF-1.1.8.tar.gz
| Download URL | PaPDF-1.1.8.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
64d1416def178f45846eb6f1da300631e7a55d22c31046d2c78736d1e8a74c76
|
|
BLAKE2b-256 checksum How to use checksums |
e3ad6aabfd377c00a87a42303227028a83c49919451221cb1579cd6c772549d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / PaPDF-1.1.8-py3-none-any.whl
| Download URL | PaPDF-1.1.8-py3-none-any.whl |
|---|---|
| Size | 25.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4c04a8e0d8b7ef32b5d0932184225951a27f9b0346b511467089a228e18835d
|
|
BLAKE2b-256 checksum How to use checksums |
e992cfd2a5cff4fb61c24f0e7685ee9ccc1ce71942dec314cf5076b5266d0619
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for PaPDF 1.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.