Re: Aspose.Words Builder.InsertHtml behaviour

I am getting the same behavior with InsertHTML as well. I have dynamic content that is always different and based on what the user gives me. Every time InsertHTML is used it adds extra space in the document. I absolutely cannot have that. This function does not work properly.

Hi Justin,

Your post has been split and attached to the same issue WORDSNET-11100. Can you please also share your HTML to confirm you are facing the same issue?

Best Regards,

Here is an example of the HTML I am inserting in the document.


 Based on a minimum order quantity of 1 your price would be:   $    1,325.63  Each 
 Based on a minimum order quantity of 2-9 your price would be:   $    1,259.35  Each 
 Based on a minimum order quantity of 10+ your price would be:   $    1,193.07  Each 

I am inserting this HTML inside a table in a word document. After this table there will be an extra blank line. If I add some text after the table, the blank line problem does not happen.



Hi Justin,

Thanks for the HTML. We will let you know as soon as the issue is fixed.

Best Regards,

After doing some more testing the problem becomes very obvious.

Something as simple as this code will produce my problem (attached the word template as well):

DataTable tblProducts = new DataTable();
tblProducts.Columns.Add(“PartDescription”, typeof(string));

for (int i = 0; i < 5; i++)
{
DataRow dataRow = tblProducts.NewRow();
dataRow[“PartDescription”] = "
Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3
";
tblProducts.Rows.Add(dataRow);
}
docTemplate.MailMerge.FieldMergingCallback = new HandleMergeFields();
// Do clean up options as well.
docTemplate.MailMerge.ExecuteWithRegions(tblProducts);

This code will result in 3 extra blank rows in the document after each table row. I hope this helps fix the problem.

Hi Justin,

This issue has been planned for the coming monthly release i.e. 14.12.0. You will be notified as soon as it is released.

Best Regards,

Thanks for the update. What’s the ETA on the next release?

Hi Justin,

It will be released in the first or second week of January, 2015.

Best Regards,

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


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