Can't change page orientation printing to Brother label printer in Linux
jasontiller last edited by
Hi, All, :)
My application (Ubuntu 10.04) needs to print a label. I bought the Brother QL-570 on the strength of a few positive reports of its Linux compatibility. I installed the CUPS driver and had no problem printing a test page.
However, when I try to print from Qt, the orientation of the text is incorrect. The output is formatted using simple HTML into a QTextDocument, which is printed on a QPrinter. An excerpt of this code:
lab_printer.setPrinterName( "QL-570-2" );
// I'm using the provided sample roll of 29x90mm labels.
lab_printer.setPaperSize( QSizeF( 29, 90 ), QPrinter::Millimeter );
lab_printer.setOrientation( QPrinter::Landscape );
// The supplied ODT template used these margins.
lab_printer.setPageMargins( 0.11, 0.05, 0.11, 0.05, QPrinter::Inch );
lab_html << "<html><body>"
"<p>1: a b c d e f g h i j k l m n o p q r s t u v w x y z"
"<p>2: a b c d e f g h i j k l m n o p q r s t u v w x y z"
"<p>3: a b c d e f g h i j k l m n o p q r s t u v w x y z"
"<p>4: a b c d e f g h i j k l m n o p q r s t u v w x y z"
lab_doc.setHtml( lab_html.str().c_str() );
lab_doc.print( &lab_printer );
The output in portrait mode is what you'd expect:
!http://home.comcast.net/~tiller30/portrait.jpg(Label output in "Portrait" orientation)!
Unfortunately, the output in landscape mode is not correct:
!http://home.comcast.net/~tiller30/landscape.jpg(Label output in "Landscape" orientation)!
I've verified that when printing to another printer (a Xerox Phaser) I can successfully print in landscape orientation.
Has anyone else tried to use this printer in Linux? Brother provides an SDK, but its Windows-only.
I'm considering trying a Dymo, which has a Linux-based SDK. Has anyone tried Dymos?