Skip to main content

A headless version of pdfkit which makes use of xvfb-run

Project description

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.:

ret = headless_pdfkit.generate_pdf('<html></html>')
with open('output.pdf', 'wb') as w:
    w.write(ret)

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

headless_pdfkit-0.1.3.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file headless_pdfkit-0.1.3.tar.gz.

File metadata

File hashes

Hashes for headless_pdfkit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6c29e984025d458ad110e5795b59581a8c2536b345323374e0fe1138bf212390
MD5 d04617aba63a2602af7500326b0968a8
BLAKE2b-256 aeb7b48f852005341f0aacbd1bd5b3b6f253d311f50482523a0e7edf1057282e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page