Author Topic: A new barcode+thermal printer thread.  (Read 5608 times)

Mesnik44

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
A new barcode+thermal printer thread.
« on: September 04, 2014, 08:37:13 PM »
Hi folks,

I read this threat a couple years ago http://www.thetournamentdirector.net/forums/index.php?topic=3159.0, and I had been very interested in it. Until Tuesday of this week, I had no clue how to get it to work.

I bought a TaoTronic USB scanner from Amazon with 1 day shipping for ~$40.00 CDN. Man......with the directions from the thread I linked, it is so easy to add people, buy them in and seat them. The scanner works right out of the box. Nothing special needed to make it work with TD. (Corey, every time I find a new feature in this program, I am blown away at what it can do!). I've printed cards for all of my players and have laminated them. Using this scanner, I can sign people into my tournaments with one key (*). If you are on the bubble about doing something like this, I say, GO FOR IT. You will not regret it.

My next step is to add a thermal printer for receipts. I have looked at the receipt.html and I have tried my best and failed miserably trying to get it to work. I have edited the html file, but when I do a test print to an inkjet, I get header information (name of file on the top left, page 1 of 1 on the top right) and footer information (file location bottom left, and date on the bottom right). Also, when I add my logo (same as my avatar, but in greyscale), the logo wont print. If the gurus (you know who you are....) could shed some light on this, it would be very much appreciated.

Enough babbling...

Again, Corey, your product ROCKS!

John.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #1 on: September 05, 2014, 09:16:27 AM »
That's awesome!  Glad to hear it the scanner worked "out of the box" for you.  Others have had some trouble with special characters and the like.

Because of the platform the TD uses, direct integration with printers is not easy and can be error prone.  The TD can't print anything without help from the outside, so to speak.  That means either a custom Active-X control (which it doesn't have, but could possibly use I suppose), or just relying on Internet Explorer's print function, which is what it does today.  That means the *only* capacity it has is to format things the best it can and basically press the "Print" button in IE.  That opens the print dialog in IE and you have to "confirm" by pressing the print button on that dialog.  There is a feature in the TD to automatically press that button, too, and I think it works fairly well (Preferences tab -> Auto Print category).  Relying on IE to print also means getting the header and footer that IE automatically puts on the page for anything you print.  You can control this by opening Internet Explorer and selecting Print -> Page Setup.  There you can tell IE to make the header and footer blank, and control the margins.  The downside is that this obviously also affects anything you print from IE, independently of the TD.

I don't know why the logo won't print.  You can see what should print by setting the TD's preferences to create a receipt file as well as printing the receipt (Preferences -> Receipts category), then opening the receipt file (it's an HTML file) in IE.  What you see is what should print.  If you don't see your logo, it might be that the path to the logo file is wrong or the HTML is simply hosed somehow.  If you do see the logo but it's still not printing, it might be an issue with your printer or drivers.

Mesnik44

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #2 on: September 05, 2014, 03:17:24 PM »
HI Corey,

I figured out the logo. I just needed to link it to my imgur account. All is well on that front.

Mesnik44

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #3 on: September 12, 2014, 06:05:56 PM »
Update#1

EQUIPMENT:
Barcode Scanner: TaoTronics TT-BS003 USB Automatic Barcode Scanner Bar-code Reader with Hands Free Adjustable Stand -Black - $29.99
Receipt Printer: Epson TM-T20II Readyprint Thermal Receipt Printer Dark Gray USB & Serial Interfaces Power - $149.99
Paper Rolls 3 1/8' - $35.00

I have both products installed on my laptop. On the laptop is Teamviewer. On the TD computer, obviously is TD and TeamViewer.
1 ) Make sure all drivers are installed for printer. No drivers are needed for the barcode scanner...how cool is that?
2 ) Using printer utility go to logo and have it convert your poker logo.
3 ) Within the printer driver preferences, again, have it use your poker logo. By doing steps 2&3 you do not need to add a logo to your receipt.html that you have updated.
4 ) Share the printer.
5 ) Add printer on the TD computer via Add printer --> network printer. (redo steps 2 and 3 on the TD computer).
6 ) Set up receipt printing within TD.
7 ) Set up auto print within TD if you wish.
8 ) Assign a key for adding players.
9 ) In preferences --> behavior make sure Paid in full, Buy-in Players now, auto seat, show find on player dialog are all checked.
10) Connect laptop with scanner and printer to TD computer via Teamviewer and maximize the screen. Now you have a remote session that will not interfere with TD at all.
11) Hit Hotkey for signing players (in my case * ). Scan barcode. Collect receipt.

Conclusion...
Players will give me their membership cards and their buy in. I will scan barcode. They will get a receipt with my logo, tournament name, game type, their name as setup in TD, their seat number, and buy in recorded on it.

I usually have the screen on Seating Chart, so that players can see where they are sitting at the table.

Modified ---
Pictures to follow
« Last Edit: September 14, 2014, 12:54:27 AM by Mesnik44 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #4 on: September 12, 2014, 11:31:42 PM »
Very cool.  :)

Mesnik44

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #5 on: September 15, 2014, 09:02:11 PM »
Corey,

I just figured out, with a little javascript, how to print on the receipt, that if someone buys in before a certain time, it will print "Bonus Chips 1000". After a certain time, it prints "NO BONUS".

This program keeps getting better and better, the more I dive into it!

Thanks!!!

John.


Modify - FINAL VERSION FOR RECEIPT
« Last Edit: September 17, 2014, 04:03:27 PM by Mesnik44 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #6 on: October 23, 2014, 03:29:42 PM »
Looks great!  Thanks for sharing.

Jabelliker

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #7 on: February 21, 2015, 04:01:36 PM »
Wasn't sure if I should start my own thread, and didn't want to thread jack... I owe a debt of gratitude to the original poster and others who have shared their experience with the referenced subject matter... I'm using a motorola barcode scanner and Epson TM-20ii thermal printer.

Disclaimers aside, here's what I've come up with for my home poker game!

Corey, this software is phenominal!!!!

JD



Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #8 on: February 25, 2015, 08:48:30 AM »
That's very cool!

I see you even have staff.  :)

Scotty K

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #9 on: March 12, 2015, 07:54:39 PM »
Thought that I would add my own experience in this area...

I had been using the receipts features for several years now.  I had been using a conventional inkjet printer (an inexpensive HP that I got at Target for about $30 at the time) to print out receipt cards.  This method served me well, but I suppose the drawback was that I needed to replace the ink cartridges after a time, and that would get expensive.

I found this thread recently, and when my ink ran out yet again, I finally decided to go the thermal route.  I know the other posters here use the Epson TM-T20II, which is a great printer, but I found an inexpensive generic-type printer on Amazon for $35 with free shipping, which is probably less than I would have paid for the ink on the other printer (you might even be able to get the same printer on Ebay for less).  The receipts it prints are smaller in width than what the Epson prints, at 2 1/4 inches, but it's adequate for what I'm using them for.  I used the included receipt template and modified it slightly.

I already use a barcode scanner, and I give my members cards with a barcode on the back that I scan (the Gold cards are for charter members; the blue for everyone else).  The printer then prints the receipts with the table and seat info, and we're good to go.

As the OP mentioned, if you are on the fence regarding instituting this type of setup for your game, you should indeed go for it; even if you don't want to go the barcode scanner route, just having the printer with the table and seat info is helpful by eliminating the "What table am I at?" questions.
« Last Edit: March 12, 2015, 08:10:43 PM by Scotty K »

goca_flg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #10 on: March 17, 2015, 12:29:10 PM »
Could you post the receipts templates in html?

Scotty K

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #11 on: March 17, 2015, 03:55:17 PM »
Why, yes, I can...

Note that the text that I have in red should be substituted with the location and file name of the logo that you will be using; that is, if you are using one.  Otherwise, nothing will show up.

I would also suggest locating this receipt file in the same location ("Templates") as the original one, but give it a different name.  This way when you go in the Preferences tab to choose it, it will be easier to find.


<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=<charset>" />
    <title>Receipt</title>
  </head>

  <style type="text/css">

    BODY, TD
    {
      background-color: #ffffff;
      color: #000000;
      font-family: Arial;
      font-size: 10pt;
    }

  </style>

  <body>

      <table border="0" width="100%">
   <tr>
          <td align="center"><nobr><img border="0" src="C:\Users\Kohrherr Family\Documents\The Tournament Director 2\Data\images\NJPT logo text greyscale.gif" width="160" height="61"></nobr></td>
        </tr>
   <tr>
   </tr>
   <tr>
          <td align="center"><nobr><eventname><br>- NL Hold'em -</nobr></td>
        </tr>
        <tr>
          <td><div style="height: 16px"></div></td>
        </tr>
   <tr>
     <td align="center"><nobr>Player:</nobr><br><nobr><b><font size="3"><firstname> <lastname></font></b></nobr></td>
   </tr>
   <tr>
     <td align="center"><nobr>Player ID#: <id></nobr></td>
   </td>
   <tr>
          <td><div style="height: 16px"></div></td>
        </tr>
      </table>

      <table border="0" width="100%">
        <tr>
          <td align="left"><nobr><item0></nobr></td>
          <td align="right"><nobr><amount0><nobr></td>
        </tr>
        <tr>
          <td align="left"><nobr><item1></nobr></td>
          <td align="right"><nobr><amount1><nobr></td>
        </tr>
        <tr>
          <td align="left"><nobr><item2></nobr></td>
          <td align="right"><nobr><amount2><nobr></td>
        </tr>
        <tr>
          <td align="left"><nobr><item3></nobr></td>
          <td align="right"><nobr><amount3><nobr></td>
        </tr>
        <tr>
          <td align="left"><nobr><item4></nobr></td>
          <td align="right"><nobr><amount4><nobr></td>
        </tr>
        <tr>
          <td align="left"></td>
          <td align="right"><div style="height: 4px; width: 75px; border-top: double #000000;"></div></td>
        </tr>
        <tr>
          <td align="left"><nobr>Total</nobr></td>
          <td align="right"><nobr><total><nobr></td>
   </tr>
   <tr>
     <td><div style="height: 16px"></div></td>
        </tr>
      </table>

      <table border="3" bordercolor="black" width="100%">
   <tr>
     <td align="center"><nobr>Table: <b><font size="4"><tablename></font></b></nobr><br><nobr>Seat: <font size="4"><b><seatnumber></b></nobr></font></td>
   </tr>
      </table>

      <table border="0" width="100%">
   <tr>
          <td><div style="height: 16px"></td>
        </tr>
   <tr>
          <td align="left"><font size="1"><nobr><date></nobr></font></td>
     <td align="right"><font size="1"><nobr><time></nobr></font></td>
        </tr>
      </table>
      <table border="0" width="100%">       
   <tr>
          <td align="center"><font size="1"><nobr>Receipt #<receiptnumber></nobr></font></td>
        </tr>
        <tr>
          <td align="center"><font size="1"><nobr>Salesperson: <salesperson></nobr></font></td>
        </tr>
      </table>

  </body>
</html>


Hope this helps.  If you need any additional help or info, just yell...
« Last Edit: March 17, 2015, 03:59:14 PM by Scotty K »

goca_flg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #12 on: March 25, 2015, 12:28:02 AM »
Scotty K,

Thanks for your help !!!

love

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: A new barcode+thermal printer thread.
« Reply #13 on: March 03, 2016, 01:21:36 AM »
Wasn't sure if I should start my own thread, and didn't want to thread jack... I owe a debt of gratitude to the original poster and others who have shared their experience with the referenced subject matter... I'm using a motorola barcode scanner and Epson TM-20ii thermal printer.

Disclaimers aside, here's what I've come up with for my home poker game!

Corey, this software is phenominal!!!!

JD






totally amazing.
i could not believe it.

is the kid on the picture playing it ? :)