Hi Tasos
The number of formatting passes APP makes is driven by how 'stable' for generated content is between passes. What this means is that items such as indexes, tables of contents and cross references must be consistent between formatting passes before APP will generate the PDF. They might not be consistent because the action of outputting these potentially changeable things can have an affect later in the document on the pages some other content items appear on. APP will make a minimum of two formatting passes but can take as many as needed.
The print configuration file allows some control over this. If you open 'standard.appcf' in Editor and save it as something else, then you can edit some of the print configuration options, including formatting passes.
The 'compareMode' option allows you to choose how APP decides whether the generated text is stable. The options are:
- None - APP performs no stability check, it is up to the user to set the minimum number to something they think will work for their document and give good results
- Checksum - after each pass APP will generate an internal checksum value and then compare it with a value generated in the previous pass
- Stability - APP checks whether certain items have changed since the last formatting pass. This option typically uses one pass fewer than 'checksum'.
The maximum and minimum number of passes you want APP to take is also provided as an option.
There are often other things you can do to speed up PDF production in your stylesheet. Some things to look for are:
- Heavy use of 'gentext' to do un-necessary things (eg - don't hide a block of content only to gentext it out again inside a table if you want to put a border around it)
- Poorly written XPath expressions have a huge impact on performance - avoid '//' location paths
- Poorly written conditions - avoid lots of 'if' statements which are testing the same thing - use the nested if/if-else/else' conditions in Styler
- Un-necessarily nested blocks
- Lots of column balancing
- Lots of graphic conversions (particularly CGM)
I hope this helps
Simon