Sorry for putting "urgent" in the subject... I was just trying to
attract someone's attention. Here is the question without the urgen in
it ...



Perhaps I dont understand this correctly but I am trying to put some
text and a button on each page of a document.
Here is a naive implementation but it only prints a button on the first page:
              Document document = new Document(PageSize.LEGAL);
                      PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream("HelloWorld.pdf"));
                      document.open();
                      PushbuttonField bt = new
PushbuttonField(writer, new Rectangle(20,
20, 600, 1000), "Private");
bt.setVisibility(PushbuttonField.VISIBLE_BUT_DOES_NOT_PRINT);
                      bt.setBackgroundColor(Color.gray);
                      writer.addAnnotation(bt.getField());
                      document.add(new Paragraph("Hello World"));
                       //
                       writer.newPage();
                       document.newPage();
                       writer.addAnnotation(bt.getField());
                       document.add(new Paragraph("Hello World"));
                       document.close();

--

 Hello World text shows up on the second page but not the button. What
 could be wrong here? How would I have a button , a paragraph and
 column text (that places text specifically within a page) show up on
 multiple pages?

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to