Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Printing Cash Register Receipts

I have a point of sale application in AREV32 that will print a cash register receipt at the end of a transaction. Along with the text that it needs to print on the printer, it sends escape codes to have it print the stored logo graphics in the printer hardware and to open the cash drawer.

I have been working to move this point of sale application to OpenInsight, and have run into a couple of issues with accomplishing the same result in printing the cash register receipt. To pass the escape codes I am using the Direct_Print function. For some reason, sending the escape codes to open the cash drawer works, but the code to print the logo does not work.

This setback really wasn't a big deal, because I could print graphics using Set_Printer commands. But then I realized another problem. The Set_Printer function is extremely slow. It has added 3 to 5 seconds of waiting for the receipt to print each time. The Direct_Print function is much quicker.

So I really have two questions here.
  1. Is there any thoughts on why the Direct_Print function may not be working to send the escape codes to have the printer print the logo graphics stored in the hardware ram?
  2. Is there a quicker way to print using Set_Printer or an alternative way (i.e. via windows API, etc.)

Comments

  • Dan,

    Just so I am clear, does ARev32 work just fine with regard to the logo and the control codes to the register?
  • Yes, ARev32 works correctly with all the escape codes.
  • Dan,

    Then this tells me that Direct_Print does work since that is what ARev32 is using in this situation.

    I don't think Set_Printer is your best route although I suspect the sluggishness is perhaps because you are configured for VSPRINTER2. Even if that isn't the case, receipt printers really work best with direct input rather than Windows print drivers.

    So the solution I would take is to try and configure OpenInsight to call Direct_Printer the same way ARev32 does. Are you using the exact same printer? What does your ARev32 printer definition show as the printer you are using? Are you passing that into the OpenInsight routine?
  • The printer is the same. I'll have to check and see what the ARev32 printer definition shows as the printer and make sure that matches up. I've just been passing null for the printer to use the default printer in the Direct_Print function, so I'll see if passing a specific printer will change the way it behaves.
  • Dan,

    Yep...I assume the physical printer was the same. We just need to make sure the calling arguments look the same. Let me know how things work out when you replace the null with the specific printer information.
Sign In or Register to comment.