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

Free Support Forum - aspose.com

Table width in percent is not honored when converted from DOCX to XPS

We are using a separate tool to generate documents in DOCX format, and using Aspose.Words to convert these files to XPS. Some of the tables in these documents have their widths set in percentages, rather than twips or “auto.” When these tables are converted to XPS, the tables appear to be resized to fit their contents, rather than honoring their width settings. The tables appear as they should when the DOCX file is opened in Word.


After comparing a document.xml file generated by our application to a similar document created directly in Microsoft Word (that converts accurately), I believe I found the key difference. Word included in its document, in addition to the percentage width information, the actual width of the table’s columns in twips. Including this additional information is not possible in my application, as the exporter is out of my control. However, both Word and the document viewer within my application can display these tables correctly, and the table width is specified explicitly within the document-- just not in twips.

Is it possible for your converter to handle tables like this (with width information only specified in percentages) the same way Microsoft Word handles them?

I have included two DOCX files that exhibit this behavior. One was created in Word 2010, then modified by hand to remove the additional column width information. The other was created by the tool that we use in our application. Both files, when opened in Word 2010, correctly display the table filling the width of the document. When the documents are converted to XPS using Aspose.Words, they show a table that is shrunk to only take up a couple of inches.

I have also verified that setting table width in twips, rather than percentage of page width, allows conversion correctly. This problem seems to only occur when all values are in percentages.

Thank you for your quick response.

The issues you have found earlier (filed as WORDSNET-5193) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.