<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: alfresco-simple-ocr error on macOS in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5109#M2466</link>
    <description>&lt;P&gt;I'd suggest you to use the dockerized version that can be produced with:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-docker-installer" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-docker-installer&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 15:44:04 GMT</pubDate>
    <dc:creator>angelborroy</dc:creator>
    <dc:date>2020-02-21T15:44:04Z</dc:date>
    <item>
      <title>alfresco-simple-ocr error on macOS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5108#M2465</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have installed the addon alfresco-simple-ocr by keensoft and all its dependencies (ocrmypdf, tesseract, imagemagick). When I tried to OCR a pdf it throws me this error&lt;/P&gt;&lt;PRE&gt;Exception in thread "defaultAsyncAction1" java.lang.RuntimeException: java.lang.RuntimeException: org.alfresco.service.cmr.repository.ContentIOException: 01190024 Failed to perform OCR transformation:
Execution result:
   os:         Mac OS X
   command:    /usr/local/bin/ocrmypdf --verbose 1 --force-ocr -l spa+eng+fra --output-type pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757.pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757_ocr.pdf
   succeeded:  false
   exit code:  1
   out:
   err:        Traceback (most recent call last):
  File "/usr/local/bin/ocrmypdf", line 5, in &amp;lt;module&amp;gt;
    from ocrmypdf.__main__ import run
  File "/usr/local/Cellar/ocrmypdf/9.5.0/libexec/lib/python3.7/site-packages/ocrmypdf/__init__.py", line 18, in &amp;lt;module&amp;gt;

	at es.keensoft.alfresco.ocr.OCRExtractAction.executeImplInternal(OCRExtractAction.java:196)
	at es.keensoft.alfresco.ocr.OCRExtractAction.access$400(OCRExtractAction.java:39)
	at es.keensoft.alfresco.ocr.OCRExtractAction$1.execute(OCRExtractAction.java:177)
	at es.keensoft.alfresco.ocr.OCRExtractAction$1.execute(OCRExtractAction.java:174)
	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
	at es.keensoft.alfresco.ocr.OCRExtractAction.executeInNewTransaction(OCRExtractAction.java:182)
	at es.keensoft.alfresco.ocr.OCRExtractAction.access$300(OCRExtractAction.java:39)
	at es.keensoft.alfresco.ocr.OCRExtractAction$ExtractOCRTask$1$1.doWork(OCRExtractAction.java:159)
	at es.keensoft.alfresco.ocr.OCRExtractAction$ExtractOCRTask$1$1.doWork(OCRExtractAction.java:156)
	at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:126)
	at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:95)
	at es.keensoft.alfresco.ocr.OCRExtractAction$ExtractOCRTask$1.doWork(OCRExtractAction.java:155)
	at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:588)
	at es.keensoft.alfresco.ocr.OCRExtractAction$ExtractOCRTask.run(OCRExtractAction.java:152)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: org.alfresco.service.cmr.repository.ContentIOException: 01190024 Failed to perform OCR transformation:
Execution result:
   os:         Mac OS X
   command:    /usr/local/bin/ocrmypdf --verbose 1 --force-ocr -l spa+eng+fra --output-type pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757.pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757_ocr.pdf
   succeeded:  false
   exit code:  1
   out:
   err:        Traceback (most recent call last):
  File "/usr/local/bin/ocrmypdf", line 5, in &amp;lt;module&amp;gt;
    from ocrmypdf.__main__ import run
  File "/usr/local/Cellar/ocrmypdf/9.5.0/libexec/lib/python3.7/site-packages/ocrmypdf/__init__.py", line 18, in &amp;lt;module&amp;gt;

	at es.keensoft.alfresco.ocr.OCRTransformWorker.transform(OCRTransformWorker.java:86)
	at es.keensoft.alfresco.ocr.OCRExtractAction.executeImplInternal(OCRExtractAction.java:194)
	... 16 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 01190024 Failed to perform OCR transformation:
Execution result:
   os:         Mac OS X
   command:    /usr/local/bin/ocrmypdf --verbose 1 --force-ocr -l spa+eng+fra --output-type pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757.pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757_ocr.pdf
   succeeded:  false
   exit code:  1
   out:
   err:        Traceback (most recent call last):
  File "/usr/local/bin/ocrmypdf", line 5, in &amp;lt;module&amp;gt;
    from ocrmypdf.__main__ import run
  File "/usr/local/Cellar/ocrmypdf/9.5.0/libexec/lib/python3.7/site-packages/ocrmypdf/__init__.py", line 18, in &amp;lt;module&amp;gt;

	at es.keensoft.alfresco.ocr.OCRTransformWorker.transform(OCRTransformWorker.java:79)
	... 17 more&lt;/PRE&gt;&lt;P&gt;If I tried to run the next command manually in my terminal it works without any issue&lt;/P&gt;&lt;PRE&gt;/usr/local/bin/ocrmypdf --verbose 1 --force-ocr -l spa+eng+fra --output-type pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757.pdf /Users/erickbrenes/Documents/dev/alfresco526/alfresco/tomcat/temp/Alfresco/OCRTransformWorker_source_7618353995588703757_ocr.pdf&lt;/PRE&gt;&lt;P&gt;does this addon works on macOS?&lt;/P&gt;&lt;P&gt;The log above point to this file&lt;/P&gt;&lt;PRE&gt;/usr/local/Cellar/ocrmypdf/9.5.0/libexec/lib/python3.7/site-packages/ocrmypdf/__init__.py&lt;/PRE&gt;&lt;P&gt;this is the file content&lt;/P&gt;&lt;PRE&gt;# © 2017 James R. Barlow: github.com/jbarlow83
#
# This file is part of OCRmyPDF.
#
# OCRmyPDF is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OCRmyPDF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.

from . import helpers, hocrtransform, leptonica, pdfa, pdfinfo
from ._version import PROGRAM_NAME, __version__
from .api import Verbosity, configure_logging, ocr
from .exceptions import (
    BadArgsError,
    DpiError,
    EncryptedPdfError,
    ExitCode,
    ExitCodeException,
    InputFileError,
    MissingDependencyError,
    OutputFileAccessError,
    PdfMergeFailedError,
    PriorOcrFoundError,
    SubprocessOutputError,
    TesseractConfigError,
    UnsupportedImageFormatError,
)&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:41:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5108#M2465</guid>
      <dc:creator>ebrenessdev</dc:creator>
      <dc:date>2020-02-21T15:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: alfresco-simple-ocr error on macOS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5109#M2466</link>
      <description>&lt;P&gt;I'd suggest you to use the dockerized version that can be produced with:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-docker-installer" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-docker-installer&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:44:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5109#M2466</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2020-02-21T15:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: alfresco-simple-ocr error on macOS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5110#M2467</link>
      <description>&lt;P&gt;Hello Angel Borroy,&lt;/P&gt;&lt;P&gt;I'm using ACS 5.2.6. Enterprise.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 16:15:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5110#M2467</guid>
      <dc:creator>ebrenessdev</dc:creator>
      <dc:date>2020-02-21T16:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: alfresco-simple-ocr error on macOS</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5111#M2468</link>
      <description>&lt;P&gt;I have fixed this issue, I had to add the correct image magick properties in alfresco-global.properties&lt;/P&gt;&lt;PRE&gt;### ImageMagick Config ###
img.root=/usr/local/Cellar/imagemagick/7.0.9-23&lt;BR /&gt;#  ----&amp;gt; I had this property wrong, 'img.dyn' &amp;lt;----
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
img.gslib=/usr/local/Cellar/ghostscript/9.50/lib
#img.coders=${img.root}/modules/coders
#img.config=${img.root}/config

#GS executable
ghostscript.exe=gs

#Tesseract executable
tesseract.exe=tesseract&lt;BR /&gt;&lt;BR /&gt;# OCRmyPDF&lt;BR /&gt;&lt;BR /&gt;# running 'which ocrmypdf' returns '/usr/local/bin/ocrmypdf', I think this value could be used as well&lt;BR /&gt;ocr.command=/usr/local/Cellar/ocrmypdf/9.5.0/bin/ocrmypdf&lt;BR /&gt;ocr.output.verbose=true&lt;BR /&gt;ocr.output.file.prefix.command=&lt;BR /&gt;ocr.extra.commands=--verbose 1 --force-ocr -l spa+eng+fra --output-type pdf&lt;BR /&gt;ocr.server.os=linux&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Feb 2020 14:53:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/alfresco-simple-ocr-error-on-macos/m-p/5111#M2468</guid>
      <dc:creator>ebrenessdev</dc:creator>
      <dc:date>2020-02-24T14:53:28Z</dc:date>
    </item>
  </channel>
</rss>

