Good morning!
Is it possible to send a text/line directly to the printer using the print() command, without having to use the printclose() command for it to be sent to the printer?
Grateful.
Good morning!
Is it possible to send a text/line directly to the printer using the print() command, without having to use the printclose() command for it to be sent to the printer?
Grateful.
Hi Marco;
The only way that I have done this in the past is either: A) Calling a specific printer DLL directly (external API) or B) using the FileWrite() PB command (but then you might need to also include the low level printer commands in the binary data stream).
Regards .. Chris
I'm guessing that you are looking to control the printer directly rather than spooling the print. The PrintJob methods are all a spooling type approach. I belive that windows print queues are predominantly spooled.
It's been a very long time since we did things like this, but we had to get control of the COM port for the printer and then send characters directly to the printer through that. I remember it being a bag of worms with conflicts between our print process and other prints being sent. So if you have a dedicated printer for th epurpose, I guess you would need to find an API for that printer in order to achieve the control you need.
Hope that helps.
David
Would PrintText() work for you?
https://docs.appeon.com/pb2022r3/powerscript_reference/printText_func.html
Maybe you can have a datastore in which you assign some text to a field and then simply do a Print() ? You would not need printopen / -close.