Kristof Heiremans wrote:
> The thing is: I need a button but i'm not writing a form but just an online 
> dynamicly generated pdf page.

By adding a button to a PDF, you are implicitly creating a form.

I made you a little demo that goes to index.html if you click OK:
http://www.lowagie.com/iText/gotobutton.pdf

PushbuttonField button = new PushbuttonField(writer,
   new Rectangle(36, 780, 108, 800), "goto");
button.setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
button.setText("OK");    
button.setVisibility(PushbuttonField.VISIBLE_BUT_DOES_NOT_PRINT);
PdfFormField submit = button.getField();
submit.setAction(new PdfAction("index.html"));
writer.addAnnotation(submit);

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/

Reply via email to