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

Free Support Forum - aspose.com

Fix table formatting after inserting a HTML table

I am building a word document and initially I inserted tables using the words API. But, I want to add a feature to our application where a our users can create custom tables using HTML and then insert these tables into the word document. The problem is that once these custom tables are inserted using HTML the formatting of the original tables gets messed up (see “no html tables.docx” for original and “with html table.docx” for what happens. I did some research to fix this and came based on this post Table layout is incorrect after inserting HTML into document with InsertHtml using Java. I added “table.setPreferredWidth(PreferredWidth.fromPercent(100))” after I built ever table. The problem is that when I added that it corrupted my tables (see: broken tables after resetting preferred width.docx).



So I am hoping that somebody can help me find a why to fix these problems which would allow me to insert HTML tables and fix the formatting of the original tables without corrupting them.



Thanks,



Josh

Hi Josh,


Thanks for your inquiry. I have tested the scenario while using latest version of Aspose.Words for Java 14.1.0 and have not found the shared issue. I have inserted the shared html into document (no html tables.docx) and called the Document.updateTableLayout method. Please check the attached output document.

In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v14.1.0) from here and let us know how it goes on your side. If the problem still remains, please attach your input Word document along with code here for testing. I will investigate the issue on my side and provide you more information.

I can reproduce with the attached code

Hi Josh,

Thanks for sharing the detail.

I have tested the scenario and 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-9736. 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.

Thanks, just to clarify that is WORDSNET sounds like it is for the .NET version of words and I am using Java, so just want to make sure it is in the right place. Also do you have any idea of when this might get fixed (even just knowing if I am looking at days, weeks, or months would be helpful)?

Hi Josh,


Thanks for your inquiry.
joshsmoore:
just to clarify that is WORDSNET sounds like it is for the .NET version of words and I am using Java, so just want to make sure it is in the right place.
Please note that the latest version of Aspose.Words for Java is completely auto-ported from .NET, i.e. we do not write code for Aspose.Words for Java; it is generated out automatically from C# code of Aspose.Words for .NET. In your case, the issue that was previously logged with WORDSNET prefix would be auto resolved in Java variant of Aspose.Words as well.
joshsmoore:
Also do you have any idea of when this might get fixed (even just knowing if I am looking at days, weeks, or months would be helpful)?
I would like to share with you that issues are addressed and resolved based on first come first serve basis. Currently, your issue is pending for analysis and is in the queue. We will update you via this forum thread once there is any update available on your issue.

Thank you for your patience and understanding.

If I purchased premium support for Aspose Java Words would it speed up the fixing of this bug? And if so could you give me an ETA on when it would be completed?

Thanks,

Josh

Hi Josh,


Thanks for your inquiry.

Your issue currently has a normal priority and is unfortunately not resolved yet. Our development team is currently doing analysis of this issue but I am afraid, we can’t promise a delivery date for the fix yet. Although we try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. Our developers work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

That being said we fully understand that you are keen to get a fix to your particular issue; you can purchase Priority/Enterprise support to escalate your issue(s). Please visit the following link for more information:
http://www.aspose.com/corporate/services/support-options.aspx

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


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