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.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

wkhtmltopdf_api-0.0.2-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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