Skip to content

Instantly share code, notes, and snippets.

@zallarak
Last active August 29, 2015 14:24
Show Gist options
  • Save zallarak/b7b6c0c66c141ed7672c to your computer and use it in GitHub Desktop.
Save zallarak/b7b6c0c66c141ed7672c to your computer and use it in GitHub Desktop.
pdf_example.py
import pdfkit
pdfkit.from_file('test.html', 'out.pdf')
# Generating PDFs from strings and web-pages is equally easy:
pdfkit.from_string('Hello!', 'out.pdf')
pdfkit.from_url('http://google.com', 'out.pdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment