Skip to main content

Plankton - wkhtmltopdf REST service

Project description

# Plankton - html to pdf REST service

Uses wkhtmltopdf as backend. Only works with python 3.5 or greater.

Enspired by: https://github.com/openlabs/docker-wkhtmltopdf and https://github.com/incuna/django-wkhtmltopdf.

## Installation 1. `pip install plankton` 2. download and install wkhtmltopdf http://wkhtmltopdf.org/downloads.html. 3. Run server```plankton-server```

If you want to run in docker container:

  1. Clone repo `git clone git@github.com:django-stars/plankton.git`

  2. `cd plankton`

  3. Build docker image `docker build -t plankton .`

  4. Run container `docker run -p 9003:8080 plankton`.

You can specify wkhtmltopdf command and port: `plankton-server --wkhtmltopdf_command '/usr/local/bin/wkhtmltopdf' --port 9000`

## Usage

POST `http://127.0.0.1:9003/html-to-pdf/`

DATA `{"page": "http://google.com.ua"}`

You can provide wkhtmltopdf options:

DATA `{"page": "http://google.com.ua", "options": {"javascript-delay": 2000, "cookie": [["key1","val1"], ["key2", "val2"]]}}`

## TODO Project currently under developing and there are lot of things to do:

  1. debug mode

  2. HTTP OPTIONS

  3. logging

  4. security

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

plankton-0.1.2.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file plankton-0.1.2.tar.gz.

File metadata

  • Download URL: plankton-0.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for plankton-0.1.2.tar.gz
Algorithm Hash digest
SHA256 672c76b0984c4980652027868736e0771758fa10a96045a995362223ff738208
MD5 74e0946efb03ef019b2f5f280a964fd8
BLAKE2b-256 ab9ec8b1f11cd1826ac8221c53d9edd14232cc91954db5fc8a3ed5b7c73e816e

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