Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active July 18, 2023 06:22
Convert HTML Files to PDF in Python
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