Two things based on my reading of the /JAVA/ code:

1) FdfReader doesn't support values that are an array.
2) AcroFields just calls getValue/setValue once for each field.  No effort is 
made to check list options or update field flags.

Part of the problem with #1 is that it shouldn't work at all.  When FdfReader 
is asked for a field's value, it gets the /V key, and does this:

if (v.isName()){...} 
else if (v.isString()) {...}

There's no clause for v.isArray(), it should fall through and return null.  
Don't you love running into things that never should have worked in the first 
place?  Obviously it does work (to some degree).  Either iTextSharp's code 
differs a bit (possible but unlikely), or I'm missing something.

I'd call it a bug, but one could easily argue that fixing this would be more of 
a Feature Request.  Regardless of what you call it, there's a hole in our FDF 
support.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
Disclaimer<Cardiff> DisCard = null;
 

> -----Original Message-----
> From: GSI-Rob [mailto:rw...@gsihosting.com]
> Sent: Wednesday, April 07, 2010 12:49 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] SetFields Issue - Using iTextSharp
> 
> 
> Funny thing, added a little code to write out the fdf file and in
> itextsharp
> 5.0.1.1 it errors saying "The given key was not present in the
> dictionary."
> 
>             Dim ofdfWriter As New FdfWriter()
>             ofdfWriter.SetFields(ofdfReader)
> 
>             Dim MemStream2 As New System.IO.MemoryStream
>             ofdfWriter.WriteTo(New FileStream("test.fdf",
> FileMode.OpenOrCreate, FileAccess.ReadWrite))
> 
> 
> I reverted back to itextsharp 5.0.0.0 and ran the same code and it outputs
> the fdf file, without a problem.  The other 2 previously discribed issues
> still exist in 5.0.0.0.
> 
> fdf content below.
> 
> 
> %FDF-1.2
> %âãÏÓ
> 1 0 obj
> <</FDF<</Fields[<</V[(item1)(item3)]/T(List Box1)>>]>>>>
> endobj
> trailer
> <</Root 1 0 R>>
> %%EOF
> 
> 
> 
> 
> 
> Mark Storer-2 wrote:
> >
> > May we see your FDF as well?  Just a quick sanity check.
> >
> > --Mark Storer
> >   Senior Software Engineer
> >   Cardiff.com
> >
> >
> 
> --
> View this message in context: http://old.nabble.com/SetFields-Issue---
> Using-iTextSharp-tp28169721p28170108.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> 
> --------------------------------------------------------------------------
> ----
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> 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.801 / Virus Database: 271.1.1/2786 - Release Date: 04/06/10
> 23:32:00

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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