dcsimg
Results 1 to 9 of 9

Thread: Usb thermal ticket printer

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    735

    Usb thermal ticket printer

    How is supposed, that using the USB thermal printer, which is represent in windows like a normal printer, where the app can print and draw on the bitmap of page/pages, to print.

    how is suppose to send a OPEN CASHIER DRAWER BOX escapes character, if the object printer in VB6 hasn't like a WritePrint so send stream directly to its connection?

    The function only receives the name of the printer.

    What I did is to print an empty ticket, to auto-trigger the cashier's drawer, but it spit out paper anyway.

  2. #2
    Hyperactive Member
    Join Date
    Mar 2018
    Posts
    345

    Re: Usb thermal ticket printer

    I've used two methods for printing images and such to thermal\label printers:
    1. creating an html file and the issuing the print command via webbrowser control
    2. drawing to a picture box and issuing a print command

    I've not used cash drawer commands but you should look at http://monroecs.com/posfordotnet/opos_dotnet.htm. great set of common controls and you will likely find a "drawer.open()" function that will make it easy to open it.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    735

    Re: Usb thermal ticket printer

    Quote Originally Posted by DllHell View Post
    I've used two methods for printing images and such to thermal\label printers:
    1. creating an html file and the issuing the print command via webbrowser control
    2. drawing to a picture box and issuing a print command

    I've not used cash drawer commands but you should look at http://monroecs.com/posfordotnet/opos_dotnet.htm. great set of common controls and you will likely find a "drawer.open()" function that will make it easy to open it.
    That is not the issue... my description is that I am using like a normal Windows Printers, these thermal printers are not COM are not LPT, are USB, and prints using Printer.StartDoc .... Printer.Print "abc" .... Printer.EndDoc

    That is using the GDI capabilities of Windows for drawing text in the blank bitmap that the printer driver serves to the app ....

    So, I am not sending a stream of characters directly to the printer. (like stream of ASCI / UNICODE)

    So, how to send ESC codes to open the drawer box if the printer is not COM / LPT?
    Last edited by flyguille; Jul 11th, 2019 at 12:23 PM.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    443

    Re: Usb thermal ticket printer

    Use something like:

    Printer.Print Chr(27) & "ABC";

    Make sure that you add ";" at the end, otherwise VB sends CR/LF sequence as well.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    735

    Re: Usb thermal ticket printer

    Quote Originally Posted by qvb6 View Post
    Use something like:

    Printer.Print Chr(27) & "ABC";

    Make sure that you add ";" at the end, otherwise VB sends CR/LF sequence as well.
    Facepalm! but can be?,,,, I mean no StartDoc, no page..... , no EndDoc..... nahhhhhhhhh that .Print method just draws graphically characters in the bitmap, no bitmap, ERROR as response.
    Last edited by flyguille; Jul 11th, 2019 at 12:40 PM.

  6. #6
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    443

    Re: Usb thermal ticket printer

    I left out the obvious, I wasn't trying to do your homework for you, just a pointer in how it's done. It's up to the printer driver to Interpret the result.

  7. #7
    Hyperactive Member
    Join Date
    Feb 2019
    Posts
    443

    Re: Usb thermal ticket printer

    It looks like the API function Escape/ExtEscape with flag PASSTHROUGH is what is needed. Here is a KB article on the subject. You may want to also search the forum or the web for samples.

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    735

    Re: Usb thermal ticket printer

    Quote Originally Posted by qvb6 View Post
    It looks like the API function Escape/ExtEscape with flag PASSTHROUGH is what is needed. Here is a KB article on the subject. You may want to also search the forum or the web for samples.
    finally, something that can work.

  9. #9
    Lively Member
    Join Date
    May 2017
    Posts
    69

    Re: Usb thermal ticket printer

    Back in the day, when I was doing EPoS, the manufacturer of the EPoS printers/keboards/keylocks/cash drawers etc had their own windows drivers. In my case this was TEC cash registers. One had to ask Sales Dept for the drivers though as they didn't ship with devices - nor for that matter were theyreferred to in the documentation. Once those were in it was generally a breeze.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width