Apache OpenOffice (AOO) Bugzilla – Issue 121170
com::sun::star::awt::XPrinter API does nothing
Last modified: 2017-05-20 09:32:02 UTC
Using the printing API in the AWT module has no efect at all. The following code does nothing: REM ***** BASIC ***** Option Explicit Sub PrinterServer_test Dim oPrinterServer as Object oPrinterServer = CreateUnoService("com.sun.star.awt.PrinterServer") Dim sPrinterNames$() sPrinterNames = oPrinterServer.getPrinterNames() If UBound(sPrinterNames) >= 0 Then Dim oPrinter as Object, n% oPrinter = oPrinterServer.createPrinter("Cups-PDF") oPrinter.start("XPrinter API Demo JOB",1,false) Dim oDevice as Object, oGraphics as Object For n = 0 To 5 oDevice = oPrinter.startPage() oGraphics = oDevice.createGraphics() oGraphics.drawText(0,0,"Hello world in page " + CStr(n+1)) oPrinter.endPage() Next oPrinter.end() oPrinter.terminate() End If End Sub You need a build with the fix to bug 117765 in order to test it with Basic.
"arielch" committed SVN revision 1394905 into trunk: #i121170# - com::sun::star::awt::XPrinter API does nothing
Fixed in trunk
.