Issue 121170 - com::sun::star::awt::XPrinter API does nothing
com::sun::star::awt::XPrinter API does nothing
Product: App Dev
Classification: Unclassified
Component: api
3.3.0 or older (OOo)
All All
: P3 Normal
: 4.0.0
Assigned To: Ariel Constenla-Haile
Depends on:
  Show dependency treegraph
Reported: 2012-10-06 02:19 UTC by Ariel Constenla-Haile
Modified: 2013-07-21 10:58 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Ariel Constenla-Haile 2012-10-06 02:19:18 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("")
	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))
	End If
End Sub

You need a build with the fix to bug 117765 in order to test it with Basic.
Comment 1 SVN Robot 2012-10-06 02:44:33 UTC
"arielch" committed SVN revision 1394905 into trunk:
#i121170# - com::sun::star::awt::XPrinter API does nothing
Comment 2 Ariel Constenla-Haile 2012-10-06 22:49:18 UTC
Fixed in trunk
Comment 3 Oliver Brinzing 2012-10-07 09:43:07 UTC