This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Itext Templates Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Itext Templates" Watch "Itext Templates" New topic
Author

Itext Templates

aadhar sharma
Ranch Hand

Joined: Oct 09, 2006
Posts: 38
Hi All


I am a new user of Itext. Currently I am using Inetsoft StyleReports but we are getting performance issues so we decided to evaluate Itext. I have gone through the docs/api's but still I am a beginner.

In my application we have different reports generated based on user selection(The screen has about 5 checkboxes). Each checkbox generates a particular report and if a user selects multiple checkboxes, a combined report is generated.

Each report has its own header and footer which repeats on every page of that particular document. I have seen there is a PDFTemplate class which can be used to set a template, but my problem is if the user selects multiple checkboxes, then each report will have a different PDFTemplate. I am using a listner which attaches the PDFTemplate to a document in onStartPage() method. How can I attach multiple templates to a document.

One possible solution is to generate all pdf's separately and then combine them at the end, but it is not the best approach keeping performance in mind. What I am planning to do is to pass document object to different methods based on user's selection of checkboxes and generate the report. But I cant find a way to attach different templates.

It would be great if some one sends me an example

Thanks in Advance
Aadhar Sharma


Thanks and Regards
aadhar sharma
Ranch Hand

Joined: Oct 09, 2006
Posts: 38
Keep on changing the page event

HeaderFooterPageNumber marker2 = new HeaderFooterPageNumber(payload);
writer.setPageEvent(marker2);
aadhar sharma
Ranch Hand

Joined: Oct 09, 2006
Posts: 38
This might also help as well

http://www.opensubscriber.com/message/itext-questions@lists.sourceforge.net/8725428.html
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Itext Templates
 
Similar Threads
XML vs Database
Selecting a row in a JTable using a RadioButton
Dynamic Graphs(Ajax) in JSP
Please help me regarding the forms selection
Windward Java Engine Review