Generating a PDF on Ubuntu 11.10 with OpenOffice 3

Asked by Pascal M

Hi there,

I am able to generate an .odt file but when trying to generate a .pdf I get an error message around UNO.
Problem : I do not understand the syntax and where to input the pythonWithUnoPath parameter in my file.
I've tried a variety of combinations around the renderer but without success.
Any help would be appreciated :

***************************
from appy.pod.renderer import Renderer
 message = 'hello PDF'
renderer = Renderer('newhello.odt', globals(),'hello.pdf')
renderer.run()
***************************

PATH : pythonWithUnoPath='/etc/openoffice.org3/program/python'
CONFIG : Ubuntu 11.10, OpenOffice 3, Python 2.7.2

[...] If you can't install UNO in this Python interpreter, you can specify, in parameter "pythonWithUnoPath", the path to a UNO-enabled Python interpreter. One such interpreter may be found in <open_office_path>/program.

# - # - # - # - # - # - # - # - # - # - # - # - # - #

THIS IS SOLVED !
1. I added UNO path after result argument :
renderer = Renderer('newsitereport.odt', globals(),'report3.pdf',pythonWithUnoPath='/etc/openoffice.org3/program/python')

2. Got port error so applied a previously mentionned fix
soffice -invisible -headless -nofirststartwizard "-accept=socket,host=localhost,port=2002;urp;"

3. PDF rendered fine.

Question information

Language:
English Edit question
Status:
Answered
For:
Appy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gaëtan Delannay (gaetan-delannay) said :
#1

Thank you for solving yourself your problems ;-)
Gaetan

Can you help with this problem?

Provide an answer of your own, or ask Pascal M for more information if necessary.

To post a message you must log in.