Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3706

Article separation with PDFTextStripper

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.0.4
    • None
    • Text extraction
    • None
    • Java 1.7, Windows 10 x64,

    Description

      I found no solution in PDFTextStripper which realy separates text articles with the method setArticleStart or setArticleEnd. Currently it seems the article start is always after the page start and the article end is always before the page end.

      When I extract the content of the atachment as xml with article tags i get the following:

      <article>
      <paragraph>
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      </paragraph>
      <paragraph>
      Einfacher Textinhalt - 1* eingerückt
      Einfacher Textinhalt - 1* eingerückt
      Einfacher Textinhalt - 1* eingerückt
      </paragraph>
      <paragraph>
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      </paragraph>
      <paragraph>
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      </paragraph>
      <paragraph>
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      </paragraph>
      </article>

      I would expect:

      <article>
      <paragraph>
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      </paragraph>
      <paragraph>
      Einfacher Textinhalt - 1* eingerückt
      Einfacher Textinhalt - 1* eingerückt
      Einfacher Textinhalt - 1* eingerückt
      </paragraph>
      <paragraph>
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      </paragraph>
      </article>
      <article>
      <paragraph>
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      Einfacher Textinhalt - nicht eingerückt
      </paragraph>
      </article>
      <article>
      <paragraph>
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      Einfacher Textinhalt - 2* eingerückt
      </paragraph>
      </article>

      Attachments

        1. text-paragraphs-simple-beads.pdf
          9 kB
          Maruan Sahyoun
        2. text-paragraphs-simple.pdf
          6 kB
          Daniel Ritter

        Activity

          People

            msahyoun Maruan Sahyoun
            spellsleeper Daniel Ritter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: