Last active
February 10, 2023 15:32
How to Export XPS to PDF using Python. For more details: https://kb.aspose.com/pdf/python/how-to-export-xps-to-pdf-using-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.pdf as pdf | |
# Load License | |
license = pdf.License() | |
license.set_license("Aspose.Total.lic") | |
# Create XpsLoadOptions object | |
options = pdf.XpsLoadOptions() | |
# Load XPS into document object | |
pdfDocument = pdf.Document("Sample.xps", options) | |
# Save the PDF | |
pdfDocument.save("Output.pdf") | |
print("XPS to PDF conversion completed successfully") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment