AnsweredAssumed Answered

mimetype-info ok, dennoch:  No transformation exists

Question asked by muristan on May 10, 2011
Latest reply on May 10, 2011 by muristan
Alfresco Community 3.4.d auf Debian GNU/Linux 6.0.1a _Squeeze_

Versuche, TIFF-Dokumente mit ABBYocr in PDF zu verwandeln.
Alfresco startet fehlerfrei.

http://192.168.1.77:8080/alfresco/service/mimetypes sieht gut aus:

image/tiff - tiff
Extractors: org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter
Transformable To:
    application/eps = Proxy via: $Proxy43(Version: ImageMagick 6.5.1-0 2010-07-01 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC)
    application/pdf = Proxy via: org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker(ABBYY FineReader Engine 8.0 © ABBYY Software House 2006.

application/pdf - pdf
Extractors: org.alfresco.repo.content.metadata.PdfBoxMetadataExtracter
Transformable To:
    application/eps = Complex via: image/png
    …
Transformable From:
    image/tiff = Proxy via: org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker(ABBYY FineReader Engine 8.0 © ABBYY Software House 2006. Usage:


Aber wenn ich die Regel anstoße, taucht im log die Meldung auf:

02:16:05,184  ERROR [repo.action.AsynchronousActionExecutionQueueImpl] Failed to execute asynchronous action: Action[ id=f3f97ef0-e242-43ff-a34a-69641a5421bd, node=workspace://SpacesStore/f3f97ef0-e242-43ff-a34a-69641a5421bd ]
org.alfresco.service.cmr.rule.RuleServiceException: 04100049 Some error occurred during document transforming. Error message: 04100048 No transformation exists between mimetypes image/tiff and application/pdf
   at org.alfresco.repo.action.executer.TransformActionExecuter.executeImpl(TransformActionExecuter.java:281)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)


Meine ocr-transformers-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
   <bean id="transformer.worker.tiff2pdf" class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker">
      <property name="mimetypeService">
         <ref bean="mimetypeService" />
      </property>
      <property name="checkCommand">
         <bean class="org.alfresco.util.exec.RuntimeExec">
            <property name="commandsAndArguments">
               <map>
                  <entry key=".*">
                     <list>
                     <value>abbyyocr</value>
                     </list>
                  </entry>
               </map>
            </property>
         </bean>
      </property>

      <property name="transformCommand">
         <bean class="org.alfresco.util.exec.RuntimeExec">
            <property name="commandsAndArguments">
               <map>
               <entry key=".*">
                     <list>
                        <value>abbyyocr -rl German -if "${source}" -f PDF -of "${target}"</value>
                     </list>
                  </entry>
               </map>
            </property>
            <property name="errorCodes">
               <value>1,2</value>
            </property>
         </bean>
      </property>

      <property name="explicitTransformations">
         <list>
            <bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
               <property name="sourceMimetype"><value>image/tiff</value></property>
               <property name="targetMimetype"><value>application/pdf</value></property>
            </bean>
         </list>
      </property>
   </bean>

     <bean id="transformer.tiff2pdf" class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
      <property name="worker">
         <ref bean="transformer.worker.tiff2pdf" />
      </property>
   </bean>
</beans>

Outcomes