Possibility 2 is closer. I'm creating the document
from scratch and I have onStartPage() to put the
header on each page. But, the first page is a cover
page that doesn't need the header, only the detail
pages need it. The workaround that I've come up with
is to add 'if(writer.getPageNumber()>1){' in
onStartPage() to print the header but I was wondering
if there a different way to do it. Originally I
thought that I would have to treat the cover page and
detail pages as two separate documents to avoid the
header on the cover page.Thanks again, Steve --- Bruno Lowagie <[EMAIL PROTECTED]> wrote: > Steve Murphy wrote: > > Hi, > > > > I need to generate a Pdf document with a dynamic > cover > > page (with customer data) and at least one detail > page > > with order detail lines. The detail pages need to > have > > a consistent header, which I am able to do, but > the > > cover page can't have this header. I'm not sure > how to > > do this. Any hints? > > I am trying to understand the question. > > This is how I interpret it: > > (posibility 1) > You have an existing PDF. > You want to add a cover page and a detail page. > You use PdfStamper and insertPage to do this. > You can add the detail page with a header, > but not the cover page without a header. > Why not? I don't see the problem. > > (possibility 2) > You don't have an existing PDF. > You create the document from scratch and > you add headers using page events (onEndPage). > You add the page events to the writer BEFORE > you open the document with document.open(); > This adds a header to the cover page. > If you add the page event AFTER document.open(); > the cover page will not have a header. > > br, > Bruno > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
