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. Qwebview and printer issue(paper size)
Forum Update on Monday, May 27th 2025

Qwebview and printer issue(paper size)

Scheduled Pinned Locked Moved Unsolved General and Desktop
qwebviewqprinterhtml
2 Posts 1 Posters 1.4k Views
  • 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.
  • N Offline
    N Offline
    Nouriemm
    wrote on 22 Jan 2016, 09:47 last edited by
    #1

    Hello everyone,
    I have got a QWebView widget in my application. it shows HTML very well.
    But
    When it comes to printing the html page, it does not like the defined printer properties:

    QPrinter printer;
    printer.setOrientation(QPrinter::Landscape);
    printer.setPaperSize(QPrinter::A6);
    printer.setPageMargins(5,5,5,5,QPrinter::Millimeter);
    printer.setFullPage(true); 
    
    ui->webView->print(&printer);
    

    As you see I want to print on an A6 paper(A6 paper is a quarter of an A4). In result, all the time it gives me Letter standard page rather than A6.

    I have prepared a project which reflect the issue and it's downloadable from the link below:
    http://wikisend.com/download/679960/printerIssue.zip

    Thanks in advance

    1 Reply Last reply
    0
    • N Offline
      N Offline
      Nouriemm
      wrote on 22 Jan 2016, 17:14 last edited by
      #2

      Anyone?
      Any Idea?

      1 Reply Last reply
      0

      1/2

      22 Jan 2016, 09:47

      • Login

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