graphics.copies always 1

Hello,

Xojo 15v4, El Capitam 10.11.2

the following code, basically taken from the docs, always prints one only copy, even if in the OpenPrinterDialog I specify more than one copy.

Dim g As Graphics
Dim p As PrinterSetup
p = New PrinterSetup
If p.PageSetupDialog Then
g = OpenPrinterDialog§
If g <> Nil Then
for i as Integer = 0 to g.Copies//2, 3, 4 etc
g.DrawString(“Hello World”, 50, 50)
next
End If
End If

I was under the impression that the OS took care of g.nextpage

Any idea how to print several copies? Thanks.

[code]Dim g As Graphics
Dim p As PrinterSetup
p = New PrinterSetup
If p.PageSetupDialog Then
g = OpenPrinterDialog§
If g <> Nil Then
for i as Integer = 0 to g.Copies//2, 3, 4 etc
g.DrawString(“Hello World”, 50, 50)

g.nextpage // <-- kicks out a page and starts a new one

next
End If
End If[/code]

Yes, in the meantime I edited my post: I was under the impression that the OS took care of g.nextpage

I guess I was wrong.

Its been a ‘bug/feature/something you need to watch for’ , as long as I can remember.
To my mind, the app should print once, and the OS /printer driver should replicate it (x copies).

But hey ho…

Some printers simply do not honor the request for multiple pages.

I have two HP printers. The Laser one does print as many copies as requested. The jet printer one never prints more than one copy.

@ Michel and Jeff
My printer Canon LBP 3300, when called by textEdit etc. prints as many copies requested.
It’s only from Xojo that I’m experiencing this new 'bug/feature/something/
Years ago things worked all right.
So I’ll have to put a warning on the Print-window alerting the user to deal accordingly.

It still should
OS X has always handed the “multiple copies” outside of the app doing the printing

Indeed it does. Installing the new driver for Capt fixed the issue.

Printers & Printer Drivers are inherently evil, they should be avoided if at all possible.

Need many more digital displays hanging on the walls then :stuck_out_tongue:

Is it the developer responsibility to deal with “print from page y to page z” ?