ICEpdf
  1. ICEpdf
  2. PDF-1066

Copy/Paste issue (existing space removed after paste)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 6.1.2
    • Fix Version/s: 6.3.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Windows 7
    • Workaround Description:
      Hide
      -Dorg.icepdf.core.views.page.text.spaceFraction=4 (default is 3). This allows the space detection algorithm to see a slightly smaller gap as a space. Normally it's 1/3 the max characters width, the the above system property its now 1/4 the max characters width.
      Show
      -Dorg.icepdf.core.views.page.text.spaceFraction=4 (default is 3). This allows the space detection algorithm to see a slightly smaller gap as a space. Normally it's 1/3 the max characters width, the the above system property its now 1/4 the max characters width.

      Description

      The paste of a selection does not contain the space which was copied from selection in a displayed PDF.
      It can be reproduced with the enclosed file:A4-RR2016-VolII-E_cover_orig.pdf
      page#:106
      selected text:Appendix 30A earth

      The paste text will be "Appendix 30Aearth"
      This copy/paste works on the other main viewer.

        Activity

        Olivier Chuzel created issue -
        Olivier Chuzel made changes -
        Field Original Value New Value
        Attachment A4-RR2016-VolII-E_cover_orig.pdf [ 22384 ]
        Hide
        Olivier Chuzel added a comment -

        The inverse problem occurs too.
        For example:
        page 658 of the enclosed document:
        Text: "Articles 13 and 14" is copied/paste and the paste text becomes "Articles 13 and 14"
        i.e double space between "and" and "14".

        Show
        Olivier Chuzel added a comment - The inverse problem occurs too. For example: page 658 of the enclosed document: Text: "Articles 13 and 14" is copied/paste and the paste text becomes "Articles 13 and 14" i.e double space between "and" and "14".
        Hide
        Olivier Chuzel added a comment -

        It is not just a matter of copy/paste since the search in the ICE Pdf Viewer finds the text only if we add this extra space.
        E.g
        'Articles 13 and 14', 2 space between and and 14, is found page 658 although it does not really contain this extra space

        Show
        Olivier Chuzel added a comment - It is not just a matter of copy/paste since the search in the ICE Pdf Viewer finds the text only if we add this extra space. E.g 'Articles 13 and 14', 2 space between and and 14, is found page 658 although it does not really contain this extra space
        Patrick Corless made changes -
        Fix Version/s 6.1.4 [ 13090 ]
        Patrick Corless made changes -
        Comment [ A very unique PDF that has a text layout that we haven't seen or no one has taken notices. When creating the bounding box we always he assume box should be create with the x,y at the lower left but in the instance of this pdf the font size is negative which creates right to left layout which is then mirrored by the current gs transform. The problem with the layout is that we create the bounding box incorrectly and everything goes sideways from there.

        I've added some code to detect the negative layout and thus we create the correct bound. Everything works as expected afterwards. ]
        Patrick Corless made changes -
        Workaround Description -Dorg.icepdf.core.views.page.text.spaceFraction=4 (default is 3). This allows the space detection algorithm to see a slightly smaller gap as a space. Normally it's 1/3 the max characters width, the the above system property its now 1/4 the max characters width.
        Patrick Corless made changes -
        Fix Version/s 6.2 [ 13090 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49992 Wed Jan 11 15:03:09 MST 2017 patrick.corless PDF-1066 added bbox correcting code for negative width layout.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/TextSprite.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49993 Wed Jan 11 15:03:20 MST 2017 patrick.corless PDF-1066 added bbox correcting code for negative width layout.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-6.1.0/icepdf/core/src/org/icepdf/core/pobjects/graphics/TextSprite.java
        Patrick Corless made changes -
        Fix Version/s 6.3.1 [ 13113 ]
        Hide
        Patrick Corless added a comment -

        System property workaround the is the preferred solution.

        Show
        Patrick Corless added a comment - System property workaround the is the preferred solution.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Olivier Chuzel
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: