Ah.  You've got an unusual PDF there... an AcroForm by OpenOffice...
The "border" to your field is actually a part of the content of the
page.
 
It looks like OpenOffice is doing much the same thing LiquidOffice does
(must be an "office" thing).  Many of the "borders" LO draws aren't
natively supported in AcroFields, so we Do It Ourselves.  I suspect OOo
is doing the same thing.  Unnecessarily in this case, but checking all
the cases where you can-vs-can't use PDF borders is a hassle.  Believe
me, I know.  It can be done, but there's always a chance you miss a case
or two one way or the other.  It's Much Easier to simply always draw
your own borders.
 
Because the borders are part of the page content, you also cannot hide
"that part of the field", because it's not part of the field.
 
--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 
 


________________________________

        From: Arnaud Garcia [mailto:[email protected]] 
        Sent: Monday, May 17, 2010 11:54 AM
        To: Post all your questions about iText here
        Subject: Re: [iText-questions] Acroform bordercolor null
        
        
        Hi Mark and thanks for helping,
        
        I am very sorry, but I don't understand what to do, because I
already set a value to the field after setting the border to null. I
also tried using:   form.regenerateField("myField");
        
        
        here the code, and the pdf file :
        PdfReader pdfreader = new PdfReader("test.pdf");
                    PdfStamper stamp = new PdfStamper(pdfreader, new
FileOutputStream("test_filled.pdf"));
        
                    AcroFields form = stamp.getAcroFields();
                    form.setFieldProperty("firstname", "bordercolor",
null, null);
                    form.regenerateField("firstname");
                    form.setField("firstname", "Arnaud");
                    stamp.setFormFlattening(true);
                    stamp.close();
        
        
        thanks for help, 
        Arnaud
        
        
        2010/5/17 Mark Storer <[email protected]>
        

                Simply changing the value of the border color isn't
enough.  You need to
                force the field to generate a new appearance as well.
Setting its value
                (even to its current value) will do the trick.
                
                --Mark Storer
                 Senior Software Engineer
                 Cardiff.com
                
                import legalese.Disclaimer;
                Disclaimer<Cardiff> DisCard = null;
                



                > -----Original Message-----
                > From: arnaud74130 [mailto:[email protected]]
                > Sent: Saturday, May 15, 2010 6:01 AM
                > To: [email protected]
                > Subject: [iText-questions] Acroform bordercolor null
                >
                >
                > Hi List,
                > I try to remove the border from my acroform, without
success ??
                > There was a previous post:
                >
http://itext-general.2136553.n4.nabble.com/PdfStamper-changes-
                > text-field-framing-td2157072.html#a2157072
                >
                > .. and Paulo did it, but I still don't understand how
?  I
                > have exactly the same code as Christopher ... and I
use his
                > pdf forms as an example, and it is not working ...
                >
                > So if someone or Paulo ;-), can explain a little more
....
                >
                >
                > Thanks for helping,
                >
                > Arnaud
                > --
                > View this message in context:
                >
http://itext-general.2136553.n4.nabble.com/Acroform-bordercolo
                r-null-tp2217721p2217721.html
<http://itext-general.2136553.n4.nabble.com/Acroform-bordercolo%0Ar-null
-tp2217721p2217721.html> 
                > Sent from the iText - General mailing list archive at
Nabble.com.
                >
                >
--------------------------------------------------------------
                > ----------------
                >
                > _______________________________________________
                > iText-questions mailing list
                > [email protected]
                >
https://lists.sourceforge.net/lists/listinfo/itext-questions
                >
                > Buy the iText book: http://www.itextpdf.com/book/
Check the
                > site with examples before you ask questions:
                > http://www.1t3xt.info/examples/ You can also search
the
                > keywords list: http://1t3xt.info/tutorials/keywords/
                >
                >
                
                > No virus found in this incoming message.
                > Checked by AVG - www.avg.com
                > Version: 9.0.819 / Virus Database: 271.1.1/2842 -
Release
                > Date: 05/16/10 23:26:00
                
                >
                
        
------------------------------------------------------------------------
------
                
                _______________________________________________
                iText-questions mailing list
                [email protected]
        
https://lists.sourceforge.net/lists/listinfo/itext-questions
                
                Buy the iText book: http://www.itextpdf.com/book/
                Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
                You can also search the keywords list:
http://1t3xt.info/tutorials/keywords/
                


        No virus found in this incoming message.
        Checked by AVG - www.avg.com
        Version: 9.0.819 / Virus Database: 271.1.1/2842 - Release Date:
05/16/10 23:26:00
        

        

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to