Hi,
      I'm new here so sorry if this is the wrong list, but I have been trying 
to print a document (rtf file) to a file using the API via pyuno and I am 
having some trouble.

I have already got code working that will use storetourl to export files based 
on a filter so im pretty sure my connection to openoffice etc is right.

I would like the output as postscript with the print text as black option as 
the document will eventually be faxed and this helps reduce dithering that 
other programs cause. 

I'm loading and printing the document like this:

document = self.desktop.loadComponentFromURL(inputUrl, "_blank", 0,()) 
document.refresh()

## setup filename option
printOpts = self._toProperties(FileName=outputUrl + '.ps')
## print
uno.invoke(document, "print",(printOpts))


Which results in the following relevant output:
  File "./DocumentConverter.py", line 112, in print_convert
    uno.invoke(document, "print",(printOpts))
  File "/usr/lib/python2.6/dist-packages/uno.py", line 251, in invoke
    return pyuno.invoke( object, methodname, argTuple )
  uno.CannotConvertException: conversion not possible!

Im unsure wether the conversion error relates to the document itself or as I 
guess some sort of type conversion error any ideas ?

P.s. this is on openoffice 3.01 on ubuntu jaunty (also on 3.0 headless under 
intrepid).

thanks in advance

MikeB

--
Senior Developer 
Grox Pty LTD
www.grox.com.au

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to