Skip to main content

Wkhtmltopdf API Wrapper

Project description

Wkhtmltopdf API Wrapper

wkhtmltopdf-api Command Line Tool

PyPI PyPI

In short, the script acts as a wrapper for Wkhtmltopdf. It replaces the local binary and transfers the job of generating pdf files to an external api.

Installation

Install from PyPI:

pip install wkhtmltopdf-api

Configuration

Environment vars

  • REPORT_API_URL: str, required

  • REPORT_API_TIMEOUT: seconds, default 300

  • REPORT_API_SIZE_LIMIT: bytes, default 100000000 (100mb)

  • WKHTMLTOPDF_VERSION: str, default 0.12.6

Usage

Same as wkhtmltopdf, see options : https://wkhtmltopdf.org/usage/wkhtmltopdf.txt

wkhtmltopdf-api --disable-local-file-access --cookie session_id abcd --quiet --page-size A4 --margin-top 40.0 --dpi 90 --zoom 1.0666666666666667 --header-spacing 35 --margin-left 7.0 --margin-bottom 28.0 --margin-right 7.0 --orientation Portrait --header-html /tmp/report.header.tmp.xxx.html --footer-html /tmp/report.footer.tmp.xxx.html /tmp/report.body.tmp.xxx.html /tmp/report.tmp.xxx.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

wkhtmltopdf-api-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

wkhtmltopdf_api-0.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file wkhtmltopdf-api-0.0.1.tar.gz.

File metadata

  • Download URL: wkhtmltopdf-api-0.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for wkhtmltopdf-api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f55a9d85adc72a4c76a28cc968f9b76d66a1cb52289b04e755ee2279c07af3b9
MD5 503b511fb79102e7259f2b789c229c13
BLAKE2b-256 feec878ea78a983ab7fd35d67b74fa63a409b1c849e0e2a9df8fd1f51a177d15

See more details on using hashes here.

File details

Details for the file wkhtmltopdf_api-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wkhtmltopdf_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb25b36f1329cce3368298ca78b0cc8ddc42d363911cf48210c358379229536
MD5 6aa90465ec2f30ce2a855aefbb84350a
BLAKE2b-256 162f09efd427dc1643e009d9bdcbd2e8653386c1193aff7d439f585c94e804ce

See more details on using hashes here.

Supported by

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