Results 1 to 2 of 2

Thread: QPrinter alignment

  1. #1
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QPrinter alignment

    Hi,

    I have a thermal printer in which I need to print a text file receipt-like (not a receipt, but it's an 80mm wide paper-roll).

    I want to print a text that's in monospaced font (Courier) and size 10. But the printer has a crazy big margin and I don't know how to change that.

    These are screenshots of my issue

    This is the text file opened in 3 different applications:
    Notepad++, Notepad.exe and Qt QTextEdit. As you can see, the text is being displayed flawlessly
    Squares.jpg

    Here is the printing results. As you can see, it is not ok and nothing like the original above.
    20121130_113905.jpg
    Each of those were printed in their respective applications. (in Qt's case, with QPrinter)

    My first impression is that my biggest concern right now should be the crazy big marigin this has. The margins are almost the same size of the available space for text. However, this is just me trying to make an educated guess and not backed up by formal documentation.

    I have no idea how to proceed from here, does anyone know what could be producing this sort of behaviour? It's my first time working with printers and it's already well on it's way to confirm that THIS is true.

  2. #2
    Join Date
    Jul 2016
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QPrinter alignment

    Can you post the code?

Similar Threads

  1. QPrinter bug?
    By lni in forum Qt Programming
    Replies: 0
    Last Post: 23rd February 2009, 04:52
  2. Help with alignment
    By IsleWitch in forum Newbie
    Replies: 1
    Last Post: 20th October 2007, 18:20
  3. QPrinter in qt4.1.3
    By ~YosogO~ in forum Newbie
    Replies: 3
    Last Post: 27th August 2007, 09:57
  4. QPrinter
    By fpujol in forum Qt Programming
    Replies: 3
    Last Post: 26th January 2007, 12:01
  5. QPrinter::PrinterMode and QPrinter::setResolution??
    By SkripT in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2006, 11:59

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.