We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conversion PDF to XPS as a text

Hello.

I have used your API to convert PDF to XPS file, but the result XPS file is actually an image.
Can I produce an XPS file which is actually contains a text and not an image (for search purposes)?

Thanks,
Alex.

Hi Alex,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for using our product.

Are you using a PDF file with image or Text elements? If PDF has text elements then PDF to XPS conversion will have text elements in it. Please check it and in case you face any issue, please share your template file with us to show us the issue. We will check it and get back to you soon.

Sorry for the inconvenience caused,

Hello.


Thank you for your answer.

I have solved this problem by writing to a FileStream object, but I think the conversion has a problem with the RTL format.
I am sending you the example with the correct RTL format (as pdf file) and the example with the distorted format after the conversion (as xps file).

Thanks,
Alex.

Hi Alex,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the files.

I have tested your issue with the latest version Aspose.Pdf for .NET v7.3 and I am unable to reproduce the issue. I have attached my resultant XPS file for reference. Please download and try the latest version and if you still face the issue, please share your sample code with us to help us reproduce the issue.

Sorry for the inconvenience,

Hello.


I have taken the latest Aspose.Pdf for .NET version (v.7.3) and I’ve got the same distorted result.
I have the same RTL issue when I try to convert Excel and PowerPoint files to XPS.
I am sending you the code snippets that I use to operate these conversions:

For PDF:

using (Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@“D:\Projects\ConvertToXPS\Files\Input\Example2.pdf”))
{
using (FileStream fs = new FileStream(@“D:\Projects\ConvertToXPS\Files\Output\XPSfromPDF.xps”, FileMode.Create))
{
doc.Save(fs, new Aspose.Pdf.XpsSaveOptions());
}
}

For Excel:

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook(@“D:\Projects\ConvertToXPS\Files\Input\Example.xlsx”,
(new Aspose.Cells.LoadOptions() { Region = Aspose.Cells.CountryCode.Israel, LanguageCode = Aspose.Cells.CountryCode.Israel }));

using (FileStream fs = new FileStream(@“D:\Projects\ConvertToXPS\Files\Output\XPSfromExcel.xps”, FileMode.Create))
{
book.Save(fs, Aspose.Cells.SaveFormat.XPS);
}

For PowerPoint:

Aspose.Slides.Presentation slides = new Aspose.Slides.Presentation(@“D:\Projects\ConvertToXPS\Files\Input\ExampleNew.ppt”);

using (FileStream fs = new FileStream(@“D:\Projects\ConvertToXPS\Files\Output\XPSfromPowerPoint.xps”, FileMode.Create))
{
slides.Save(fs, Aspose.Slides.Export.SaveFormat.Xps);
}

By the way, the Aspose.Slides.Presentation class does not support PowerPoint 2010 (I’ve got the UnsupportedFormatException).

Thanks,
Alex.

Hi Alex,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please accept my apologies as I am able to see the mentioned issue with the latest version of Aspose.Pdf for .NET. I have registered the issue in our issue tracking system with issue id: PDFNEWNET-34226. We will notify you via this forum thread regarding any updates against the issue.

Also, Aspose.Pdf provides a feature to print a PDF file to XPS and as per my testing using that feature the output is fine. If feasible, you may try this feature for now as a work around.

Regarding issue related to other products, I am moving this thread to Aspose.Total forum so other product representatives can reply you accordingly.

Sorry for the inconvenience,

Hi,

AlexPod:
I have the same RTL issue when I try to convert Excel........... to XPS.
For Excel:

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook(@"D:\Projects\ConvertToXPS\Files\Input\Example.xlsx",
(new Aspose.Cells.LoadOptions() { Region = Aspose.Cells.CountryCode.Israel, LanguageCode = Aspose.Cells.CountryCode.Israel }));

using (FileStream fs = new FileStream(@"D:\Projects\ConvertToXPS\Files\Output\XPSfromExcel.xps", FileMode.Create))
{
book.Save(fs, Aspose.Cells.SaveFormat.XPS);
}


I am from Aspose.Cells team and would like to help regarding your Excel to XPS conversion.

First of all, please try our latest fix/version: Aspose.Cells for .NET v7.3.1.3 and let us know your feedback.
If you still find the issue, kindly give us your template XLSX file and output XPS file here, we will check your issue soon.

Thank you.

Hello.


I cannot use a printing feature because PDF printing method produces XPS content as an image,
but I need it as a text (for search purposes).
I will wait till the PDFNEWNET-34226 issue is solved.

Thanks,
Alex.

Hello.


I have tried your latest version (v7.3.1.3) and got the same problem.
I am sending you, as you requested, the template XLSX file and the output XPS.

Thanks,
Alex.

Hi Alex,


Thanks for the template Excel file and output XPS file.

After an initial test, I can find the issue as you have mentioned. In the output XPS file, the display of the data/contents of the sheet is not RTL.

I even tried to add a line (in bold) but in vain).

Sample code:

string filePath = “e:\test2\ExampleNew.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.Worksheets[0].DisplayRightToLeft = true;

workbook.Save(filePath + “.out.xps”);


I have logged a ticket with an id: CELLSNET-41042 for your issue. We will look into it soon.

Thank you.

Hello.


I will wait till the
CELLSNET-41042 issue is solved.

Thanks,
Alex.
Hi,

Please download and try our latest version/fix: Aspose.Cells for .NET v7.7.1.2

It should fix your issue.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as PDFNEWNET-34226) have been fixed in Aspose.Pdf for .NET 9.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.