I have attached sample_doc.zip,
I wrote above document which is having conditional display of data based on the condition. I am able to find the conditional text in my document and able to check condition, I am at stage where I no which IF block to show but when I call ‘replace method’ of Aspose, it throws ‘Special chars, line break not allowed.’
Is there any way by which I can show IF block text and hide other block which does not satisfy condition.
My code is below.
sectionDocument.getRange().replace(conditionalPlaceholder.getConditionalPlaceholder(), conditionalPlaceholder.getText(), false, false);
Where conditionalPlaceholder.getConditionalPlaceholder() means whole IF block.
conditionalPlaceholder.getText() means only text content of IF block that is “The blinded line listings of SARs received during the reporting period are provided in Appendix 4.1”
Vaibhav Diwansample_doc.zip (31.9 KB)