Dear,
Hi there,
Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v14.6.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v14.6.0 and let us know how it goes on your side. I have attached the output Pdf file with this post for your kind reference.
I suggest you please use CompatibilityOptions.optimizeFor method as shown below to get the required output. Please let us know if you have any more queries.
Document doc = new Document(MyDir + "table_bug.docx");
doc.getCompatibilityOptions().optimizeFor(MsWordVersion.WORD_2013);
doc.save(MyDir + "Out.pdf");
Dear,
Hi there,
Thanks for your inquiry. I have tested the scenario using following code example and have not found the shared issue. I have attached the output Pdf file with this post for your kind reference.
Document doc = new Document(MyDir + "table_100%.docx");
doc.getCompatibilityOptions().optimizeFor(MsWordVersion.WORD_2013);
doc.save(MyDir + “Out.pdf”);
Could you please share the following detail for investigation purposes?
What environment are you running on?
- OS (Windows Version or Linux Version)
- Architecture (32 / 64 bit)
- Java version
Dear,
PS: I’m getting this issue on 64-bit machines both on Windows and Linux (as one would expect with Java :-). Using JDK 1.7. I believe the implementation of the updateTableLayout must be at fault here, but only when combined with the Word_2013 preference. When indicating an older Word version, the table width is the same as it would be in older Words (<=2010) (with ends sticking out on both ends in regards to the flowing text).
Hi there,
Thanks for sharing the detail. You do not normally need to call this method as cell and table widths are maintained automatically. You can call this method before exporting to PDF (or any other fixed-page format), only in rare cases where you confirmed that tables appear incorrectly laid out in the output document. Calling this method might help to correct the output.
Regarding your issue, I have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10453. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.
Hi there,
Thanks for your patience.
It is to inform you that our development team has completed the work on the issue (WORDSNET-10453)
and has come to a conclusion that this issue and the undesired behavior
you’re observing is actually not a bug in Aspose.Words. So, we have
closed this issue as ‘Not a Bug’.
Your issue is related to missing feature WORDSNET-832 (Make table layout as close to Word as possible). I have linked this forum thread to the same feature request. We will update you via this forum thread once this feature is available.
We apologize for your inconvenience.