One of AutoTag’s benefits is that you have multiple output options, but what works in one output may need to be tweaked in another. Today’s tech tip shows you how to adjust HTML output so that it appears in the desired number of pages.
Problem: A template generates HTML output in one really long page, but you want it split into multiple pages.
Say you’ve created a template for generating invoices, and in it you’ve set up a ForEach loop 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.
You can insert a Microsoft Word hard page break at the end of each invoice but before the ending ForEach Tag so when you output the report to Microsoft Word, each invoice appears on its own page.
How can you create the same behavior when the output is HTML?
Solution: Enable the Windward Engine configuration feature ‘html.split_pages’.
Microsoft Word, Excel and PowerPoint natively take care of handling the page breaks and Windward’s Engine interprets how the final output is built. (The goal was to not use all the server resources on one document but to allow room for other requests from the Engine to be serviced.)
But for HTML output, you will need to edit the Engine configuration file to turn on pagination.
When the Windward Engine configuration feature ‘html.split_pages’ value is set to ‘true’ in the configuration file, the Engine will create a separate HTML file for each page of output generated. And if the value is set to ‘false,’ a single HTML file will be created with one long page of continuous output.
For detailed instructions and images, head to our wiki article the HTML Page Break Output.
Author: Dathan Ellis
Dathan used to be a software engineer but found that he loves working with people too. Now he uses his technical expertise to help clients build powerful custom applications in complex environments.
Other posts by Dathan Ellis