OCRmyPDF doesn't scan

Hello again,

I insalled OCR app

when we want to scan a file - this pending appear on top

OCR: 2 currently pending files in queue.

I read on forum,

  1. run — OCRWorker.php -----from …nextcloud/apps/ocr/worker

from this folder i run the command (if i put some system out lines in this php after run i can see only lines before WHILE function )

php OCRWorker.php

but nothing happend

//////// I reinstall the OCR app, clear - oc_ocr_status - from database

I tried again - with same result

2 . I can scan PDF in Romanian language ? It is an addon for this language ?

Thank you!

Did you install tesseract and OCRmyPDF? and also the necessary language (romanian)? The message queing capabilities also have ot be available for php (semaphore functions).

First of all I have CENTOS 7 (PHP 5.6.30, PostgreSQL 9.4.4 ) with NextCloud 11.0.3 (stable)

Did you install tesseract
YES > from Github with ./install-tesseract.sh

[root]# tesseract -v
tesseract 3.05.00
_ leptonica-1.74.1_
_ libjpeg 6b (libjpeg-turbo 1.2.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7_

YES > pip3.6 install ocrmypdf

[root]# ocrmypdf -v
Traceback (most recent call last):
_ File “/usr/bin/ocrmypdf”, line 7, in _
_ from ocrmypdf.main import run_pipeline_
_ File “/usr/lib/python3.6/site-packages/ocrmypdf/main.py”, line 26, in _
_ from .pipeline import JobContext, JobContextManager, re_symlink, _
_ File “/usr/lib/python3.6/site-packages/ocrmypdf/pipeline.py”, line 30, in _
_ from . import leptonica_
_ File “/usr/lib/python3.6/site-packages/ocrmypdf/leptonica.py”, line 18, in _
_ lept = ffi.dlopen(find_library(‘lept’))_
OSError: cannot load library ‘liblept.so.5’: liblept.so.5: cannot open shared object file: No such file or directory

and also the necessary language (romanian)?

NO > I don’t know how can install romanian language, but i have an english PDF
Available language are only

The message queing capabilities also have ot be available for php (semaphore functions).

Sorry i don’t understand this - please explain it for a beginner user.

Thank you very much for help - this problem is very important for us!

Thanks for this information! I guess your ocrmypdf installation didn’t go well. Because the output you give here, is a traceback (an error). You can try to reinstall it or look at https://ocrmypdf.readthedocs.io/en/latest/installation.html for further help, because I have not really much experience with CENTOS yet.

Now OCRmyPDF works perfectly, we tested it from the command line,

but NextCloud OCR app doesn’t work - same behavior as in first post.

It is a procedure(step by step) for debugging ?

After a refresh i saw this … maybe can help

Thank you sir!

Hi, it seems to me, that this has nothing to do with OCR now, it’s reporting a CSRF check failed:

I don’t know how that can be fixed, but I assume, that there could be a corresponding log entry for this, as the CSRF check takes place in nextcloud, as far as I know.

Hi, I have recently released a new Release Candidate (beta) but it’s using Docker containers and offers easier configuration. Maybe you can check this out and try.

Dear sir,

thank you for your care!

I upgrade NextCloud 11 to NextCloud 12 and PHP 5.6 to PHP 7.0 on test server and fresh install NextCloud 12 with PHP 7.1 on production server.

The activate button is fade out for OCR app on both servers.

The similar problem with SSO & SAML app was resolved with downgrade PHP 7.1 to PHP 7.0.

Can you give me an advice?

Thank you again!

I guess the php-redis module is not installed. Just install this php module and the installation should succeed.

Yes the php-redis is the answer, now i can activate the OCR app. Thank You!

I found your guide to install app https://github.com/janis91/ocr/wiki/Installation-and-Configuration-(Docker-setup) , but because of my less experience with Docker, I got stuck.

I installed Docker CE and i tested with
docker run hello-world
and Docker works.

Where is redis/ directory ?
Worker folder is var/www/html/nextcloud/apps/ocr/worker ?
The errors are

Maybe a video tutorial with installing OCR app will help the community and will be gold for us.

For this kind of video tutorial, i use ISPRING 8 free https://www.ispringsolutions.com/ispring-free/download.html , maybe this small hint will save some time.

Best regards,

@janis91 can you explain where ist the redis Location?

I have these Directorys:

find / -name redis

There are two Dockerfiles that have to be build, the one in the worker/ dir and the one in the redis/ dir of the app.

it must be an docker Container?

After 1 year I have time to reopen this project

On our server is installed CENTOS 7 and PHP 7.1

I installed Docker and REDIS, I ran the command into the …nextcloud/apps/ocr/redis folder and it worked

After that, in the …nextcloud/apps/ocr/Worker folder, I’m trying to run this command

docker build --build-arg LANGUAGES=“tesseract-ocr-eng” -t root/ocr .

but I get this error

Is it just a proxy problem?

I tried to add this instruction

RUN export http_proxy=“http://10.x.x.10:8080/” && export https_proxy=“http://10.x.x.10:8080/

after first line

FROM ubuntu:17.10

But, it didn’t work

Centos does not have apt, this is for debian based linux. Centos works with yum instead which is for Red Hat based linux.