Hello
I am trying to include a general signature block in all documents.
So in the master document I use INCLUDETEXT to include this common signature document.
This has a series of:
{ IF { SigType } = “A” “Some text and a signatire” }
{ IF { SigType } = “B” “Some other text and a different signature” }
…
In the master document I declare and set the bookmark value.
This works in word but it renders all the the INCLUDETEXT file and the result using aspose 18.8.
If I include the signature block directly in the master document I get the same result.
Which makes me think that the issue is with evaluating { IF { SigType } = “A”… }.
The call to the merge is buried in multiple layers of indirection but eventually it calls:
final Document template = new Document( new ByteArrayInputStream(bytes) );
template.getMailMerge().setCleanupOptions(MailMergeCleanupOptions.REMOVE_CONTAINING_FIELDS |
// MailMergeCleanupOptions.REMOVE_UNUSED_FIELDS |
MailMergeCleanupOptions.REMOVE_EMPTY_PARAGRAPHS);
template.getMailMerge().execute(customDataSource);
for (final int fieldCode : FieldRemover.FIELD_CODES_TO_REMOVE) {
template.accept(new FieldRemover(fieldCode));
}
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
template.save( outputStream, AsposeMediaType.getMediaType(inToContentType));
Looking at similar logs I think conditional IF and INCLUDETEXT are supported so I assume we are missing something somewhere?