Search code examples
htmldocmailmergeaspose.words

Aspose.words mailmerge. Text in table cell gets truncated if it overflows page


I am executing mailmerge with regions. For that purpose I am using the following callback :

 void IFieldMergingCallback.FieldMerging(FieldMergingArgs e)
    {
        //html content of the comment
        if (e.FieldName == "Content")
        {
            DocumentBuilder builder = new DocumentBuilder(e.Document);
            builder.MoveToMergeField(e.DocumentFieldName);
            builder.InsertHtml((string)e.FieldValue);
        }
    }

The latter handles field, that assumes html content. However, if the content, overflows page length, it does not continue on another page, and simply gets truncated. How should I elaborate the callback to avoid that (or what settings I have to apply to document before executing mailmerge)? Is it somehow related to the fact, that I am using trial version of Aspose.Words ?


Solution

  • Check the properties of table row. If "Allow row to page break" is checked, your table should automatically move to the next page. I also tested using the similar method as yours, it worked.

    Table properties

    I work with Aspose as Developer Evangelist.