Create multi-page ISO reports
For reports printed on ISO and JIS-sized pages, you can configure the output to print several logical pages per physical page.
The Swift report application tells the report engine to render several report pages onto a
physical page. This is completed with these C APIs:
selectLogicalPageMapping()
- Configures the mapping from logical pages to physical pages. For the purpose of
creating a multi-page ISO report, this will be set to
multipage
. configureMultipageOutput()
- Defines the configuration of the logical pages on the physical page, the size of the ISO page, and the orientation of the logical page.
These functions should be included after calling the selectDevice()
function
but before calling the createContentHandler()
function.
This example modifies the OrderReportSwift.swift file, which you can find
in the
OrderReportSwift
demo project, to output multiple report pages onto a
physical page.
let rcPtr = createRuntimeConfiguration(designFile)
setOutputFileName(rcPtr, outputFilename)
selectDevice (rcPtr, PDF)
selectLogicalPageMapping(rcPtr,multipage)
configureMultipageOutput(rcPtr,2,4,TRUE)
configureDistributedProcessing(rcPtr, "127.0.0.1", 7000)
Specifically:- The
selectLogicalPageMapping
function tells the output that there will be several logical pages on a physical page. - The
configureMultipageOutput
function details the configuration of the logical pages on the physical page, the size of the ISO page, and the orientation of the logical page. In our example:- The second parameter specfies the number of logical pages to print, but is provided as an index of two. In our example, 2 * 2 = 4 logical pages will print on each physical page. If it had been set to three, then 2 * 2 * 2 = 8 logical pages would have been printed on each physical page.
- The third parameter specifies the ISO number. In our example, 4 refers to ISOA4.
- The fourth and final parameter specifies whether the logical page orientation should
be portrait (
TRUE
) or landscape (FALSE
).
For the full list of available functions, refer to the Genero Report Writer C API documentation.