Like Tree1Likes
  • 1 Post By Fordy

USB POS Printer

This is a discussion on USB POS Printer within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I have the Point Of Sale app that was using COM and LPT ports to print on POS printers ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    142

    USB POS Printer

    Hi,

    I have the Point Of Sale app that was using COM and LPT ports to print on POS printers so far, but now I need to start with USB printers that seem to be more modern...

    What general direction should I take? Should I just print as I do on regular A4 printers, just don't show PrintDialog using PD_RETURNDEFAULT and make the layout a bit narrower so it fits on the printer?

    What about the paper length? Should I just print for as long as I need or do I need to check the height of the page with GetDeviceCaps() or something?

    Or maybe do I need to call first EnumPrinters() and find out sutable printer on my own so users can keep default priner set on some A4 usb or network printer used for normal printing?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,855
    Is your new USB POS printer an actual A4 printer, or is it still a traditional "roll" printer on narrow paper, but just happens to have USB rather than serial.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Oh...that "POS"...I thought you meant something else

  4. #4
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Quote Originally Posted by Salem View Post
    Is your new USB POS printer an actual A4 printer, or is it still a traditional "roll" printer on narrow paper, but just happens to have USB rather than serial.
    Yes, "endless" roll printer but now everybody seem to prefer usb connection since new computers come without serial/parallel ports.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,855
    Start with the manufacturers website, read some specs, download some drivers and API's, and start practising.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Quote Originally Posted by Salem View Post
    Start with the manufacturers website, read some specs, download some drivers and API's, and start practicing.

    Ha, Ha! Thanks. The thing is my customers already installed that printer with its drivers so they can print to it from any Windows application, even from mine. The POS module in my app supports two types of printing: over the com/lpt ports, plain text, 40 characters in the line or the second way, standard windows printing, full A4 page(s).

    The thing is, my standard A4 (or Letter format if you will) print is too wide for the paper size supported on this printer, plus it shows the standard Print dialog and I think this dialog is not usually displayed when people print to POS printers.

    My question was, what is the practice with these types of printers. What are others doing. Am I supposed to somehow enter text only mode or just shrink the layout of my standard printing and go full graphics. Should I rely on the default printer setting on the computer or should I find POS printer on my own somehow - with EnumPrinters() call or something? What about the Print dialog?

    I just wonder if there's anyone here that was working with similar printer in a Point Of Sale setting.

    My other problem is that I have the flu and I can't go over there and experiment with the printer. My customers bought the printer today and the idea is to start working on the whole thing now so when I go there next week I can finish everything on my notebook in as little time as possible and be done with it.
    Last edited by idelovski; 01-18-2012 at 04:15 PM.

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    This is probably out of date by now, but might be of use...

    How to set paper size for the default printer through a program?
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Printer out from C++
    By simsjunkie2003 in forum C++ Programming
    Replies: 4
    Last Post: 05-02-2008, 07:25 PM
  2. My !@#$ing Printer
    By DeepFyre in forum Tech Board
    Replies: 2
    Last Post: 02-27-2005, 02:38 AM
  3. Printer
    By Gerard Fremaint in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 09-08-2002, 04:47 AM
  4. printer
    By yvenkat in forum C Programming
    Replies: 1
    Last Post: 01-21-2002, 04:01 PM
  5. printer in w2k
    By loobian in forum C++ Programming
    Replies: 5
    Last Post: 12-23-2001, 06:24 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21