22====
33
44
5- |BuildStatus | |codecov | |PyPI | |license |
5+ |BuildStatus | |codecov | |PyPI | |license | | docker |
66
77PDF generation in python using
88`wkhtmltopdf <http://wkhtmltopdf.org/ >`__.
@@ -15,7 +15,7 @@ Currently using **wkhtmltopdf 0.12.4 (with patched qt)**, requires **Python 3.6+
1515Install
1616-------
1717
18- ::
18+ .. code :: shell
1919
2020 pip install python-pdf
2121
@@ -67,20 +67,20 @@ Docker
6767
6868pydf is available as a docker image with a very simple http API for generating pdfs.
6969
70- Simple `POST ` (or `GET ` with data if possible) you HTML data to `/generate.pdf `.
70+ Simple `` POST `` (or `` GET `` with data if possible) you HTML data to `` /generate.pdf ` `.
7171
72- Extra arguments can be passed using http headers; any header starting " pdf-" will
72+ Arguments can be passed using http headers; any header starting `` pdf- `` will
7373have that prefix removed, be converted to lower case and passed to wkhtmltopdf.
7474
7575For example:
7676
7777.. code :: shell
7878
7979 docker run -rm -p 8000:80 -d samuelcolvin/pydf
80- curl -d ' <h1>this is html</h1>' http://localhost:8000/generate.pdf > created.pdf
80+ curl -d ' <h1>this is html</h1>' -H " pdf-orientation: landscape " http://localhost:8000/generate.pdf > created.pdf
8181 open " created.pdf"
8282
83- or in your `` docker-compose.yml `` file
83+ In docker compose:
8484
8585.. code :: yaml
8686
@@ -156,3 +156,5 @@ wkhtmltopdf binary and passed to subprocess with not processing.
156156 :target: https://pypi.python.org/pypi/python-pdf
157157.. |license | image :: https://img.shields.io/pypi/l/python-pdf.svg
158158 :target: https://github.com/tutorcruncher/pydf
159+ .. |docker | image :: https://img.shields.io/docker/automated/samuelcolvin/pydf.svg
160+ :target: https://hub.docker.com/r/samuelcolvin/pydf/
0 commit comments