A Widget annotation does NOT have be an AcroForm field - it can just be an 
annotation on the page.   (granted, that would be strange and probably not very 
useful - but it's perfectly legal).

Leonard

-----Original Message-----
From: Paulo Soares [mailto:psoa...@glintt.com] 
Sent: Monday, November 23, 2009 10:06 AM
To: Post all your questions about iText here
Subject: Re: [iText-questions] AcroForm with empty Fields array

I'm not sure if I understand all this. It's legal to have fields that only 
exist as widgets but don't have an entry in the field array in acroforms? 

The pdf reference says about the /Fields entry in acroforms:

(Required) An array of references to the document's root fields (those with no 
ancestors in the field hierarchy).

I think that Leonard was refering to widgets as a way to show an appearance but 
not actual fields.

Paulo

> -----Original Message-----
> From: Gylfi Ingvason [mailto:gylfi.ingva...@solimarsystems.com]
> Sent: Monday, November 23, 2009 2:53 PM
> To: 'Leonard Rosenthol'; 'Post all your questions about iText here'
> Subject: Re: [iText-questions] AcroForm with empty Fields array
> 
> Thanks Leonard.
> 
> Since that is the case, I would suggest that the flatten form code in 
> the PdfStamper be amended to take that into account.
> 
> Paulo/Bruno would you agree?
> 
> I'm not familiar with the code that does this, but I'd be happy to try 
> to tackle it and submit the changes for review if that's what it 
> takes.
> 
> Gylfi
> 
> -----Original Message-----
> From: Leonard Rosenthol [mailto:lrose...@adobe.com]
> Sent: Saturday, November 21, 2009 5:28 PM
> To: gylfi.ingva...@solimarsystems.com; Post all your questions about 
> iText here
> Subject: RE: [iText-questions] AcroForm with empty Fields array
> 
> 
> There is nothing that says that all Widget annotations have 
> to be listed in
> the Fields array - they can just be regular annotations.  
> It's weird, but
> not illegal.
> 
> Leonard
> 
> -----Original Message-----
> From: Gylfi Ingvason [mailto:gylfi.ingva...@solimarsystems.com]
> Sent: Thursday, November 19, 2009 2:47 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] AcroForm with empty Fields array
> 
> Gents,
> 
> I use PdfStamper to flatten forms/free text and then 
> typically perform other
> operations using either PdfWriter or PdfCopy. This has been 
> working fine
> until recently when a customer complained that text fields in 
> an AcroForm
> were missing after flattening the form.
> 
> Upon investigating, I found that the Fields array of the 
> AcroForm was empty.
> The form does not get flattened because PdfStamper thinks 
> there is nothing
> to do. To my surprise, neither Acrobat nor the FoxIt Reader 
> complain about
> this - presumably because the Widget Annot is referenced by 
> the Page object.
> 
> Enclosed is a small file that I created by iText to 
> illustrate the problem.
> I have deliberately erased the contents of the Fields array 
> (it was '3 0 R')
> of the AcroForm (object 7) to simulate the user data.
> 
> Here's the interesting part - not only does the file display 
> fine, but if
> you use Acrobat to extract that page, it is smart enough to properly
> re-construct the Fields array in the process.
> 
> This brings up a couple of questions:
> 
> 1. Is it valid to not reference Widget Annots in a Form and 
> expect them to
> work?
> 
> The spec seem unambiguous to me that it isn't valid (see PDF 
> 32000-1:2008
> pg. 431: "Fields - (Required) An array of references to the 
> document's root
> fields (those with no ancestors in the field hierarchy)."). 
> Chapter 15 of
> Bruno's book seems to indicate that as well, but perhaps I'm missing
> something.
> 
> 2. What would be the best approach to deal with a form with 
> an empty Fields
> array, such that the text gets flattened, assuming that this is legal?
> 
> I have conveyed to the customer that I consider the file 
> damaged and he
> should get better tools, but it is hard to argue against 
> things like this
> where Acrobat gives no sign of anything being wrong. Thus, a 
> third question:
> 
> 3. Would it be reasonable to patch the iText code such that 
> form flattening
> takes place on Annots not referenced in the Fields array of the form?
> 
> Best regards,
> 
> Gylfi


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. 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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