Learn how to convert TXT files to PDF in Python: https://blog.aspose.com/2021/11/29/convert-txt-to-pdf-in-python/
Last active
November 29, 2021 08:29
-
-
Save aspose-com-gists/522bdbe7f6cd96ff224502d787c68590 to your computer and use it in GitHub Desktop.
Convert Notepad TXT 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 TXT document | |
doc = aw.Document("document.txt") | |
# save TXT as PDF file | |
doc.save("txt-to-pdf.pdf", aw.SaveFormat.PDF) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment