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

# Incorrect text after converting to XPS

Aspose.Words v6.5.0.0

After converting attached DOCX file into XPS (attached too) we have incorrect Cyrillic text in table header and some symbols in empty FormField. If saving as XPS from Microsoft Word 2007 (SP2) we have correct document.

Hi Alexander,

Thanks for your request. I cannot see any problems with Cyrillic text in the XPS document produced by Apsose.Words. Please see the attached screenshot. On left side is XPS produced by Aspose.Words and on the right side XPS produced by MS Word.

Regarding the problem with empty form fields, I linked your request to the appropriate issue. You will be notified as soon as it is resolved. As a workaround, you can just set an empty value of the form field. Here is the code:

// Open document
Document doc = new Document(@"Test075\in.doc");
// Before saving we should remove values from empty formafields
foreach (FormField field in doc.Range.FormFields)
{
if (string.IsNullOrEmpty(field.Result))
field.Result = string.Empty;
}


Hope this helps.

Best regards.

Thanks for workaround with null FormFields.

I attached screnshots for original DOCX document, saved as XPS by Aspose.Words and saved as XPS by Microsoft Word 2007 (SP2) from my side. I also attached saved XPS document from Word.

My current system locale format is Russian, locale for non-unicode - Russian.

System Locale: ru;Russian
Input Locale: en-us;English (United States)

P.S. I can’t attach plain XPS without zipping it.

Hi Alexander,

What viewer do you use to open XPS documents? XPS document you have attached looks fine when I open it using IE7. So, most likely, your viewer does not like something in XPS document produced by Aspose.Words.

Best regards.

I checked XPS produced by Aspose.Words in IE8 on Windows Vista SP2 - font and text are correct. But in this viewer they broken.

I use english version of “Microsoft XML Paper Specification Essentials Pack” v1.0 on Windows Vista SP2 (EN).

Alexander, thank you for additional information. I just installed this XPS viewer on my side and XPS document still looks fine. I tested on Won XP SP3 (en) and on Win 2003 (en). Maybe this is some kind of bug in XPS viewer EP for Vista.

Best regards.

Test on Vista please, because I posted real screenshots and it looks like same on second Vista machine. Can I help with additional information about OS, culture info?

P.S. You test “LS-Aspose-B25-Sample.xps”, right?

Alexander, I will ask our developers who use Vista to check this issue on their side. I will get back to you once we check the problem on Vista.

Yes, I used your XPS for testing. Could you please try opening the attached XPS document on your side? Does it look the same as XPS produced on your side?

Best regards.

Yes, it looks the same:

Alexander, just tested your XPS on Vista and still it looks fine. Maybe we use different builds of XPS viewer. Can you download XPS viewer from the link you gave me and reinstall it?

Also, regarding culture. I do not think the issue is related to culture, because another Russian text is shown correctly. It seems, for some reason, your XPS viewer does not like subset of Calibri Bold font stored in XPS document.

Best regards.

I can reinstall later.

I create DOCX document with line TEST in Calibry Bold and convert to XPS by Aspose. This XPS document loks fine in IE8, but in my XPS Viewer I see empty clear page. Both document attached.

My XPS Viewer build in screenshot:

It is really odd problem. Because the same build of XPS Viewer EP is installed on my side and all your XPS documents looks fine on my side.

The issues you have found earlier (filed as 7770) have been fixed in this update.