code: public boolean isValid() {
          if (documentFields.size() == 0) return false;
          put(PdfName.FIELDS, documentFields);
          if (sigFlags != 0)
              put(PdfName.SIGFLAGS, new PdfNumber(sigFlags));
          if (calculationOrder.size() > 0)
              put(PdfName.CO, calculationOrder);
          if (fieldTemplates.isEmpty()) return true;
          PdfDictionary dic = new PdfDictionary();
          for (Iterator it = fieldTemplates.keySet().iterator(); it.hasNext();) {
              PdfTemplate template = (PdfTemplate)it.next();
              PdfFormField.mergeResources(dic, (PdfDictionary)template.getResources());
          }
          put(PdfName.DR, dic);
          put(PdfName.DA, new PdfString("/Helv 0 Tf 0 g "));
          PdfDictionary fonts = (PdfDictionary)dic.get(PdfName.FONT);
          if (fonts != null) {
              writer.eliminateFontSubset(fonts);
          }
          return true;
      }
docs: Checks if the Acroform is valid
  @return true if the Acroform is valid