That gave me a null error because the pdf file [e:/Webs/walton/ICF.pdf] that 
i am trying to populate has only one page.  But even if it did have a second 
page that is not wat i am trying to do.  I just want to create a 2nd page or 
a 2nd document like document.newPage() would, and do the same thing to the 
2nd page as i did for the first page.


>From: "Paulo Soares" <[EMAIL PROTECTED]>
>Reply-To: Post all your questions about iText here 
><[email protected]>
>To: "Post all your questions about iText here" 
><[email protected]>
>Subject: Re: [iText-questions] How to add new page?
>Date: Tue, 20 Jun 2006 23:19:50 +0100
>
>PdfContentByte cb = stamper.getUnderContent(2);
>
>Paulo
>
>----- Original Message -----
>From: "Henry Doan" <[EMAIL PROTECTED]>
>To: <[email protected]>
>Sent: Tuesday, June 20, 2006 10:00 PM
>Subject: [iText-questions] How to add new page?
>
>
> > Ok the question seem simple but its a bit complicated because i tried
> > using
> > Document.newPage() and it didnt' work with my code.
> > All i am doing is opening an exisiting PDF file and putting some direct
> > content into it but i want to do the same thing BUT on the 2nd page.  
>Now
> > thats where i am really stuck...i don't know if its possible or how to 
>add
> > a
> > 2nd page and do the same thing to it as i did to the 1st page.
> >
> > Sorry if this seem confusing but here is my code for the first page: 
>Thank
> > you so much in advance!!!
> >
> > ByteArrayOutputStream baos = new ByteArrayOutputStream();
> >
> > // GET THE FILE
> > PdfReader reader = new PdfReader("e:/Webs/walton/ICF.pdf");
> > PdfStamper stamper = new PdfStamper(reader, baos);
> > PdfContentByte cb = stamper.getUnderContent(1);
> >
> > // PdfTemplate
> > PdfTemplate template = cb.createTemplate(200,35);
> > template.beginText();// BEGIN CUST NAME/ADD
> > BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA_BOLD,
> > BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
> > template.setFontAndSize(bf, 8);
> > template.setTextMatrix(0, 29);
> > template.setLeading(7.4f);
> > template.showText(strCompany);
> > template.newlineShowText(strAdd_Address);
> > template.newlineShowText("ADDRESS 2");
> > template.newlineShowText(strAdd_City + " ,"+strAdd_State+" 
>"+strAdd_Zip);
> > template.endText();
> > //                        X    Y
> > cb.addTemplate(template, 44, 610);
> >
> > _________________________________________________________________
> > Don't just search. Find. Check out the new MSN Search!
> > http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> >
> >
> >
>
>
>--------------------------------------------------------------------------------
>
>
> >
>
>
>--------------------------------------------------------------------------------
>
>
> > _______________________________________________
> > iText-questions mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
>
>
>
>_______________________________________________
>iText-questions mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/itext-questions

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to