Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Re: Form Filling is not working

faisal maqsood

2005-06-22

Replies:

I got the solution. Problem was below:

When getting an object of 'PdfStamper', two different constructors are
provided.
  (Method-1)   obj_pdfStamper = new PdfStamper(obj_pdfReader, obj_fos);
  (Method-2)   obj_pdfStamper = new PdfStamper(obj_pdfReader, obj_fos,
obj_pdfReader.getPdfVersion(), true);

In a PDF form if there are multiple interactive fields with same name then
these are of one group.
If field is a check box, I was updating the values using the following code
with perticular field dictionary.

  pdfDic.put(PdfName.AS, new PdfName(str_newValue));

I noticed that when I was using (Method-1), new value was not saved while by
using (Method-2), new value was saved.

But problem to follow (Method-2) is that it corrupted the already signed PDF
signatures.

Now I am using following way and there seems to be no problem:

  obj_pdfStamper.getAcroFields().setField(str_fieldName, str_newValue);

Regards,
Faisal

"Paulo Soares" <psoares@(protected)
news:2B48A868C102134F88BDCD68033EB6A3D7EE68@(protected)...
I've no idea what you are talking about.

> -----Original Message-----
> From: itext-questions-admin@(protected)
> [mailto:itext-questions-admin@(protected)
> Behalf Of iText General
> Sent: Tuesday, June 21, 2005 8:28 AM
> To: itext-questions@(protected)
> Subject: [iText-questions] Form Filling is not working
>
> Hi folks,
>
> I tried to update values for checkbox, radio button and text
> fields but I'm
> dud. I am using append mode to save signature of invalid.
>
> I noticed that if there are such fields which names are same,
> can not be
> updated with following way:
>
> ***   pdfDic.put(PdfName.AS, new PdfName(str_newValue));   ***
>
> Any solution please?
>
> Note: Above code works when I use "PdfStamper" with two
> parameters but then
> signatures become corrupted.
>
> Regards,
> Faisal
>
>
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> iText-questions mailing list
> iText-questions@(protected)
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
©2008 junlu.com - Jax Systems, LLC, U.S.A.