Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Fields are validated and/or formatted according to their <code>AA</code> (additional actions) entry, which practically is JavaScript function call. Unfortunately, <code>pdftk</code> ignores this entry and doesn't export it neither to FDF (<code>generate_fdf</code>) nor text (<code>dump_data_fields</code>). Messing with <code>pdftk</code>'s source is above my abilities. If you won't find any ready-made solution that extracts this kind of information from PDF form, you can write a small program using API that either provides access to all field's properties or low level COS structure. E.g.</p> <pre><code>$ perl -Mstrict -MCAM::PDF -we ' my $doc = CAM::PDF-&gt;new($ARGV[0]) or die(); for ($doc-&gt;getFormFieldList()) { my $field = $doc-&gt;getFormField($_); next unless defined $field; my $dict = $doc-&gt;getValue($field); next unless exists $$dict{FT} and $doc-&gt;getValue($$dict{FT}) eq "Tx"; print "Field \"$_\" "; my $AA = $doc-&gt;getValue($$dict{AA}); my $F = $doc-&gt;getValue($$AA{F}); my $JS = $doc-&gt;getValue($$F{JS}); print $JS ? "is formatted as \"$JS\"\n" : "is a plain text\n"; } ' MIVoterRegistration_97046_7.pdf </code></pre> <p>Sorry for example PDF :-), that's the first quick google result that, I checked, <em>does</em> contain <code>AA</code>s. And output is</p> <pre><code>Field "LastName" is a plain text Field "FirstName" is a plain text Field "Middle Name" is a plain text Field "Address" is a plain text Field "Apart#" is a plain text Field "City" is a plain text Field "ZipCode" is a plain text Field "Telephone" is formatted as "AFSpecial_Format(2);" Field "describe" is a plain text Field "c/t" is a plain text Field "County" is a plain text Field "School" is a plain text Field "MailAddress" is a plain text Field "DOB" is a plain text Field "DLNumber" is a plain text Field "DLState" is a plain text Field "SSNumber" is a plain text Field "PrevAddress" is a plain text Field "PrevC/T" is a plain text Field "PrevCounty" is a plain text Field "PrevState" is a plain text Field "PrevZipCode" is a plain text Field "PrevName" is a plain text </code></pre> <p>Functions, that define field format, are described <a href="http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FormsAPIReference.pdf" rel="nofollow">here</a>, and <code>AFSpecial_Format(2)</code> is indeed phone number format. Curiously, it looks like all other form's fields were thought unimportant by form's creators :-).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload