File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Itext Templates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
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
 
wood burning stoves
 
subject: Itext Templates
 
Similar Threads
Windward Java Engine Review
Dynamic Graphs(Ajax) in JSP
XML vs Database
Selecting a row in a JTable using a RadioButton
Please help me regarding the forms selection