ICEpdf
  1. ICEpdf
  2. PDF-1082

Text selection is selecting hidden text

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.3
    • Fix Version/s: 6.2
    • Component/s: Core/Parsing, Viewer RI
    • Labels:
      None
    • Environment:
      any

      Description

      The PDF in question is contains what appear to be to simple works. When selecting the text the two words are selected and the expected output is returned. However if we move the cursor a little bit more the last words highlight colour darkens and we get a lot more selected text.

      What is clear is that the second word is painted to 3 times but the other hidden text doesn't seem to be visibly painted. I think the rest of the text is being painted off screen but our new text select algorithm doesn't check for interesection and is keeping it.

      We do have support for repeated works with the system property org.icepdf.core.views.page.text.trim.duplicates=true. but in this case the words are drawn in slightly different locations which causes the duplication not to get picked up. This could probably be tweaked a bit to allow for a some deviation.

      There is quite a bit of work to be done to get this all working.

        Activity

        Hide
        Patrick Corless added a comment -

        Touched up our word duplication test to avoid using float values which are a little too precise for generating a duplication key. Checks for word duplication is a bit expensive and must be turned own with the following system property.

        -Dorg.icepdf.core.views.page.text.trim.duplicates=true

        Show
        Patrick Corless added a comment - Touched up our word duplication test to avoid using float values which are a little too precise for generating a duplication key. Checks for word duplication is a bit expensive and must be turned own with the following system property. -Dorg.icepdf.core.views.page.text.trim.duplicates=true
        Hide
        Patrick Corless added a comment -

        Making as fixed.

        Show
        Patrick Corless added a comment - Making as fixed.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: