Je vous jette le code tel quel parce que j'ai vu que ca intéressait des gens sur le site de J. Wynia. Je corrigerai et apporterai les commentaires necessaires demain.

1) lancer openoffice en mode listen

 Xvfb -screen scrn 800x600x16 :25 &
 ooffice  -accept="socket,host=localhost,port=2002;urp;OpenOffice.ServiceManager"  -norestore -headless -invisible -display :25&

Le Xvfb c'est juste parce que je n'ai pas trouvé comment lancer OOo sans X.

2) liboo.php

[php]
<?php

/***************************
* OOoLib using pyhton UNO  *
* Author :Jérôme CRECY     *
* licence : GPL 2.0        *
***************************/

/****************************************************************************
NOTE :
Pour Windows préférez le petit développement de J.Wynia utilisant l'interface
COM http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/
****************************************************************************/

/****************************************************************************

DOC:

Pour utiliser cette librairie il vous faut un OpenOffice.org qui tourne
en tant que listen :
 #ooffice \
 -accept="socket,host=localhost,port=2002;urp;OpenOffice.ServiceManager" \
 -norestore -headless -invisible

vous devez aussi avoir d'installé le pont python-UNO et un interpréteur python

******************************************************************************/


function OOoword2pdf($srcFile,$destFile,$OOohost="localhost",$OOoport="2002"){
$retour=`python << _EOP_

import uno,os
from com.sun.star.beans import PropertyValue

properties = []
p=PropertyValue()
p.Name = "Hidden"
p.Value = True
properties.append(p)

context = uno.getComponentContext()
resolver=context.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", context)

ctx=resolver.resolve("uno:socket,host=$OOohost,port=$OOoport;urp;StarOffice.ComponentContext")

smgr = ctx.ServiceManager


desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop",ctx)
doc=desktop.loadComponentFromURL('file:///'+'$srcFile', "_blank", 0, tuple(properties))

properties=[]
p=PropertyValue()
p.Name="Overwrite"
p.Value=True
properties.append(p)
p=PropertyValue()
p.Name="FilterName"
p.Value='writer_pdf_Export'
properties.append(p)
p=PropertyValue()
p.Name="Hidden"
p.Value=True

try:
        doc.storeToURL(uno.systemPathToFileUrl('$destFile'), tuple(properties))
except:
        print "ERROR"
doc.dispose()
_EOP_
`;

        if (ereg("ERROR",$retour)){
                return false;
        }
        else return true;
}

?>

voilà ;)