1
votes

I try integrate OCR in Alfresco but no success. I instal

 alfresco-community-installer-201612-win-x64 

and after that i instal tesseract in C:\Program Files (x86)\Tesseract-OCR

Then I try to integrate tesseract in alfresco,

first i create in C:\alfresco-community bat file OCR.bat

REM to see what happens
echo from %1 to %2 >>C:\tmp\ocrtransform.log

copy /Y %1 C:\TMP\%~n1%~x1

REM  call tesseract and redirect output to $TARGET
"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" C:\TMP\%~n1%~x1 %~d2%~p2%~n2 -l eng
del C:\TMP\%~n1%~x1

Then three transformation xml added in "C:\alfresco-community\tomcat\shared\classes\alfresco\extension"

ocrpng-transform-context.xml

ocrjpeg-transform-context.xml

ocrtiff-transform-context.xml

then create an empty file name with ocrtransform.log in "C:\TMP"

and Downolad this jar from this link(https://docs.google.com/file/d/0B94FD2QmPSJCNHpuUVlicW95UjA/edit) and place this jar in this path "C:\Alfresco\tomcat\lib".

I use this link

http://alfrescosolutionsv.blogspot.com/2014/07/alfresco-integration-with-tesseract.html

but not working. Where I make mistake? Do I need to add anything else?

Any suggestion, idea?

2

2 Answers

1
votes

I am not able to find where are you missing something.

I made this thing earlier. what I did is I just made one context file, one bat file, and just install tesseract.

Download this file and just put context file in "C:\alfresco-community\tomcat\shared\classes\alfresco\extension" and bat file here C:\alfresco-community and install tesseract.

BoooM It's Done....

0
votes

It can be very late answer but I hope my answer can help someone else.

If your Alfresco is installed other than C:\alfresco-community directory, you need to edit parameters inside context file. And don't forget to restart TomCat server. For example like below:

    <value>C:\Windows\System32\cmd.exe</value>
    <value>/C</value>
    <value>dir D:\alfresco-community\ocr.bat</value>