samedi 4 juillet 2015

Generate a consolidated PDF file report by combining multiple pdf files and contents in one pdf file

I am building a tool that generate pdf report based on input provided by users.

But the situation that I have it is like let’s say that user’s provided input and that input has to consolidate 20 items in a pdf report (or may be more items) and each item has some records stored in DB and also a pdf file stored in DB. Now I need to fetch each items records from DB and their pdf files as well for all 20 items and then consolidate all of them in single reports that will be downloaded in user’s system.

And how I am doing it: I am create a separate pdf file for each 20 items and then merged all of them in one pdf file but this seems to more time consuming and also affected page number as well. I also tried by reading pdfs content and by appending them in one StringBuffer and then write that StringBuffer in final pdf but after doing this I was not able to read that content of pdf as it was in unreadable format.

I am using iText and Yahp jars to consolidate the reports. Could someone please suggest me if I can achieve same result in better way.

Aucun commentaire:

Enregistrer un commentaire