xl-pdf
PDF stamp and manipulation utilities using PyMuPDF.
Installation
pip install xl-pdf
Usage
from xl_pdf import PDFStampAdder
# 从文件路径或bytes创建PDFStampAdder
adder = PDFStampAdder("input.pdf")
# 或
adder = PDFStampAdder(pdf_bytes)
# 添加印章
adder.add_stamp_to_pdf("stamp.png", scale_height=50, page_num=0, x=100, y=100)
# 添加文字
adder.add_text_to_pdf("Hello World", page_num=0, x=100, y=200, font_size=20)
# 添加二维码
adder.add_qrcode_to_pdf("https://example.com", size=100, page_num=0, x=100, y=300)
# 保存PDF
adder.save("output.pdf")
# 或获取bytes
pdf_bytes = adder.bytes
Features
- Add stamps to PDF pages
- Add text to PDF pages
- Add QR codes to PDF pages
- Add cross-page stamps (骑缝章)
- Search and add stamps/text around specific text
- Compress images automatically
- Export to file or bytes
Metadata
Release files for xl-pdf 0.1.1
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 |
|---|---|---|---|---|
| xl_pdf-0.1.1.tar.gz | 3.7 kB | Without provenance | Details for xl_pdf-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xl_pdf-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xl_pdf-0.1.1-py3-none-any.whl |
Total release size: 7.9 kB
Release files / xl_pdf-0.1.1.tar.gz
| Download URL | xl_pdf-0.1.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9afcea3f495818c8ea2124fe9d7b02f59bfc688903293e96e2d3e89ab38d7367
|
|
BLAKE2b-256 checksum How to use checksums |
fe8ea0950ab61d45c56bcb47f7e0d6810b9091a82a31c06872010ad53d582634
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Release files / xl_pdf-0.1.1-py3-none-any.whl
| Download URL | xl_pdf-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fd8557c154121b91fbd860e92cda054faecb8b158ca2f11c3da97bb6b6e842d
|
|
BLAKE2b-256 checksum How to use checksums |
bbd940df344ac9a9a372e59531cbd91f3aef58464a8840090e5d8f7533682188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Security for xl-pdf 0.1.1
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.