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>
Views
Replies
Total Likes
batch is used to generate multiple pdf files from one xdp template and different data files
you see my xml data contains just only one section of elements from a corresponding template. so i am expecting only one PDF out there, but it's producing two output PDFs like record 1 and record 2.
Views
Replies
Total Likes
Can you explain how it's producing two PDF in my use case. Thanks
Views
Replies
Total Likes