Empty line after table

Hi,


In previous versions (14.11.0) their was an empty line after/under a table. With the version 16.12.0, this enter is gone. Can we add this with a workaround in our code?

I’ve added a test project.

Kind Regards,
Ann

Hi Ann,


Thanks for your inquiry. After performing the mail merge, please move the cursor to the empty paragraph that is after the table and insert paragraph break using DocumentBuilder.InsertParagraph method to get the desired output. Hope this helps you.

<pre style=“font-family: “Courier New”; font-size: 9pt;”>Document doc = new Document(MyDir + “sjabloon-test-table-whitelines.doc”);
doc.getMailMerge().setCleanupOptions(MailMergeCleanupOptions.
REMOVE_UNUSED_REGIONS | MailMergeCleanupOptions.REMOVE_CONTAINING_FIELDS | MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS);

doc.getMailMerge().setFieldMergingCallback(
new FieldMergingCallback());

MailMergeDataSource dataSource =
new MailMergeDataSource(“root”);
doc.getMailMerge().executeWithRegions(dataSource);
doc.updateFields();

Node node = doc.getChild(NodeType.TABLE, 0, true).getNextSibling();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveTo(node);
builder.insertParagraph();

doc.save(
MyDir + “17.2.0.doc”);