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

Missing many embedded images in .doc files

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0, 1.15
    • Component/s: None
    • Labels:
      None

      Description

      On a slightly deeper look at the comparison results between 1.14 and trunk, it looks like we're missing quite a few embedded images from .doc files. I initially thought these could be explained by different handling of macros, but that's not the issue.

      I haven't traced the commit that did it (very likely my fault), but...
      when we call this with a null character run.

              // Handle any pictures that we haven't output yet
              for (Picture p = pictures.nextUnclaimed(); p != null; ) {
                  handlePictureCharacterRun(
                          null, p, pictures, xhtml
                  );
                  p = pictures.nextUnclaimed();
              }
      

      the null character run then triggers skipping of the picture in this check because isRendered(cr) returns false if cr is null

              if (!isRendered(cr) || picture == null) {
                  // Oh dear, we've run out...
                  // Probably caused by multiple \u0008 images referencing
                  //  the same real image
                  return;
              }
      

        Attachments

        1. 778695.doc
          1.08 MB
          Tim Allison

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tallison@apache.org Tim Allison
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: