Yes, you did because I didn't provide the information.  Sorry about that.

1. The macro I ran was the "executeDispatch() for uno:PrintDefault" call, not 
the xprintable.print call.  That was because I simply did a record of pressing 
the print button on the tool bar.  I still find the way the API is used in 
macros very confusing and very different then calling it from my Java program.

2. I ran the macro interactively through the menus on OpenOffice, I did not 
call the macro from my Java program (don't know if that makes a difference 
yet). 

-----Original Message-----
From: Andrew Douglas Pitonyak [mailto:[email protected]] 
Sent: Saturday, December 18, 2010 10:57 PM
To: [email protected]
Subject: Re: [api-dev] OpenOffice 3.2.1 not printing on Windows Servers through 
the API

I really do not understand this. Let me restate the part the confuses me:

(1) I can print using a macro with no problem.

(2) I cannot print using the API

When you use a macro, you use the API; or did I miss something?




On 12/18/2010 12:05 PM, Herter, Scott wrote:
> We have encountered a strange problem that involves OpenOffice 3.2.1 (also 
> reproduced with OpenOffice 2.4 but does not reproduce with OpenOffice 2.1) on 
> Windows Server 2003 R2, 2008, and 2008 R2.  The basic problem is that it does 
> not print through the API.  The interesting thing is that the same program 
> with the same version of OpenOffice works on Windows XP and Vista.
>
> If we run OpenOffice interactively on the Windows Server box and print 
> through the menus or through a Macro it works, but when we try to do it 
> through the API nothing happens.  No exception and nothing shows up in the 
> Windows print queue.  We are using a Java program to talk to OpenOffice 
> through the UNO API and we have tried both Java 5 and Java 6 with the same 
> results.
>
> Convert to PDF, load and close work through the API, just not print.  The 
> call to xprintable.print simply returns (type void so there is no return code 
> to check) as if it worked.  I changed the code to not close the document 
> after printing and I can press the print button and the document that just 
> failed to print through the API would show up in the print queue.
>
> Our current thought is that Microsoft changed something in the security model 
> and maybe we need to do something different with permissions or with the 
> print API under the newer servers.  I have done a number of Google searches 
> and checked the API doc to see if something changed with regard to printing, 
> but it looks like we are doing everything correctly and it does work on XP 
> and Vista.  If anyone knows of anything we would appreciate some help.
>
> On the assumption that no-one has heard of this before these are the steps I 
> will be taking over the next several days to try and isolate the problem 
> further.
>
>
> 1.      Create a small stand alone program that reproduces the problem with a 
> test document.
>
> 2.      Currently the servers are all running as Microsoft HyperV virtual 
> machines whereas the XP and Vista boxes were running native on the hardware.  
> After creating the test program I will run it on a server that is not a 
> virtual machine and see if it still re-creates.
>
> 3.      Since Macros seem to work I will try and find an API call that lets 
> me run a macro and pass it in parameters to fill in the properties for the 
> print.
>
> Thanks.
>
>
> --
> I used to think I wasn't a morning person, but things never got better after 
> lunch.
> -- Wally from Dilbert
>

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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


Reply via email to