Set printing options manually - paper size, advanced tab
-
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:
-
Page size changed via code - OK
!http://i.imgur.com/29GCI.png(print dialog)! -
Unmodified media size (how to modify it via code?)
!http://i.imgur.com/byQeL.png(print dialog)! -
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!
-
-
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.