Results 1 to 2 of 2

Thread: What is better for settng printer on Windows?

  1. #1
    Join Date
    Oct 2013
    Posts
    142
    Thanks
    36
    Thanked 3 Times in 3 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default What is better for settng printer on Windows?

    I am using QWebView for printing html generated content but I find myself a bit stuck, because when I compile the application on Windows and trying to print, the resolution messes up the page, though on Linux the page prints fine.
    Example: If the printer is set with HighResolution the text becomes too small, if the printer is set with ScreenResolution the text goes outside the page.
    I found out,through web searches, this is because of the resolution, though I do not if this is actually a bug, also the printer settings are set by QPrintDialog.
    Also I've managed to find 2 possible workarounds:
    1. I should scale the text to fit the page
    2. I should set the resolution myself using setResolution(int dpi)

    I need to use something that can be used on multiple machines without me interfeering(recompiling) on every machine I install the application.
    Which is better from those workarounds(which I mentioned above) for my pourpose?
    Or are there any other methods I can use?

    I also tried setting the document using QWebPage but I had the same issue.

  2. #2
    Join Date
    Oct 2013
    Posts
    142
    Thanks
    36
    Thanked 3 Times in 3 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: What is better for settng printer on Windows?

    It was a bug.

    Here is the snapshot if anyone needs a help with this kind of issue.

    qpaintengine_alpha.cpp

    Works in 5.2.1 from what I tested.

Similar Threads

  1. Printer problem
    By K4ELO in forum Qt Programming
    Replies: 7
    Last Post: 15th April 2015, 09:15
  2. How to print pdf file on Printer in windows
    By lekhrajdeshmukh in forum Qt Programming
    Replies: 9
    Last Post: 30th November 2011, 16:36
  3. Dot Matrix Printer
    By estanisgeyer in forum Qt Programming
    Replies: 3
    Last Post: 18th December 2009, 19:30
  4. Replies: 1
    Last Post: 9th November 2009, 09:27
  5. Getting Printer Status...
    By aalekhm in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 05:34

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.