PDA

View Full Version : QPrinter: Print vs. PDF paper size



LynneV
3rd February 2011, 15:15
I have a Qt report writer implementation. The user can choose to output to the printer or to a PDF file. The print output is exactly as expected, BUT the paper size is changed from QPrinter::Letter to 8.26 by 11.69 (inches) the moment QPrinter::setOutputFileName( QString filename) is set. So the margins and page size calculations differ from the print document. Does anyone know why this happens? Is there a better way to address it than saving/resetting paper size after assigning a file name? It took a while to track it down, so I'm curious.