Results 1 to 2 of 2

Thread: how to send printer commands using QPrinter?

  1. #1
    Join Date
    Jul 2008
    Location
    Philippines
    Posts
    60
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default how to send printer commands using QPrinter?

    Hi All,

    Is it possible to send printer commands (for receipt printer) such as double height, double width, autocut, etc. using QPrinter? I can managed to do this by sending the commands in the printer port, but my big problem here is, if the printer is connected over a network, in this case i can't send the command over the printer port. Maybe i should send the command over the printer name, but i don't know how to do this. Im reading the QPrinter docu but i can't find the right function to do this..

    Any help would be very much appreciated..

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to send printer commands using QPrinter?

    I am not sure I follow.
    QPrinter is working against a printer driver, not directly.
    So if you can send the commands you want when the printer is connected directly, the ability to send them over the network is dependent if the printer driver supports a connection over the LAN.

    At least I think so.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. serial port printer sending commands, how?
    By triperzonak in forum Qt Programming
    Replies: 3
    Last Post: 6th April 2009, 14:51
  2. printer the chinese character with QPrinter
    By trytoremeber963 in forum Qt Programming
    Replies: 0
    Last Post: 3rd June 2008, 08:42
  3. Mac Commands
    By shyam prasad in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2007, 15:30
  4. QPrinter::PrinterMode and QPrinter::setResolution??
    By SkripT in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2006, 11:59
  5. Replies: 2
    Last Post: 31st January 2006, 14:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.