> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, October 17, 2006 2:33 PM
> To: [email protected]
> Subject: [iText-questions] Is there any solution concerning 
> problem withButton text?
> 
> *Hi,
> 
> I found this question in the mailing list archive. Today I 
> got the same problem.
> My Button is only gray.
> Is there any solution?
>

I don't think there was ever a real problem. You may post a small
standalone example with your problem.

Paulo
 
> Thanks for your answers!
> 
> slforms
> 
> 
> Beate* *Niendorf* *wrote*:
> 
> >Hi :)
> >
> >I've got a problem to set text on a button. I'm sure it's a simple
> >problem because this is not the first button I create with itext ;) 
> >But I really can't see where is the fault :/
> >This is how I create the button:
> >
> >PushbuttonField push = new PushbuttonField(stamp.getWriter(),new
> >Rectangle(10 + xadd, pageHeight - 40, fieldwidth + xadd, pageHeight -
> >80), buttonName + "text");
> >push.setFontSize(12);
> >push.setText(buttonName + " (Text)");
> >push.setBackgroundColor(Color.LIGHT_GRAY);
> >push.setBorderColor(Color.GRAY);
> >push.setTextColor(Color.BLACK);
> >log.debug("push name: "+push.getFieldName());
> >log.debug("push text: "+push.getText());
> >PdfFormField ff = push.getField();       
> >PdfAction ac = PdfAction.createSubmitForm(buttonUrl, null, 0);
> >log.debug("action: " + buttonUrl);
> >ff.setAction(ac);
> >stamp.addAnnotation(ff, 1);
> >
> >The logging tells me everything is all right - but if I open 
> the created
> >PDF-File only the gray buttons are visible (no text on them and no
> >"onclick"-Action).
> >
> >Looking forward to any response :)
> >
> I replaced the variables with actual values and tested with this code:
> 
> PdfReader reader = new PdfReader("test.pdf");
> PdfStamper stamp = new PdfStamper(reader, new 
> FileOutputStream("new.pdf"));
> PushbuttonField  push = new PushbuttonField(stamp.getWriter(), new 
> Rectangle(100, 100, 200, 200), "buttontest");
> push.setFontSize(12);
> push.setText("TEST");
> push.setBackgroundColor(Color.LIGHT_GRAY);
> push.setBorderColor(Color.GRAY);
> push.setTextColor(Color.BLACK);
> PdfFormField ff = push.getField();
> PdfAction ac = 
> PdfAction.createSubmitForm("http://www.submit-site.com";, 
> null, 0);
> ff.setAction(ac);
> stamp.addAnnotation(ff, 1);
> stamp.close();
> 
> And I get a button on page one that is labelled 'TEST'.
> I don't see any real difference between your example and mine.
> Could you send me a small standalone example starting from my
> code snippet that reproduces the problem?
> br,
> Bruno


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
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