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
Mickele,

are you sure that ypur printer driver doesn't scale it back?
I will try this a bit later today and see what happens.

Ries

On Jun 21, 2011, at 3:39 PM, mickele [via LibreCAD] wrote:

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?



If you reply to this email, your message will be added to the discussion below:
http://librecad.1049103.n5.nabble.com/Error-printing-A3-paper-format-tp4511915p4511915.html
To start a new topic under LibreCAD, email [hidden email]
To unsubscribe from LibreCAD, click here.

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
Mickele,

i have been looking into this. And for me it happens aswell. This is because my printer (Epson scanner thingy) doesn't support. So the dialog goes back to something that's valid.

However, when I set the dropdown to A3 I can perfectly print on A3.

I will push a couple of updates regarding this, mainly to get rid of some q3support related items.

Ries
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
Mickele,

where exactly do you see this in qprinter.cpp?
Ries

On Jun 27, 2011, at 2:54 PM, mickele [via LibreCAD] wrote:

Problem seems caused by Qt.
Method QPrinter::setPaperSize() doesn't work when printing on PDF (see qprinter.cpp).
Quite strange...


If you reply to this email, your message will be added to the discussion below:
http://librecad.1049103.n5.nabble.com/Error-printing-A3-paper-format-tp4511915p4529625.html
To start a new topic under LibreCAD, email [hidden email]
To unsubscribe from LibreCAD, click here.

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
Mickele,

that macro points to:

#define ABORT_IF_ACTIVE(location) \
    if (d->printEngine->printerState() == QPrinter::Active) { \
        qWarning("%s: Cannot be changed while printer is active", location); \
        return; \
    }


So I think as long as the printer is not active,
I should beable to set the paper size.

Ries

On Jun 27, 2011, at 3:13 PM, mickele [via LibreCAD] wrote:

Line 1136 in

http://www.qt.gitorious.org/+wkhtml2pdf/qt/wkhtmltopdf-qt/blobs/076c6564fb466aa28b485bd927ac7fd0449097fd/src/gui/painting/qprinter.cpp


If you reply to this email, your message will be added to the discussion below:
http://librecad.1049103.n5.nabble.com/Error-printing-A3-paper-format-tp4511915p4529662.html
To start a new topic under LibreCAD, email [hidden email]
To unsubscribe from LibreCAD, click here.

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 . . .