John Pedersen wrote: > > > On 15/12/06, *Paulo Soares* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > You need to read the PDF again and use PdfStamper to add more > content. You > can't add content with PdfCopy. > > Paulo > > > Thanks for the quick response. I see examples of adding content using > the PdfStamper like this: > > PdfContentByte cb = stamper.getOverContent(1); > cb.beginText(); > cb.setFontAndSize(bf, 18); > cb.setTextMatrix(36, 770); > cb.showText("Inserted Title Page"); > cb.endText(); > > but I need to add sections, chapters, and paragraphs, which I only see > associated with Document - and I can't see how to get hold of a document > from PdfStamper.
Use ColumnText, fill it with paragraphs. Add the column to the PdfContentByte. If you need Chapters and Sections because you think it looks nice: do it with Paragraphs, forget about Chapter and Section. If you need Chapters and Sections for the outlines: that's done in a different manner in PdfStamper. No time to explain now, but it's all explained in the book. 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 Buy the iText book: http://itext.ugent.be/itext-in-action/
