On 10/8/2014 0:45 AM, tanshi...@sina.com wrote:

Dear all,


I have a problem with itext , when i open a pdf to get the fields with the code behind.


AcroFields acroFields = pdf.AcroFields;


but the returned acrofields is null.

it worked  fine in some pdf, but there was problem in some other  pdf.



If your code works for most forms, but not for some, then there's a high chance that the forms for which the code doesn't work are broken ("broken" as in "bad PDFs"). I forgot the name of the tool, but in the past, we've encountered PDF files that had widget annotations in the /Annots of the page, but that didn't have any form fields that corresponded with those widget annotations. This inspired me to write the following example: http://itextpdf.com/examples/iia.php?id=236

In short: you may want to check if the PDF is correct rather than asking why iText doesn't work ;-)
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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