"C:\Program Files\OpenOffice.org 3\program\soffice" -accept=socket,host=vmoffice,port=8100;urp;StarOffice.ServiceManager -nologo -headless
<?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="openOfficeConnection" class="org.alfresco.repo.management.subsystems.SubsystemProxyFactory">
<property name="sourceApplicationContextFactory">
<ref bean="OOoDirect" />
</property>
<property name="interfaces">
<list>
<!– Utilisation du parametrage defini dans le subsystem OOODirect –>
<value>net.sf.jooreports.openoffice.connection.OpenOfficeConnection</value>
</list>
</property>
</bean>
<bean id="transformer.OpenOffice" class="org.alfresco.repo.content.transform.RemoteOpenOfficeContentTransformer" parent="baseContentTransformer" >
<property name="connection">
<ref bean="openOfficeConnection" />
</property>
<property name="documentFormatsConfiguration">
<value>classpath:alfresco/mimetype/openoffice-document-formats.xml</value>
</property>
</bean>
</beans>
un sous Système OOoDirect
: pour cela créer un sous répertoire subsystems/OOoDirect/default/default sous le répertoire conf/extension et configurer les 2 fichiers suivants
# External executable locations
ooo.exe="./soffice.exe"
ooo.enabled=true
ooo.port=8100
ooo.server=vmoffice
<?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="openOfficeStartupBootstrap" class="org.alfresco.util.exec.RuntimeExecBootstrapBean">
<property name="startupCommands">
<list>
<ref bean="openOfficeStartupCommand" />
</list>
</property>
<property name="failOnError">
<value>false</value>
</property>
<property name="enabled">
<!– Empeche alfresco de demarrer un process OpenOffice –>
<value>false</value>
</property>
</bean>
<!– We have to convert the user directory to an Open Office compatible URI –>
<bean id="userInstallationURI" class="org.alfresco.util.OpenOfficeURI">
<constructor-arg>
<value>${ooo.user}</value>
</constructor-arg>
</bean>
<bean id="openOfficeStartupCommand" class="org.alfresco.util.exec.RuntimeExec">
<property name="commandsAndArguments">
<map>
<entry key=".*">
<list>
<value>${ooo.exe}</value>
<value>-accept=socket,host=127.0.0.1,port=${ooo.port};urp;StarOffice.ServiceManager</value>
<bean class="org.alfresco.util.StringAppendingFactoryBean">
<property name="items">
<list>
<value>-env:UserInstallation=</value>
<ref bean="userInstallationURI" />
</list>
</property>
</bean>
<value>-nologo</value>
<value>-headless</value>
<value>-nofirststartwizard</value>
<value>-nocrashrep</value>
<value>-norestore</value>
</list>
</entry>
</map>
</property>
<property name="waitForCompletion">
<value>false</value>
</property>
<property name="errorCodes">
<value>2</value>
</property>
</bean>
<!– connection OpenOffice distant –>
<bean id="openOfficeConnection" class="net.sf.jooreports.openoffice.connection.SocketOpenOfficeConnection">
<constructor-arg type="java.lang.String" value="${ooo.server}"/>
<constructor-arg type="int" value="${ooo.port}"/>
</bean>
<bean id="openOfficeConnectionTester" class="org.alfresco.util.OpenOfficeConnectionTester">
<property name="connection">
<ref bean="openOfficeConnection" />
</property>
<property name="strict">
<value>false</value>
</property>
</bean>
<bean id="openOfficeConnectionTesterJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>org.alfresco.util.OpenOfficeConnectionTester$OpenOfficeConnectionTesterJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="openOfficeConnectionTester">
<ref bean="openOfficeConnectionTester" />
</entry>
</map>
</property>
</bean>
<bean id="openOfficeConnectionTesterTrigger" class="org.alfresco.util.CronTriggerBean">
<property name="jobDetail">
<ref bean="openOfficeConnectionTesterJobDetail" />
</property>
<property name="scheduler">
<ref bean="schedulerFactory" />
</property>
<property name="cronExpression">
<value>${openOffice.test.cronExpression}</value>
</property>
</bean>
<bean id="extracter.worker.OpenOffice" class="org.alfresco.repo.content.metadata.DefaultOpenOfficeMetadataWorker">
<property name="mimetypeService">
<ref bean="mimetypeService" />
</property>
<property name="connection">
<ref bean="openOfficeConnection" />
</property>
</bean>
<bean id="transformer.worker.OpenOffice" class="org.alfresco.repo.content.transform.OpenOfficeContentTransformerWorker">
<property name="mimetypeService">
<ref bean="mimetypeService" />
</property>
<property name="connection">
<ref bean="openOfficeConnection" />
</property>
<property name="documentFormatsConfiguration">
<value>classpath:alfresco/mimetype/openoffice-document-formats.xml</value>
</property>
</bean>
</beans>
Redémarrer Alfresco et surveiller les logs.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.