Apache OpenOffice (AOO) Bugzilla – Issue 87883
pls add possibility to find available printers via API (as in File|PrintSetup)
Last modified: 2017-05-20 10:55:34 UTC
taking over
Just a question: would com.sun.star.awt.PrinterServer do the job? As it seems, its implementation has a bug that prevents its usage from Basic, but that can be fixed easily. Is there anything missing or wrong in this service?
Created attachment 60880 [details] patch from Ariel Constenla-Haile from api mailing list
I use xPrinterServer.getPrinterNames() to get the printers in Java via API.
Just came here after researching possibilities to get at a list of available printers using Java. As of today the service "com.sun.star.awt.PrinterServer" is not documented and it seems that the IDL of it is missing, as also reflection does not yield information about this service. However it can be created, and the interface XPrinterServer is available, judging from using its method "getPrinterNames" (cf. <http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XPrinterServer.html>). It would help people to save a lot of research time, if this "little awkwardness" was removed, by documenting the "com.sun.star.awt.PrinterServer" service and all of its available interfaces. Among other things this should allow to find the "PrinterServer" service via the cross-reference of "XPrinterServer".
ping mba the issue is still present on DEV300_m104/* the patch still works. If you are not working on this, I can apply it on cws contextmenu1. The service should also be documented.
Created attachment 76311 [details] OOo Writer document with a macro testing the service
Created attachment 76313 [details] new patch (old one was made in the CVS era) maybe the IDL service specification needs a better description
Reset assigne to the default "issues@openoffice.apache.org".