Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Set printing options manually - paper size, advanced tab

Set printing options manually - paper size, advanced tab

Scheduled Pinned Locked Moved Language Bindings
3 Posts 2 Posters 3.1k 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.
  • J Offline
    J Offline
    JasonSpine
    wrote on last edited by
    #1

    Hello. I'd like to find out how to set Advanced printing options without forcing user to use dialog. I'm using PyQt, but it's not a binding issue here ;)

    I want to set paper size to DL Envelope, but when I do it with the code below, it doesn't modify media size in Advanced tab.
    @printer.setPaperSize(QtGui.QPrinter.DLE)@
    After that line I'm starting the print dialog with @QtGui.QPrintDialog(printer)@ and I can see DL Envelope in Page size Combo box, but there is still A4 page size set at media size option in Advanced tab.

    My Operating system is Linux Mint 12, printer HP PhotoSmart C3180.

    When I leave Advanced tab as it is (with A4), my print result is zoomed (not as I want it to be), but when I change it manually in Print Dialog, the print result is ok.

    Some screenshots and shortened explanation:

    1. Page size changed via code - OK
      !http://i.imgur.com/29GCI.png(print dialog)!

    2. Unmodified media size (how to modify it via code?)
      !http://i.imgur.com/byQeL.png(print dialog)!

    3. Media size modified manually - I need to prevent that, I don't want to force the user to change any settings manually, is there a way to access Advanced printing options with a code?
      !http://i.imgur.com/ro0Dx.png(print dialog)!

    Thanks for replies in advance!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      Offtop. This thread must be posted in Language Bindings forum (because of PyQt). And remember, General & Desktop for C++.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JasonSpine
        wrote on last edited by
        #3

        Well. I'm sorry, but this problem isn't related to bindings - small portions of code should be understandable for C++ Qt programmer. I thought this issue would suit better to General & Desktop...

        Please help.

        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