pyuno and PDF output

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sells, Fred

    #1

    pyuno and PDF output

    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.be ans import PropertyValue
    PDF = PropertyValue( "FilterName " , 0 , "writer_pdf_Exp ort", 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.su n.star.task.Err orCodeIOExcepti on

    ---------------------------------------------------------------------------
    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.
    ---------------------------------------------------------------------------
Working...