generatePDFOutputBatch from com.adobe.fd.output.api.OutputService not working as expected.
Hi,
generatePDFOutputBatch function producing output documents double the amount of input map. Please find the scenario below sample code snippet.
I am sending two templates with xml data and expecting two PDF documents as output, but it's produce 4 documents. I am bit confused, Any help please. Thanks.
input Maps:
Map templates = new LinkedHashMap();
Map data = new LinkedHashMap();
templates.put("xyz", "xyz.xdp");
templates.put("abc", "abc.xdp");
data.put("xyz", new Document(xml1))
data.put("abc", new Document(xml2))
BatchOptions bo = new BatchOptions();
bo.setGenerateManyFiles(true);
ret = outputService.generatePDFOutputBatch(templates, data, option, bo);
Output:
I am getting double the amount of documents in output like below metadata enties.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-technologies.com) -->
<printBatchMetaData>
<batchId />
<recordMetaData>
<recordId />
<recordNo>1</recordNo>
<creationTime>01/02/24 17:18:14</creationTime>
<pages>1</pages>
<surfaces>1</surfaces>
<templateId>xyz</templateId>
</recordMetaData>
<recordMetaData>
<recordId />
<recordNo>2</recordNo>
<creationTime>01/02/24 17:18:14</creationTime>
<pages>1</pages>
<surfaces>1</surfaces>
<templateId>xyz</templateId>
</recordMetaData>
<recordMetaData>
<recordId />
<recordNo>1</recordNo>
<creationTime>01/02/24 17:18:16</creationTime>
<pages>21</pages>
<surfaces>21</surfaces>
<templateId>abc</templateId>
</recordMetaData>
<recordMetaData>
<recordId />
<recordNo>2</recordNo>
<creationTime>01/02/24 17:18:17</creationTime>
<pages>21</pages>
<surfaces>21</surfaces>
<templateId>abc</templateId>
</recordMetaData>
</printBatchMetaData>