<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>311045</bug_id>
          
          <creation_ts>2012-12-02 21:30:06 +0000</creation_ts>
          <short_desc>Search strings should be parsable from the command-line</short_desc>
          <delta_ts>2019-03-16 00:08:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>okular</product>
          <component>general</component>
          <version>0.15.3</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>362038</dup_id>
          
          <bug_file_loc>http://ge.tt/5qMRFmS/v/0?c</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Florian Moretz">comeniusmar</reporter>
          <assigned_to name="Okular developers">okular-devel</assigned_to>
          <cc>aacid</cc>
    
    <cc>comeniusmar</cc>
    
    <cc>david.a.ordenes.d</cc>
    
    <cc>joaonetto901</cc>
    
    <cc>pip.kde</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1320520</commentid>
    <comment_count>0</comment_count>
    <who name="Florian Moretz">comeniusmar</who>
    <bug_when>2012-12-02 21:30:06 +0000</bug_when>
    <thetext>Evince offers a command-line argument that allows users to parse a search string into the search field. For instance,

evince --find=searchterm document.pdf

will open the document with &quot;searchterm&quot; in the search field. Invoking the search field  - e.g. by hitting CTRL+F - then searches through the document for &quot;searchterm&quot;.

The key application of this feature is the integration of PDF viewers into document indexers such as Recoll (http://www.lesbonscomptes.com/recoll/release-1.18.html). 

As of its newest release, Recoll supports the indexing of phrases in the context of their position within the document. If a corresponding match is found Recoll directly parses the page number and the stemmed search term to evince. You can see the feature in action here: https://www.youtube.com/watch?v=GeeIBP8PbGE

One important note: Evince only searches through the document after activating its search field. This option is important as searching through large PDF documents can be ressource heavy at times. If the instance of the search term is obvious enough on the page, e.g. in case of a heading,  a search  might be unnecessary. Giving the user the option to either use the automatic search or manually scan through the page for the search term alleviates this.

Proposal:

Add a command-line option akin to the one in Evince, which allows parsing search terms to Okular&apos;s search field. Optionally add a command line switch that determines whether Okular immediately engages in a search upon opening the document or only after activating the search field.
 
-------------------------------------------------------------------------------------------------------------------------

Summary: 

Adding a command-line option to parse search strings into okular would significantly improve its integration with powerful indexing tools such as Recoll

Reproducible: Always</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1320548</commentid>
    <comment_count>1</comment_count>
    <who name="Florian Moretz">comeniusmar</who>
    <bug_when>2012-12-02 23:04:38 +0000</bug_when>
    <thetext>I forgot to add that this option should preferrably work with the &quot;--unique&quot; switch, so that you can easily jump between pages and search terms within the same instance of an opened document.

Also, here&apos;s a link to download the original screencast of the youtube video I linked to above: http://ge.tt/5qMRFmS/v/0?c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844325</commentid>
    <comment_count>2</comment_count>
    <who name="João Netto">joaonetto901</who>
    <bug_when>2019-03-14 23:46:29 +0000</bug_when>
    <thetext>Isn&apos;t this implemented with https://phabricator.kde.org/D18144?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1844486</commentid>
    <comment_count>3</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2019-03-16 00:08:15 +0000</bug_when>
    <thetext>Yes

*** This bug has been marked as a duplicate of bug 362038 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>