I’m having this trouble after printing the first copy of a document with my Dot Printer.
The first document is printed ok (the paper is loaded and is printed)
If i want to print again (that document or another) my printer takes the paper, loads it, but not print the document.
And again for a second time.
At third time it prints properly.
The issue is myApp related.
Is there a command to ‘clear’ the cache or something else to fix it?
Here’s my code.
g = p.ShowPrinterDialog
If g <> Nil Then
Var X, Y As Integer
Var Inch As Double = 2.54
Var DPI_X As Integer = p.MaxHorizontalResolution // Get te Printer Resolution
Var DPI_Y As Integer = p.MaxHorizontalResolution // Get te Printer Resolution
g.FontName = “Times New Roman”
g.FontSize = 11
X = (DPI_X * (1.5-0.4) / 2.54)
Y = (DPI_Y * (2.1-0.4) / 2.54)
g.DrawString(test.value, X, Y)
but the issue is still here
it seems as the printer detect that are many sheets to print and so after the first print calls for another sheet and again for a second time …
any hint ?
(don’t know if my explanation is clear)
Hmm that is very odd, it works fine here and it is a simple project with nothing strange going on. I see you’re using 2019r3.2, what OS are you using? Does this happen if you print to PDF (if you have that option in your OS)?
Yes, it’s very odd.
I use Mac OS X 10.15.6
My printer is a 24 pin OKI ML5100FBeco.
If i insert sheets with no use of the app the OKI loads correctly the sheets.
In the app i have this strange behaviour.
I’ve tried inserting at the end of the print code
g.nil
but the result is the same
I’m here if you want to test it
I’ve written a little utility that saves me a lot of works in my real life …
If you have instructions i’m willing to help …
It uses a compatible 24 pin Mac OS X Epson driver (and the prints are really cool)
I print everything only from textfield and Labels.
Ehm i’ve never tried to print
g.DrawString(“Hello world!”, X, Y)
I’ll try in an hour a text edit (but if i well remember) works ok
But to answer your question, in terms of printing everything is cleared down as soon as g goes out of scope.
Xojo might be doing something odd that the printer driver is interpreting as a command which puts the printer into an odd mode for a few pages. I don’t know enough about macs to know if you can intercept and read the data going to the printer to see whats its sending.
Failing all this it might be worth a play to try and send some epson fx printer codes directly to the printer:
Someone else might be able to chip in and help you with that if its something you want to try as I don’t know how to raw print on macos (I should really tinker with that some time).