Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-973

PDF form data isn't included in extracted content.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.5
    • Component/s: general
    • Labels:
      None

      Description

      When extracting content from PDFs, PDF form data isn't extracted.

      The following code extracts this data via PDF box, but it seems like something Tika should be doing.

      PDDocumentCatalog docCatalog = load.getDocumentCatalog();
      if (docCatalog != null) {
      PDAcroForm acroForm = docCatalog.getAcroForm();
      if (acroForm != null) {
      @SuppressWarnings("unchecked")
      List<PDField> fields = acroForm.getFields();
      if (fields != null && fields.size() > 0) {
      documentContent.append(" ");
      for (PDField field : fields) {
      if (field.getValue()!=null)

      { documentContent.append(field.getValue()); documentContent.append(" "); }

      }
      }
      }
      }

        Attachments

        1. TIKA-973-patch.tar.gz
          469 kB
          Tim Allison
        2. TIKA-973.patch.tar.gz
          524 kB
          Tim Allison
        3. i-9_screenshot.png
          227 kB
          Tim Allison

          Activity

            People

            • Assignee:
              tallison@apache.org Tim Allison
              Reporter:
              mohaine Michael Graessle
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: