<?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>abbyyocr9</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>
abbyyocr9 -rl Spanish -fm -rdss -afoe -if ${source} -f PDF -pfpf LZWGray -pem ImageOnText -pfpr 300 -prl -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>
<bean id="transformer.worker.Jpg2pdf" 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>abbyyocr9</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>
abbyyocr9 -if ${source} -f PDF -pfpf JpegColor -pem ImageOnText -pfpr 200 -pfq 100 -prl -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/jpeg</value></property>
<property name="targetMimetype"><value>application/pdf</value></property>
</bean>
</list>
</property>
</bean>
<bean id="transformer.Jpg2pdf" class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
<property name="worker">
<ref bean="transformer.worker.Jpg2pdf" />
</property>
</bean>
</beans>
<config evaluator="string-compare" condition="Action Wizards" replace="false">
<transformers>
<transformer name="image/tiff"/>
</transformers>
</config>
org.alfresco.service.cmr.repository.ContentIOException: 02220014 Content conversion failed:
reader: ContentAccessor[ contentUrl=store://2016/3/22/19/8/c645e8f5-ef22-43a1-b593-eef80fb702b3.bin, mimetype=image/tiff, size=113244, encoding=UTF-8, locale=es_CL]
writer: ContentAccessor[ contentUrl=store://2016/3/22/19/8/4cf527dd-d17f-41ef-843f-262b9c744357.bin, mimetype=application/pdf, size=0, encoding=UTF-8, locale=es_CL]
options: {targetContentProperty={http://www.alfresco.org/model/content/1.0}name, contentReaderNodeRef=workspace://SpacesStore/16875bd0-0039-48a0-a670-8d3b87e21fc3, contentWriterNodeRef=workspace://SpacesStore/de83616b-0433-420c-84e2-e18c731aae1b, sourceContentProperty={http://www.alfresco.org/model/content/1.0}name, use=null, includeEmbedded=false}
limits:
https://github.com/keensoft/alfresco-simple-ocr/blob/master/simple-ocr-repo/src/main/amp/config/alfr...
puedes ver cómo mapeamos nosotros los argumentos de la línea de comandos.
<?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.tiff2pdf" class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
<property name="worker">
<ref bean="transformer.worker.tiff2pdf" />
</property>
</bean>
<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>abbyyocr9</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>abbyyocr9</value>
<value>-rl</value>
<value>Spanish</value>
<value>-fm</value>
<value>-rdss</value>
<value>-afoe</value>
<value>-if</value>
<value>${source}</value>
<value>-f</value>
<value>PDF</value>
<value>-pfpf</value>
<value>LZWGray</value>
<value>-pem</value>
<value>ImageOnText</value>
<value>-pfpr</value>
<value>300</value>
<value>-prl</value>
<value>-of</value>
<value>${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.worker.Jpg2pdf" 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>abbyyocr9</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>abbyyocr9</value>
<value>-if</value>
<value>${source}</value>
<value>-f</value>
<value>PDF</value>
<value>-pfpf</value>
<value>JpegColor</value>
<value>-pem</value>
<value>ImageOnText</value>
<value>-pfpr</value>
<value>200</value>
<value>-pfq</value>
<value>100</value>
<value>-prl</value>
<value>-of</value>
<value>${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/jpeg</value></property>
<property name="targetMimetype"><value>application/pdf</value></property>
</bean>
</list>
</property>
</bean>
<bean id="transformer.Jpg2pdf" class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
<property name="worker">
<ref bean="transformer.worker.Jpg2pdf" />
</property>
</bean>
</beans>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.