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