Kim,
I studied your code sample after your last mail.
I'm 99% sure I gave you the right answer yesterday.
Please take a look at this:
> chapter = new Chapter(p,num);
> chapter.setNumberDepth(0);
> while (j.hasNext()) {
> //newpage = doc.newPage();
> sect = chapter.addSection(p,secNum);
> p = new Paragraph("\n");
> sect.add(p);
> for (int k = 0; k < annlMsgs.size(); k++) {
> chartClass = (String)(annlCharts.get(k));
> chartName = msgs.getString("title.annual." +
> chartClass.substring(4,chartClass.indexOf("Chart")));
> sect.add(createChart(conn, company, (String)(annlMsgs.get(k)),
> chartClass, chartName));
This won't work: the doc doesn't know about the section yet.
You should add a NEWPAGE chunk to the Section here:
sect.add(NEWPAGECHUNK);
> doc.newPage();
> }
> for (int l = 0; l < qtrlyMsgs.size(); l++) {
> chartClass = (String)(qtrlyCharts.get(l));
> chartName = msgs.getString("title.qtrly." +
> chartClass.substring(5,chartClass.indexOf("Chart")));
> sect.add(createChart(conn, company, (String)(qtrlyMsgs.get(l)),
> chartClass, chartName));
Same remark here.
> doc.newPage();
> }
> }
All the doc.newPage() invocations were done BEFORE this happened:
> doc.add(chapter);
replace doc.newPage() in your code with doc.add(new Paragraph("newPage"));
and you will see what I mean.
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions