About addition of blank page in Aspose.word template dynamically using Linq reporting engine

Hi Team,

Could you please help me on addition of blank pages in aspose.word template dynamically using LINQ report engine.

@rose.thomas

Summary

No specific documentation was found that describes a built‑in way to add blank pages to an Aspose.Words template while using the LINQ Reporting Engine.

Why it happens

The LINQ Reporting Engine processes markers (smart tags) in the template, but it does not expose a dedicated marker for inserting a whole blank page. Consequently, you need to rely on a page‑break construct that the engine can recognise, or add the page break programmatically after the report has been generated.

What to do next

  1. Try a page‑break marker in the template – Insert a marker such as <<PageBreak>> (or any custom tag you define) at the position where you want a new page. After the report is generated, replace that marker with an actual page break using the Aspose.Words API (e.g., DocumentBuilder.InsertBreak(BreakType.PAGE_BREAK)).
  2. Add a page break after generation – Load the generated document and use DocumentBuilder:
Document doc = new Document("output.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
// Move the builder to the desired location, then:
builder.insertBreak(BreakType.PAGE_BREAK);
doc.save("output_with_blank_page.docx");
  1. Test with your Aspose.Words version – Verify that the approach works with the exact version you are using, as behaviour can vary between releases.
  2. If it still does not meet your needs, open a support ticket – Provide a minimal reproducible example, the template, the LINQ report code, and the Aspose.Words version so the support team can give a definitive answer.

Note: The above suggestions are based on general Aspose.Words capabilities and are not directly documented for the LINQ Reporting Engine scenario. Please validate them in your environment.

:warning: I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.

SDK version unclear — refer to the official release notes before applying this guidance.

Thanks, Is there any way to add multiple blank pages based on user request?

for example, user mentioning 2 extra blanks needs at last of the existing document (based on UI input values) then add the same at last.

@rose.thomas You can insert page break into the document using the following syntax:

<<[ControlChar.PageBreak]>>
1 Like

Thanks working fine now

1 Like

Hi, I am getting a additional blank page at end while using <<[ControlChar.PageBreak]>>. Could you pls guide me to remove the same?

@rose.thomas <<[ControlChar.PageBreak]>> syntax insert hard page break into the document, i.e. Ctrl+Enter in MS Word. So if <<[ControlChar.PageBreak]>> is used at the end of the document, page break will be inserted at the end of your final document after building the report.

In my word template, each page an image is inserting and page break required after each image insertion hence how I can add Control char option. I ma attaching sample template for reference.

@rose.thomas You can use condition to avoid insertion of page break after the last item. For example:

<<if [img.IndexOf()<Images.Count()-1]>><<[ControlChar.PageBreak]>><</if>>

Please see attached template, data and output documents:
in.docx (16.7 KB)
data.zip (853 Bytes)
out.docx (13.5 KB)

1 Like

Blank pages are removed now. Thank you

1 Like