Hi, Fhomasp wrote:
> Hey, > > I need to have documents printed, which was ok to implement. > Basically I used the dispatcher to summon me the default print dialog in > writer. After the ok from the user I need to close the JPanel in which is > the container for the office document. Problem is that it gets closed > before the print job is finished and I'm not sure how to continue. I can't > use Thread.sleep() as I won't know how many pages there are going to be or > how fast the target machine will be. It's not good programming anyhow. > > I thought I'd be able to do this using XNotifyingDispatch and an > XDispatchResultListener, however the problem persists. The dispatcher will notify when the dispatching is finished. Asynchronous processing inside VCL or the operating system is not taken into account. We could implement that but ATM it isn't working like that. You can try passing a dispatch argument in your "propertyvalues" called "Asynchron" with the boolean value "false". Then you also don't need the NotifyingDispatch as the printing should be done when the dispatch call returned. Regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "nospamfor...@gmx.de". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org