Slow XPS to PDF

Dear Support,

I want to use a PDF(pdf1), convert it into XPS(xps) format and then, convert the ‘xps’ back to PDF(pdf2). I noticed that if my pdf1 has images in it, the below process is very slow. Is there a way to make this conversion process faster?

Here is my code:

//open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(filename);

 // Instantiate XPS Save options
Aspose.Pdf.XpsSaveOptions saveOptions = new Aspose.Pdf.XpsSaveOptions();
pdfDocument.Save(filePath + “/” + id + “.xps”, saveOptions);
//save back to pdf
// Instantiate XpsLoadOptions object using XPS load option
Aspose.Pdf.XpsLoadOptions options = new Aspose.Pdf.XpsLoadOptions();
// Create document object
Aspose.Pdf.Document document = new Aspose.Pdf.Document(root + “/” + id + “.xps”, options);
// Save the resultant PDF document
document.Save(filePath + “/” + id + “.pdf”);

I am unable to attach a pdf document that caused this algorithm to slow down.

Thank you,
Sireesha

Hi Sireesha,


Thanks for using our API’s.

The time taken by API depends upon the structure of input files, so we request you to please share the resource/input files, so that we can test the conversion in our environment. We are sorry for this inconvenience.