AnsweredAssumed Answered

Overriding msword Open Office content transformer

Question asked by andrepra on Apr 24, 2012
Latest reply on Apr 26, 2012 by andrepra
Alfresco 3.4d CE.
I need to change the pdf transformer for msword because the results obtained with Open Office cause some graphics differences unacceptable for our porpuse.
Following the wiki I decided to use the RuntimeExec bean to manage the transformation from msword to pdf. I wrote a new context file like this


<?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.doc2pdf" 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>d:/PdfConverter/PdfConverter.exe</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>d:/PdfConverter/PdfConverter</value>
                        <value>${source}</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>application/msword</value></property>
               <property name="targetMimetype"><value>application/pdf</value></property>
            </bean>
         </list>
      </property>
   </bean>

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

and everything works fine.
The problem is when I have Open Office also configured. I want to leave all the office transformations configured with open office except for MsWord file.
Seems that the xml written in the extension folder doesn't replace the msword to pdf transformation.
I have to disable something in the Open Office configuration file?

thanks

Outcomes