Skip to main content

HTML Page Break Output


This article will explain how to apply pagination settings to HTML-based output when a template generates more than one page. This can be achieved by enabling the Windward Engine configuration feature 'html.split_pages'. When this value is set to 'true' in the configuration file, the Engine will create a separate HTML file for each page of output generated. If the value is set to 'false,' then a single HTML file will be created with one long page of continuous output.

Sample Java and .NET Engine Programs


The sample below will generate a list of invoices placing each invoice in a separate HTML file upon output. A ForEach loop is setup to cycle through a list of orders and then pass the changing OrderID into the invoice section to create a new invoice on each page. The page break is caused by a Microsoft Word hard page break being inserted at the end of the invoice but BEFORE the ending ForEach Tag.  


An easy way to view these markers is to enable the symbols view in Microsoft Word to display hidden characters in a document, like page breaks. Microsoft Word, Excel and PowerPoint natively take care of handling the page breaks and Windward's Engine interprets how the final output is built.    


If the attribute 'html.split_pages' is enabled and set to a value of 'true' in the Windward Engine configuration file ( for Java and {appName}.exe.config for .NET) then a separate HTML file is generated for each invoice.  



In the attached sample there are two folders for both Java and .NET Engine examples. The properties files have been updated to add the html.split_pages attribute and setting the value to 'true'. As you can see in the images below, once the run.bat file is run for each sample, 10 output.html files are created in succession adding a _XX.html to each file name for each page that the report generates. After all 10 pages are generated you are left with 10 HTML files, each containing a different Invoice.




Java Engine command prompt example



.NET Engine command prompt example


Configuration File Syntax

html.split_pages = '[true | false]'


Default Value  false

Category         Local

Allowed Values

  • 'true'  - creates an HTML file for each page of output produced
  • 'false' - creates a single HTML file containing a long page of continuous output

Java Engine Syntax

Add the following key to your file


html.split_pages = 'true'

.NET Engine Syntax

Under the <WindwardReports> node add the following key to your AppName.exe.config File (IE, RunReport.exe.config)

<add key="html.split_pages" value="true"/>