Free Support Forum - aspose.com

Table PDF layout differences

Hi,
Tables that are wider than available document width are automatically compressed in Word, but not when saving to PDF. Please see attached screen dump.

I have included a small project that reproduces the problem (license file not included). Compare output from buttons “Word 5 cells width:200” and “PDF 5 cells width:200”.

I am using Vista and AW.NET 9.0.0.0

Best regards, Anders

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

Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved. As a workaround of this problem you can try calling UpdateTableLayout() method before saving the document to PDF.

Best regards,

Thanks, that workaround works for me!
/Anders

This issue is fixed in the upcoming Aspose.Words 10.5 released end of September.


But even with this fix, you should not set CellFormat.Width in this case. You are setting 5 columns each almost 3" wide. Aspose.Words “thinks” this is what you actually want to do and lets this through to the PDF output.

If you want Aspose.Words to auto fit the table, just don’t set the width. There are other improvements related to tables and auto fit in this version, we will write more about this in the blog and in the documentation.

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


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