Get list of printers

Andrew Douglas Pitonyak <[email protected]> Thu, 07 Apr 2011 09:48:42 -0400
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
Can I obtain a list of printers using Star Basic?

It was my understanding that OOo has always had an easy method of 
obtaining a list of printers, but that this method was not available 
from Basic. With OOo 1.x and 2.x, I issued the ".uno:Print" dispatch and 
then used an interesting set of routines to directly manipulate the 
print dialog to obtain a list of printers (wish I could say it was my idea).

The print dialog changed and this "cheater" method no longer works. I 
can pursue this method and modify it to work with the latest version of 
OOo (well, maybe I can), but, it would be nice if there were an easier way.

I had hoped it would be as easy as

  CreateUnoService("com.sun.star.awt.PrinterServer")

Unfortunately, the returned object is not usable.


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

--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help