Jasper report export to PDF in spring batch for multiple PDF

I need to export jasper report to pdf in spring batch application.
Scenario: using one jasper report layout and text file (data) have multiple rows (consider each row for single(account)) used as a data to fill report. In spring batch application i have to create only one pdf for all rows(accounts). using exportReportToPdfFile() it will export all accounts at a time , however i have to use batch processing and need to write pdf row by row(accounts). Is there any way to do so?
I have checked with batch mode exporting where exporter loops through this list of reports and produces a single document from them. but what if we have millions of reports it wont be applicable.

vikas.jadhav's picture
Joined: Jun 19 2017 - 11:51pm
Last seen: 4 years 6 hours ago

You need to explain this again, because it is not clear to me what the problem is.

On one hand you say you need to produce a single PDF for all accounts, but then you are concerned it would be about millions of accounts and probably too big.

So do you want a single PDF, no matter how big, or what?

 

teodord - 5 years 2 months ago
Yeah a single file of pdf no matter what the size is but the problem is not about size its about processing time. Spring Batch write data depend on chunk size so if I have 10 files and chunk size is 1 then it will write 10 times on same file with append. Export to pdf writes whole data into single file at once but i need to write one record at a time with append. Do we have any export to pdf to append the JasperPrint object or what else options do I have? I have used list of jasperPrint object and then exporting it to export method but then it will be bulk processsing instead of record wise processing.
vikas.jadhav - 5 years 2 months ago

0 Answers:

No answers yet
Feedback