java - finding out required fields to fill in pdf file -


I am starting with new functionality in my Android application which will help fill out some PDF forms.

I know that the best solution would be to use the eText Library.

I can read the file, and read AcroFields from the document, but is there any possibility of detecting that specific fields are marked as necessary?

I tried to find this option in the API documentation and on the internet but could not help anything in solving this problem.

Please take a look at section 13.3.4 of the heading "Acroorforms Receipt". The list 13.15 shows a code snippet from the example that checks whether a field is a password or multi-line field.

With a few minor changes, you can customize that example to examine the required fields:

for (map entry.lt; string, AcroFields.Item & gt; Entry: fields.entrySet ()) {out.write (entry.getKey ()); Item = entry.getValue (); Dict = item.getMerged (0); Flags = dict.getAsNumber (PdfName.FF); If (flags! = Null & amp; (flags.intValue () and basefield. REQUIRED). Type ("- & gt; Required \ n"); }

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -