  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Dynamic content in document header | Dynamic content in document header 2007-06-20 - By Clair W. Cabal
Back My task is this: create a pdf report document of many pages where each page has a header with both fixed content and dynamic content (the value changes periodically throughout the report).
I have been unable to accomplish this. I have a class that builds the report and a class that builds the header which extends PdfPageEventHelper. The PdfPageEventHelper class has access to the attributes that periodically change in the report class. I initialize the variables that need to display in the onStartPage method, and display the header information in the onEndPage method. Whatever the LAST variable values are for the report is what gets printed in the header of every page. So, it looks like the PdfPageEventHelper methods do not execute until the entire document is complete - by which time I have lost the ability to capture the values I need. Is there a way to do this?
Clair W. Cabal
Nelson & Associates
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas -microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} @(protected) Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>My task is this: create a pdf report document of many pages where each page has a header with both fixed content and dynamic content (the value changes periodically throughout the report). <o:p></o:p></span ></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I have been unable to accomplish this. I have a class that builds the report and a class that builds the header which extends PdfPageEventHelper. The PdfPageEventHelper class has access to the attributes that periodically change in the report class. I initialize the variables that need to display in the onStartPage method, and display the header information in the onEndPage method. Whatever the LAST variable values are for the report is what gets printed in the header of every page. So, it looks like the PdfPageEventHelper methods do not execute until the entire document is complete – by which time I have lost the ability to capture the values I need. Is there a way to do this? <o :p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Clair W. Cabal</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Nelson & Associates</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size: 12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|
 |