Skip to content

Instantly share code, notes, and snippets.

@cgopalan
Created February 13, 2018 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgopalan/3dd23eaddb7a54f2d16671eb8347b83e to your computer and use it in GitHub Desktop.
Save cgopalan/3dd23eaddb7a54f2d16671eb8347b83e to your computer and use it in GitHub Desktop.
Convert list of html files to one pdf
import pdfkit
# Fill this list with the html pages you want to be converted
file_list = []
# Disable links since some point to local hard drive and dont work
pdfkit.from_file(file_list, "generatedpdf.pdf", options={"disable-external-links": None, "load-error-handling": "ignore"})
@oquidave
Copy link

Hello cgopalan, could you be having a link to the downloadable offline pdf version?

@cgopalan
Copy link
Author

Hello, sorry just saw this. You could probably get it from the PR I created to add the file (which is closed), but it is probably outdated. Here it is if you want it: https://github.com/mmcgrana/gobyexample/pull/196/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment