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")