How to add new page?
- From: "Paulo Soares" <psoares (at) consiste.pt>
- Date: Tue, 20 Jun 2006 23:19:50 +0100
PdfContentByte cb = stamper.getUnderContent(2);
Paulo
----- Original Message -----
From: "Henry Doan" <geiz777 (at) msn.com>
To: <itext-questions (at) lists.sourceforge.net>
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
> iText-questions (at) lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions