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

PDF form data isn't included in extracted content.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2
    • 1.5
    • general
    • 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. i-9_screenshot.png
          227 kB
          Tim Allison
        3. TIKA-973.patch.tar.gz
          524 kB
          Tim Allison

        Activity

          People

            tallison Tim Allison
            mohaine Michael Graessle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: