Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to open QPrinter device for RAW writes on Win7

How to open QPrinter device for RAW writes on Win7

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 795 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pklemm
    wrote on last edited by
    #1

    I am working with Qt 5.1.1 on an application that will print to a connected USB Point-Of-Sale (POS) printer.

    This printer only understands ASCII with embedded Escape sequences for font control.

    Using QPrinterInfo::availablePrinters, I see my receipt printer displayed, however QPrinterInfo::location returns an empty QString (also returns empty description and makeAndModel). All printers on my system only report printerName.

    I would like to do ASCII writes directly to the printer. My question is, can I open a QFile with the printer devicename? How would I determine the proper devicename at runtime? My search has not resulted in any useful information.

    The Win7 device manager reports the receipt printer as "USB001", however if I try to QFile::open the file path "\.\USB001" or "\\.\USB001" I get an error.

    What would be the proper method to write ASCII data to the USB printer?

    Pete Klemm, consultant with Embedded Systems Research, Inc.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved