Sending a printer native command during printing, using VB S’abonner
as the title states, I’d like to send a native command to the printer when certain criteria is met.
After sending a print job to the printer I’d like the printer to pause after printing 20 labels. After pressing the pause button on the printer itself, it should resume printing the next 20 labels before pausing again, repeating this behavior until the total number of copies specified in BarTender has been printed.
The solution I’m trying to realize consists of a serialized data field, used as a counter which increments +1 after every printed label, and a VB script that checks after every printed label, whether the value of the serialized field is 20 or a multiple thereof. If the value is divisible by 20, send the printer’s native pause command:
fract = Value/20
whole = Fix(fract)
If (fract - whole) = 0 Then
//send pause command to printer
The printer’s native command, which pauses it: ESCp1
The ESC command (without the p1) is in ASCII: 27 in Hex: 1B
Can someone help me to send the ESCp1 command to the printer?
I was thinking of adding the script to the serialized data field as a Transform Event set to OnPostSerialize. If I’m completely off, please point me in the right direction.
I’d be very grateful for any help you could give me!
Vous devez vous connecter pour laisser un commentaire.