Headless PDFKit
The PDFKit package makes use of wkhtmltopdf, which in turn needs an X Server to run. In Debian land, this generally requires xvfb-run wrapper.
The headless_pdfkit package tries to make the hotfix proposed by jakewins a bit easier to work with.
Installation
You can install headless_pdfkit by running:
pip install headless-pdfkit
Examples
Save a simple PDF from string.:
from headless_pdfkit import generate_pdf
ret = generate_pdf('<html></html>')
with open('output.pdf', 'wb') as w:
w.write(ret)
Save a simple PDF from string while passing the –auto-servernum parameter to xvfb-run.:
options = {
'auto_servernum': ''
}
ret = generate_pdf('<html></html>', options=options)
with open('output.pdf', 'wb') as w:
w.write(ret)
Metadata
Release files for headless-pdfkit 0.1.5
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 |
|---|---|---|---|---|
| headless_pdfkit-0.1.5.tar.gz | 2.0 kB | Without provenance | Details for headless_pdfkit-0.1.5.tar.gz |
Release files / headless_pdfkit-0.1.5.tar.gz
| Download URL | headless_pdfkit-0.1.5.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2fd24c5ca8b51d5f55aae3732010824b568c2de4141ca9853e7bf6169c194250
|
|
BLAKE2b-256 checksum How to use checksums |
b4f18122c31a21be0fb29e2e609d31493bd910240c990faf78676fe357b0d7bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for headless-pdfkit 0.1.5
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.