First of all I run soffice.bin headless using this call:
Code: Select all
/usr/local/bin/soffice --invisible --accept="socket,host=localhost,port=2002,tcpNoDelay=1;urp;" --headless --nodefault --nofirststartwizard --nolockcheck --nologo --norestore &
Code: Select all
...
import uno
import unohelper
...
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", localContext )
ctx = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
smgr = ctx.ServiceManager
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
Code: Select all
Traceback (most recent call last):
File "./generar_pdf.py", line 207, in <module>
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
uno.RuntimeException: Binary URP bridge disposed during call