Skip to content

fix for information loss on footnotes/endnotes within XWPFRun.toString #3

Closed
wants to merge 1 commit into from

2 participants

@akhikhl
akhikhl commented Jun 12, 2013

Dear Apache POI Team,

Please consider a problem: whenever MS-Word document with footnotes/endnotes is being parsed with XWPFWordExtractor, information on the location of footnote/endnote references is lost. This information loss is clearly observed in, for example, Apache Tika output.

To reproduce a problem, please insert the following code to TestXWPFWordExtractor.testFootnotes:

    java.io.FileWriter w = new java.io.FileWriter(new java.io.File(System.getProperty("user.home"), "footnotes.output.txt"));
    try {
      w.write(extractor.getText());
    } finally {
      w.close();
    }

then run tests and inspect the content of "footnotes.output.txt" - it contains "Eto ochen prostoy text so snoskoy", where between "prostoy" and "text" there should be a footnote reference (and it is lost).

SOLUTION:
I suggest to introduce additional markup like [footnoteRef:num], [endnoteRef:num], which will allow applications to correctly render footnote references.

Please, see commit details.

@Gagravarr

Thanks, committed in r1492308. (That should mirror through to git shortly)

@Gagravarr Gagravarr added a commit that referenced this pull request Jun 12, 2013
@Gagravarr Gagravarr Patch from akhikhl from github pull #3 - Extract references from XWPF…
… footnotes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1492308 13f79535-47bb-0310-9956-ffa450edef68
8185178
@ischindl ischindl pushed a commit to ischindl/poi that referenced this pull request Jul 9, 2014
@Gagravarr Gagravarr Patch from akhikhl from github pull #3 - Extract references from XWPF…
… footnotes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1492308 13f79535-47bb-0310-9956-ffa450edef68
3c62ed6
@asfgit asfgit pushed a commit that closed this pull request Jan 4, 2016
@poi-benchmark poi-benchmark Dummy commit to try if we can close some old github PRs via commit-co…
…mments: closes #2, closes #3, closes #4, closes #19

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722963 13f79535-47bb-0310-9956-ffa450edef68
5d79479
@asfgit asfgit closed this in 5d79479 Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.