As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<property name="transformCommand"> <bean class="org.alfresco.util.exec.RuntimeExec"> <property name="commandMap"> <map> <entry key=".*"> <value>/opt/Vividata/bin/ocrxtr ..${target} ${source } ….
<property name="defaultProperties"> <props> … </props> …
class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformer" parent="baseContentTransformer"> <property name="checkCommand"> <!– <bean class="org.alfresco.util.exec.RuntimeExec"> –> <bean class="org.alfresco.docassistent.util.CustomRuntimeExec"> <property name="commandMap"> <map> <entry key="Linux"> <value>/opt/Vividata/bin/ocrxtr -help</value> </entry> <entry key="Windows.*"> <value>D:/ocrxtr.bat -help</value> </entry> </map> </property> <property name="errorCodes"> <value>1,2</value> </property> </bean> </property> <property name="transformCommand"> <bean class="org.alfresco.util.exec.RuntimeExec"> <property name="commandMap"> <map> <entry key="Linux"> <value>/opt/Vividata/bin/ocrxtr -overwrite=y -out_text_format=pdf -language=${language} -out_text_name=${target} ${source}</value> </entry> <entry key="Windows.*"> <value>D:/ocrxtr.bat -overwrite=y -out_text_format=pdf -language=${language} -out_text_name=${target} ${source}</value> </entry> </map> </property> <property name="errorCodes"> <value>1,2</value> </property> [b]<property name="defaultProperties"> <props> <prop key="language"></prop> </props> </property>[/b] </bean> </property> <property name="explicitTransformations">…. <list>
Map<String, Serializable> actionParams = new HashMap<String, Serializable>(); actionParams.put("actionName", "transform"); actionParams.put("transformer", "application/pdf");Action action = this.getActionService().createAction(actionname); action.setParameterValues(repoActionParams); System.out.println("START TRANFORMATION"); this.getActionService().executeAction(action, nodeRef);