Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
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/
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