Hello,
I would suggest creating a ColumnText that uses your PdfContentByte, and 
then adding the paragaphs and lists to the ColumnText. ColumnText is one 
of two iText classes which know how to layout content on a page, the 
other being Document.
Alternately, you can do it the other way round, and create a new 
Document to which you import the pages of your existing PDF as page 
backgrounds. Depending on how much content you want to add, one method 
might be more suitable than the other. In particular, ColumnText doesn't 
trigger page breaks automatically.

Damien Drix

Beate Niendorf a écrit :
> Hello,
>
> I'm trying to add a Paragraph with a list to an existing PDF-File.
> Therefore I take this example:
>  Paragraph paragraph = new Paragraph("Things to show in the list");
>  com.lowagie.text.List list = new com.lowagie.text.List(false, 10);
>  list.add("first");
>  list.add("second");
>  list.add("third");
>  //...
>  paragraph.add(list);
>
> Now I can add this to a new document like described in the tutorials
> example. But what I want is to add this paragraph to an existing PDF.
> This is what I have but I can't add the list:
>
> PdfReader reader2 = new PdfReader(new FileInputStream(formfile));
> File tmpFile = new File(formfile + ".tmp");
> PdfStamper stamp = new PdfStamper(reader2, new
> FileOutputStream(tmpFile)); 
>
> I also tried with PdfContentByte content = stamp.getOverContent(1); to
> add the list but could find an satisfying solution.
>
> Many thanks for helping in advance,
> Beate
>   

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to