Bug 90082 - cannot select gocr scan engine
Summary: cannot select gocr scan engine
Status: RESOLVED FIXED
Alias: None
Product: kooka
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Klaas Freitag
URL:
Keywords:
: 106137 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-23 11:38 UTC by Fred Schättgen
Modified: 2005-11-09 13:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Schättgen 2004-09-23 11:38:41 UTC
Version:           0.44 (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages

kooka doesn't want to use gocr for OCR.

In the perferences dialog, only gocr is detected, but not selected by default. After selecting it, kooka tells me to restart it in order to use the engine.
After the restart gocr is in fact selected, but when I click on Image->OCR Image, kooka complains that it can't find the ocrad binary and shows a dialog for ocrad afterwards instead of gocr as expected.
Comment 1 Klaas Freitag 2004-09-23 11:40:27 UTC
Is gocr really installed? Where?
Comment 2 Fred Schättgen 2004-09-23 11:54:15 UTC
It's installed in /usr/bin (debian package) and it's working from the command line. In the configuration dialog the gocr binary is listed with the full an correct path.

In the kookarc file, gocr there is this section:

[ocrDialog]
gocrBinary=/usr/bin/gocr
ocrEngine=gocr

But when I click "OCR Image" there's a popup saying "OCR Software not found", "The path to the ocrad binary is not configured yet.." etc.

The complete system setup is a clean install, so I've never upgraded from an older version of kooka. I've tried to delete kookarc, but that didn't change anything as expected.
Comment 3 Fred Schättgen 2004-09-23 12:13:57 UTC
I just looked at ksaneocr.cpp and it looks like GOCR is nowhere assigend tp m_ocrEngine. In the ctor of the class KSANEOCR the config file is only checked for ocrad (which is also the default) and for kadmos. 
The check for gocr seems to be missing though.
Comment 4 Detlef Oertel 2004-11-04 21:28:50 UTC
I can confirm this problem.
in my case, I can change to gocr, but ocrad still starts.
(Yes /usr/bin/gocr is there and with the right path selected)
My System is a Suse 9.2 x86_64
Linux sepia 2.6.8-24-default #1 Wed Oct 6 09:16:23 UTC 2004 x86_64 x86_64 x86_64 GNU/Linux
Kooka 0.44 (kde 3.3.0)
Comment 5 Anderson Medeiros Gomes 2004-12-21 22:06:34 UTC
I fixed this bug by changing the line 111 of the file kooka/ksaneocr.cpp to:
    } else if (eng == "gocr") { m_ocrEngine = GOCR; }
Comment 6 Anderson Medeiros Gomes 2004-12-21 22:10:27 UTC
Oops! Sorry. Wrong comment.
The line 111 is:
    else if (eng == "gocr") { m_ocrEngine = GOCR; } 
Comment 7 mauro.sacchetto 2005-07-14 22:45:03 UTC
As already told, I've the same problem
on a Slackware 10.1, with gord regularly
compiled and installed in /usr/bin

MS
Comment 8 Thiago Macieira 2005-07-15 03:28:15 UTC
*** Bug 106137 has been marked as a duplicate of this bug. ***
Comment 9 Fred Schättgen 2005-07-15 17:03:22 UTC
SVN commit 434828 by schaettgen:

Respect the user´s choice to use gocr.
I assume that the fix suggested in the bug report was 
silently accepted by the kooka maintainers. 
BUG:90082


 M  +8 -5      ksaneocr.cpp  


--- trunk/KDE/kdegraphics/kooka/ksaneocr.cpp #434827:434828
@@ -104,11 +104,14 @@
         konf->setGroup( CFG_GROUP_OCR_DIA );
         QString eng = konf->readEntry(CFG_OCR_ENGINE, "ocrad");
 
-	if( eng == "ocrad" )
-	{
-	    m_ocrEngine = OCRAD;
-	}
-
+        if( eng == "ocrad" )
+        {
+            m_ocrEngine = OCRAD;
+        }
+        else if( eng == "gocr" )
+        {
+            m_ocrEngine = GOCR;
+        }
 #ifdef HAVE_KADMOS
         else if( eng == QString("kadmos") ) m_ocrEngine = KADMOS;
 #endif
Comment 10 Raphaël Pinson 2005-11-09 13:25:37 UTC
I have got the same bug under Kubuntu 5.10 with KDE 3.4.3 
Although gocr is installed and configured in Kooka, it still starts ocrad everytime I want to use OCR ...