Read the complete article on how to generate PDF from HTML in Python: https://blog.aspose.com/words/generate-pdf-from-html-in-python/
Last active
July 18, 2023 06:22
Convert HTML Files to PDF in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aspose.words as aw | |
# Load the HTML file from disk | |
doc = aw.Document("Document.html") | |
# Save HTML as PDF | |
doc.save("html-to-pdf.pdf") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment