Error printing A3 paper format

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Error printing A3 paper format

mickele
On my system (archlinux x86_64, LANG set to it_IT.utf8), if I choose a paper format different from A4, preview is right, but if I print on PDF, LibreCAD prints on A4 format.
Do you have any idea about possible causes?
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

R. van Twisk
Administrator
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

R. van Twisk
Administrator
In reply to this post by mickele
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

mickele
Thanks for your help.
I updated librecad from git, but I still have the same problem.
Also if I print on file, drawing is cut to A4 format.

mickele
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

mickele
Problem seems caused by Qt.
Method QPrinter::setPaperSize() doesn't work when printing on PDF (see qprinter.cpp).
Quite strange...
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

R. van Twisk
Administrator
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

mickele
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

R. van Twisk
Administrator
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

mickele
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.
Reply | Threaded
Open this post in threaded view
|

Re: Error printing A3 paper format

maqifrnswa
On Mon, Jun 27, 2011 at 4:35 PM, mickele [via LibreCAD]
<[hidden email]> wrote:
> 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.

I think you're right, it's a qt bug - don't know how much we can do with that:
http://www.eaglecentral.ca/forums/index.php?t=msg&goto=132446&S=576ba10e86783cc00e88495196dc6082

I can't find a reference in qt's bugs, however . . .