Re: Error printing A3 paper format
Posted by mickele on Jun 27, 2011; 8:35pm
URL: https://forum.librecad.org/Error-printing-A3-paper-format-tp4511915p4529701.html
Yes, you're right.
However the problem is in Qt. I wrote a simple program that prints a word on an A3 paper.
On other system (e.g. windows) everything works fine, on my archlinux 64 bit it creates an A4.
Here's some code:
QPrinter * printer = new QPrinter();
printer->setPaperSize( QPrinter::A3 );
qWarning("before: %d", printer->paperSize() );
// it prints 8, the right value
if( printer->isValid() ){
QPrintDialog * dialog = new QPrintDialog( printer, this );
// I set pdf as printer, but I don't change the paper size
if( dialog->exec() == QDialog::Accepted ){
printer->setPaperSize( QPrinter::A3 );
qWarning("after: %d", printer->paperSize() );
// it prints 0, A4 format
QTextDocument doc;
doc.setPlainText( trUtf8("bye") );
doc.print( printer );
}
}
delete printer;
This can be a bug in qt-4.7.3 or a bug in qt package available on archlinux.