Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-12 Thread Andrew Douglas Pitonyak
Have you seen the solution in my macro document? This might only work if the GUI is present (ie, not in headless mode). Tobias Krais wrote: Hi Hal, Code would be a big help so I could compare what we've got. I'll be glad to send you what I have. Right now I'm working with a wrapper

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Andreas Schlüns
Hello Tobias Hal I think I've been told, and likely here, that in 2.0.x, print listeners like this are no longer necessary, but I'm having a bit of a problem searching and finding this comment and what the background is. In 2.0.x, can I print, then close the document without listening for

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Hal Vaughan
On Tuesday 11 September 2007, Andreas Schlüns wrote: Hello Tobias Hal I think I've been told, and likely here, that in 2.0.x, print listeners like this are no longer necessary, but I'm having a bit of a problem searching and finding this comment and what the background is. In 2.0.x,

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Bartolomeo Mastromarco
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hal Vaughan wrote: On Tuesday 11 September 2007, Andreas Schlüns wrote: Hello Tobias Hal I think I've been told, and likely here, that in 2.0.x, print listeners like this are no longer necessary, but I'm having a bit of a problem searching and

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Andreas Schlüns
Hello Hal, The real problem you have ... printing is by default an asynchronous operation. And of course - if you try to dispose a document which is currently in printing state it can crash (at least it shouldnt ... but it can). The best solution: start the printing job with a well documented

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Tobias Krais
Hi Andreas, So I can set a print option of Wait to true and my program will wait until the document is printed? Do I understand that properly? That would simplify several questions I've had along the way. It makes your XPrintable.print() call synchron ! If your call returns the document

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Hal Vaughan
On Tuesday 11 September 2007, Andreas Schlüns wrote: Hello Hal, The real problem you have ... printing is by default an asynchronous operation. And of course - if you try to dispose a document which is currently in printing state it can crash (at least it shouldnt ... but it can).

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Hal Vaughan
On Tuesday 11 September 2007, Tobias Krais wrote: Hi Andreas, So I can set a print option of Wait to true and my program will wait until the document is printed? Do I understand that properly? That would simplify several questions I've had along the way. It makes your

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-11 Thread Tobias Krais
Hi Hal, I'm using this to define my print options: PropertyValue[] printOpts = new PropertyValue[2]; printOpts[0] = new PropertyValue(); printOpts[0].Name = Name; printOpts[0].Value = sPrinter; printOpts[1] = new PropertyValue(); printOpts[1].Name =

[api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Hal Vaughan
Sorry to post an obnoxious Urgent comment in the header, but I'm online with a client's computer through VNC and if it's at all possible I need to resolve this problem while online. When I wrote my Java program that interfaces with OOo, I was using 1.0.x. All I'm doing is loading a file,

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Hal Vaughan
On Monday 10 September 2007, Hal Vaughan wrote: Sorry to post an obnoxious Urgent comment in the header, but I'm online with a client's computer through VNC and if it's at all possible I need to resolve this problem while online. When I wrote my Java program that interfaces with OOo, I was

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Tobias Krais
Hi Hal, [...] I think I've been told, and likely here, that in 2.0.x, print listeners like this are no longer necessary, but I'm having a bit of a problem searching and finding this comment and what the background is. In 2.0.x, can I print, then close the document without listening for

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Hal Vaughan
On Monday 10 September 2007, Hal Vaughan wrote: Sorry to post an obnoxious Urgent comment in the header, but I'm online with a client's computer through VNC and if it's at all possible I need to resolve this problem while online. ... I think I've been told, and likely here, that in 2.0.x,

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Tobias Krais
Hi Hal, Code would be a big help so I could compare what we've got. I'll be glad to send you what I have. Right now I'm working with a wrapper class to handle basic functions. Do I understand, though, that you run the program once for each file you print? Or does it loop through and

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Tobias Krais
Hi Hal, I've found I *have* to have a print listener and watch for when the document is done printing. Here's more detail on what's happening (sorry for things being fragmented, but I'm under tremendous pressure to solve this). This is happening on a Windows XP system with 2 CPUs. I

Re: [api-dev] Print Listeners in OOo 2.0.2 (Urgent!)

2007-09-10 Thread Hal Vaughan
On Monday 10 September 2007, Tobias Krais wrote: Hi Hal, I've found I *have* to have a print listener and watch for when the document is done printing. Here's more detail on what's happening (sorry for things being fragmented, but I'm under tremendous pressure to solve this). This