Generating non-interactive form documents

Consider a scenario where you have one or more templates and multiple records of XML data for each template.

Use the generatePDFOutputBatch and generatePrintedOutputBatch operations of the Output service to generate a print document for each record.

You can also combine the records into a single document. Both the operations take four parameters.

The first parameter is a Map that contains an arbitrary string as the key and the name of the template file as value.

The second parameter is a different Map whose value is a Document object that contains XML data. The key is the same as that you specify for the first parameter.

The third parameter for generatePDFOutputBatch or generatePrintedOutputBatch is of type PDFOutputOptions or PrintedOutputOptions respectively.

The parameter types are the same as types of the parameters for the generatePDFOutput and generatePrintedOutput operations and have the same effect.

The fourth parameter is of type BatchOptions, which you use to specify whether a separate file can be generated for each record. The default value of this parameter is false.

Both generatePrintedOutputBatch and generatePDFOutputBatch return a value of type BatchResult. The value contains a list of documents generated. It also contains a metadata document in XML format that contains information related to each document that is generated.

Experience Manager