I've seen this before. You have a file with fields in the pages but nothing in 
the acroform dictionary. Acrobat is always helpful and instead of refusing to 
open a broken file it will reconstruct the acroform dictionary and make 
everything look good (when it isn't).

Paulo
  ----- Original Message ----- 
  From: Andy Wu 
  To: [email protected] 
  Sent: Friday, September 16, 2011 8:49 PM
  Subject: Re: [iText-questions] Form Flattening


  I certainly do have a form that I can fill in both with Adobe Reader and 
  iText, and it's not of the XFA variety.

  The "answer I've yet to find" that I'm referring to here is what the 
  clients are doing to it in filling it in and returning it in a condition 
  such that I can't flatten it.

  Thanks
  Andy

  On 16/09/2011 18:16, 1T3XT BVBA wrote:
  > On 16/09/2011 18:06, Andy Wu wrote:
  >> That's an answer I've yet to find
  > You can find out as is explained in chapter 8 of "iText in Action -
  > Second Edition":
  >
  > PdfReader reader = new PdfReader(src);
  > AcroFields form = reader.getAcroFields();
  >    XfaForm xfa = form.getXfa();
  > if (xfa.isXfaPresent()) System.out.println("XFA form");
  > Set<String>  fields = form.getFields().keySet();
  > for (String key : fields) {
  >         out.println(key);
  > }
  >
  > If you see "XFA form", then your form is created with LiveCycle Designer.
  > If fields are shown, then the form is hybrid: it contains XFA as well as
  > AcroFields.
  > If no fields are shown, only "XFA form", you have a pure XFA form (and
  > using setField() may not work).
  > If nothing is shown, you may think you have a form, but you don't.
  >
  >
  > 
------------------------------------------------------------------------------
  > BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
  > http://p.sf.net/sfu/rim-devcon-copy2
  > _______________________________________________
  > iText-questions mailing list
  > [email protected]
  > https://lists.sourceforge.net/lists/listinfo/itext-questions
  >
  > iText(R) is a registered trademark of 1T3XT BVBA.
  > Many questions posted to this list can (and will) be answered with a 
reference to the iText book: http://www.itextpdf.com/book/
  > Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


  ------------------------------------------------------------------------------
  BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
  http://p.sf.net/sfu/rim-devcon-copy2
  _______________________________________________
  iText-questions mailing list
  [email protected]
  https://lists.sourceforge.net/lists/listinfo/itext-questions

  iText(R) is a registered trademark of 1T3XT BVBA.
  Many questions posted to this list can (and will) be answered with a 
reference to the iText book: http://www.itextpdf.com/book/
  Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to