diff --git a/README.md b/README.md index 2f0a6dc..07cd83b 100644 --- a/README.md +++ b/README.md @@ -518,3 +518,9 @@ lob.Check.create( memo = 'Services Rendered' ) ``` + +## Creating a PDF + +We recommed using [python-pdfkit](https://github.com/JazzCore/python-pdfkit) to generate PDFs using HTML input. This depends on having [wkhtmltopdf](http://wkhtmltopdf.org/) installed. + +You can find an example [here](examples/create_pdf.py) diff --git a/examples/create_pdf.py b/examples/create_pdf.py new file mode 100644 index 0000000..3616cd3 --- /dev/null +++ b/examples/create_pdf.py @@ -0,0 +1,30 @@ +import lob +import pdfkit + +lob.api_key = "test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc" # Replace this API key with your own. + +body = """ + +
+ +