ICEpdf
  1. ICEpdf
  2. PDF-872

Searching existing term returns 0 match with DocumentSearchController.searchPage

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.2
    • Fix Version/s: 6.0
    • Component/s: API
    • Labels:
      None
    • Environment:
      Windows 7 enterprise
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Yes, I created my own DocumentSearchController extending DocumentSearchController.
      Example for searchHighlightPage:
      public List searchHighlightPage(int nPage, int searchPadding) {

             PageText aPageText=controller.getDocument().getPageText(nPage);
             if(aPageText!=null) {
      java.util.ArrayList<LineText> aLinTextArr=aPageText.getPageLines();

      if(aLinTextArr!= null && aLinTextArr.size()!=0){
                              //Loop on each LineTxt
      for (LineText currentText : aLinTextArr) {
      aWordTextArrLst=currentText.getWords();
      if(aWordTextArrLst!=null && aWordTextArrLst.size()>0){
                                              //Search for an occurence of the pattern
      if(isTextIncluded(aWordTextArrLst, shortPattern)){
      finalLineItems.add(currentText);
      }
      }
      }
      }
      }

      ....

       
      Show
      Yes, I created my own DocumentSearchController extending DocumentSearchController. Example for searchHighlightPage: public List searchHighlightPage(int nPage, int searchPadding) {        PageText aPageText=controller.getDocument().getPageText(nPage);        if(aPageText!=null) { java.util.ArrayList<LineText> aLinTextArr=aPageText.getPageLines(); if(aLinTextArr!= null && aLinTextArr.size()!=0){                         //Loop on each LineTxt for (LineText currentText : aLinTextArr) { aWordTextArrLst=currentText.getWords(); if(aWordTextArrLst!=null && aWordTextArrLst.size()>0){                                         //Search for an occurence of the pattern if(isTextIncluded(aWordTextArrLst, shortPattern)){ finalLineItems.add(currentText); } } } } } ....  

      Description

      Searching for "Appendices 30, 30A and 30B" returns 0 match in a document where such terms occur.
      I tried using the API (I.e DocumentSearchController.searchPage) and via the Search tab of the viewer.
      This term exists in the document and Acrobat Reader found several occurrences. (E.g p 197 of the enclosed file)

      I noticed that matches are found with 5.1.1

      The pdf is accessible from http://www.itu.int/dms_pub/itu-s/oth/02/02/S02020000244501PDFE.pdf

        Activity

        Hide
        Patrick Corless added a comment -

        Marking as closed

        Show
        Patrick Corless added a comment - Marking as closed
        Hide
        Patrick Corless added a comment -

        We've done some further work to fix some ordering and word detection which corrects the searching results for this pdf.

        Show
        Patrick Corless added a comment - We've done some further work to fix some ordering and word detection which corrects the searching results for this pdf.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: