On Tue, 12 May 2009 06:53:15 pm Caolán McNamara wrote:
>
> How about...
> uno.invoke(document, "print", (printOpts,))
> i.e. add that extra ","
>
Yeah that did the trick thanks. Also found out after this that actually having 
a printer setup is a good idea also or this function silently does nothing :).

>
> I'm not sure, but you *may* need to wait for printing to complete before
> going on to try and close the document
>
Looks like that could be the case as I'm getting this error when running the 
script for a second time against a headless server:

  File "./DocumentConverter.py", line 165, in <module>
    converter.print_convert(argv[1], argv[2])
  File "./DocumentConverter.py", line 109, in print_convert
    document.close(True)
uno.RuntimeException: illegal object given!

Any pointers on how I can wait for the print job to complete ? 
I tried hacking in a sleep but that does not seem to help. when running out of 
headless mode a sleep of 200ms stops any errors.

thanks

MikeB




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

Reply via email to