SN_NUMBER will work if the form is XFA, a best effort is made to match
the name. If the form is AcroForm the name must be exact.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Bruno Lowagie
> Sent: Thursday, June 19, 2008 5:26 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] How to partial flatten a XFA Form?
> 
> rams.samy wrote:
> > Bruno, See attached sample file with 2 fields.
> 
> OK,
> 
> actually there were more fields, but I dropped the second page.
> See http://www.1t3xt.info/examples/browse/?page=example&id=391
> 
> The advise I gave you this morning works (I was able to test
> it thanks to your example).
> 
> Then why didn't it work for you? Well, if you run the example,
> you'll see that I'm writing the field names to the System.out:
> 
> topmostSubform[0].Page1[0].NAME[0]
> topmostSubform[0].Page1[0].SN_NUMBER[0]
> 
> Those names may seem odd, but they are typical for forms created
> with Designer. However when I look at your code snippet, I see:
> 
> form.setField("SN_NUMBER","123456" );
> stamper.setFormFlattening(true);
> stamper.partialFormFlattening("SN_NUMBER");
> 
> That should have rung a bell, because SN_NUMBER is way too normal
> a name to be a field in a Designer created form.
> I think you'll see that your application will work as soon as you
> replace SN_NUMBER by topmostSubform[0].Page1[0].SN_NUMBER[0]
> 
> best regards,
> 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.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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