pyuno and PDF output

S

Sells, Fred

I can use java to output a PDF file using uno, but when I try to do it in
python, I get an IO Exception with no added information. The relevant code
snippet follows:

from com.sun.star.beans import PropertyValue
PDF = PropertyValue( "FilterName" , 0 , "writer_pdf_Export", 0 )
doc2.storeAsURL("file:///C:/alleclipse/OpenOffice/test2.pdf", (PDF,) )

if I don't specify any properties, it writes an "odt" file just fine, but
when I specify (PDF,) it breaks.





Traceback (most recent call last):
File "oomerge.py", line 137, in ?
test1()
File "oomerge.py", line 74, in test1
doc2.storeAsURL("file:///C:/alleclipse/OpenOffice/test2.pdf", (PDF,) )
__main__.com.sun.star.task.ErrorCodeIOException

---------------------------------------------------------------------------
The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any
computer.
---------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top