I want to print the contents of a textarea and I’m using the following code:
Dim g As Graphics
Dim p As PrinterSetup
p = New PrinterSetup
If p.PageSetupDialog Then
g = OpenPrinterDialog(p)
If g <> Nil Then
g.DrawString(textarea1.text,50,50,450)
End If
End If
The problem is that it prints only one page
I’m using Ubuntu 12.04
I forgot to mention the above post from Joseph. When finished printing on a page you need to call g.nextpage to tell Xojo that you’re finished printing on the page and to send it off to the printer. If you do that on the last page then you will print and extra blank page, therefore, you must code so that you call g.NextPage only if you definitely need to print onto another page. Otherwise use g = nil to completely finish and send that last page to the printer.