Linq Reporting Engine - conditionally show page/section

Hi Aspose Team

We have word templates marked up with Linq template syntax which output a pdf. We would like hide a page of the word template from the generated pdf depending on an if condition in the word template. Currently the generated pdf shows a blank page.

Is it possible to achieve this using only template syntax or does this need to be done post generating the pdf?

Thanks

@pm11 MS Word documents are flow by their nature, so there is no “page” concept. Consumer applications reflows document content into pages on the fly. The same does Aspose.Words upon rendering document to PDF.

Thanks @alexey.noskov

I am correct in thinking then that, as I have seen in other topics, we would need to first generate a pdf/word in memory and then programmatically look for blank pages and remove them before generating the final pdf?

@pm11 As I have mentioned there is not “page” concept in MS Word documents. An empty page can be produced by section break, page break a batch of empty paragraph in the page etc. So to avoid empty page in the resulting document it is better to redesign the template to avoid such situation. If possible, please share your template and sample data source. We will check what causes an empty page in your case and provide you more information.