printing landscape document
Hi all, I have a document (PS) in landscape orientation and want to print it on my HP LJ6L, but no matter what I do I can't rotate the printout so that it comes out in portrait orientation on the paper. I use kprinter as print program, but changing the orientation in the properties dialog doesn't change anything. Just for completeliness: I print from inkscape, print command line in the program is configured as "| kprinter". I can print to a file, load it into gv, change the orientation there, but still it is printed in landscape and doesn't fit on the paper. Regards Mario
Mario Streiber wrote:
Hi all,
I have a document (PS) in landscape orientation and want to print it on my HP LJ6L, but no matter what I do I can't rotate the printout so that it comes out in portrait orientation on the paper.
I use kprinter as print program, but changing the orientation in the properties dialog doesn't change anything.
Just for completeliness:
I print from inkscape, print command line in the program is configured as "| kprinter".
I can print to a file, load it into gv, change the orientation there, but still it is printed in landscape and doesn't fit on the paper.
Is it big? Could you post it here? Or send it as email to me and I will have a look on it. CU Dierk -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
Dierk Fröhling's Message from Wed December 1 2004 15:30:
Mario Streiber wrote:
Hi all,
I have a document (PS) in landscape orientation and want to print it on my HP LJ6L, but no matter what I do I can't rotate the printout so that it comes out in portrait orientation on the paper.
I use kprinter as print program, but changing the orientation in the properties dialog doesn't change anything.
Just for completeliness:
I print from inkscape, print command line in the program is configured as "| kprinter".
I can print to a file, load it into gv, change the orientation there, but still it is printed in landscape and doesn't fit on the paper.
Is it big? Could you post it here? Or send it as email to me and I will have a look on it.
I just reduced the inkscape drawing to a minimum. This is the resulting .ps file: %!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 0.0 595.00000 translate 0.8 -0.8 scale gsave [1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000] concat gsave [1.0000000 0.0000000 0.0000000 1.0000000 -10.751160 743.75510] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 152.66046 -566.75702 moveto 152.66046 -141.91464 lineto 910.57446 -141.91464 lineto 910.57446 -566.75702 lineto 152.66046 -566.75702 lineto closepath [] 0 setdash 0.35404503 setlinewidth 0 setlinejoin 0 setlinecap stroke grestore gsave [1.0000000 0.0000000 0.0000000 1.0000000 -10.751160 743.75510] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 170.37527 -552.58569 moveto 170.37527 -159.62936 lineto 892.85965 -159.62936 lineto 892.85965 -552.58569 lineto 170.37527 -552.58569 lineto closepath [] 0 setdash 0.35044584 setlinewidth 0 setlinejoin 0 setlinecap stroke grestore grestore showpage It draws just two big rectangles. I already found this document: http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscape-81.html but the hints there don't help either, Maybe a cups update will help, I didn't try this. I have SuSE 8.1 with $ rpm -qa | grep cups cups-client-1.1.15-132 cups-devel-1.1.15-132 cups-libs-1.1.15-132 cups-drivers-1.1.15-86 cups-drivers-stp-1.1.15-86 cups-1.1.15-132 Regards Mario
Mario Streiber wrote:
Dierk Fröhling's Message from Wed December 1 2004 15:30:
Mario Streiber wrote:
Hi all,
I have a document (PS) in landscape orientation and want to print it on my HP LJ6L, but no matter what I do I can't rotate the printout so that it comes out in portrait orientation on the paper.
I use kprinter as print program, but changing the orientation in the properties dialog doesn't change anything.
Just for completeliness:
I print from inkscape, print command line in the program is configured as "| kprinter".
I can print to a file, load it into gv, change the orientation there, but still it is printed in landscape and doesn't fit on the paper.
Is it big? Could you post it here? Or send it as email to me and I will have a look on it.
I just reduced the inkscape drawing to a minimum. This is the resulting .ps file:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 0.0 595.00000 translate 0.8 -0.8 scale gsave [1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000] concat gsave [1.0000000 0.0000000 0.0000000 1.0000000 -10.751160 743.75510] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 152.66046 -566.75702 moveto 152.66046 -141.91464 lineto 910.57446 -141.91464 lineto 910.57446 -566.75702 lineto 152.66046 -566.75702 lineto closepath [] 0 setdash 0.35404503 setlinewidth 0 setlinejoin 0 setlinecap stroke grestore gsave [1.0000000 0.0000000 0.0000000 1.0000000 -10.751160 743.75510] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 170.37527 -552.58569 moveto 170.37527 -159.62936 lineto 892.85965 -159.62936 lineto 892.85965 -552.58569 lineto 170.37527 -552.58569 lineto closepath [] 0 setdash 0.35044584 setlinewidth 0 setlinejoin 0 setlinecap stroke grestore grestore showpage
It draws just two big rectangles. I already found this document:
http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscape-81.html
but the hints there don't help either, Maybe a cups update will help, I didn't try this.
I have SuSE 8.1 with
$ rpm -qa | grep cups cups-client-1.1.15-132 cups-devel-1.1.15-132 cups-libs-1.1.15-132 cups-drivers-1.1.15-86 cups-drivers-stp-1.1.15-86 cups-1.1.15-132
Regards Mario
Try the following as beginnig of the PS file: %!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 90 rotate 0.0 -595.00000 translate 0.8 0.8 scale gsave [1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000] concat . . . Maybe everything is mirrored now or top down... Unfortunately the rectangles have no mark where top/bottom and left/right should be. CU Dierk -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
Dierk Fröhling's Message from Wed December 1 2004 16:17:
Mario Streiber wrote:
Dierk Fröhling's Message from Wed December 1 2004 15:30:
Mario Streiber wrote:
Hi all,
I have a document (PS) in landscape orientation and want to print it on my HP LJ6L, but no matter what I do I can't rotate the printout so that it comes out in portrait orientation on the paper.
I use kprinter as print program, but changing the orientation in the properties dialog doesn't change anything.
Just for completeliness:
I print from inkscape, print command line in the program is configured as "| kprinter".
I can print to a file, load it into gv, change the orientation there, but still it is printed in landscape and doesn't fit on the paper.
Is it big? Could you post it here? Or send it as email to me and I will have a look on it.
I just reduced the inkscape drawing to a minimum. This is the resulting .ps file:
[...]
It draws just two big rectangles. I already found this document:
http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscap e-81.html
but the hints there don't help either, Maybe a cups update will help, I didn't try this.
I have SuSE 8.1 with
$ rpm -qa | grep cups cups-client-1.1.15-132 cups-devel-1.1.15-132 cups-libs-1.1.15-132 cups-drivers-1.1.15-86 cups-drivers-stp-1.1.15-86 cups-1.1.15-132
Regards Mario
Try the following as beginnig of the PS file:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 90 rotate 0.0 -595.00000 translate 0.8 0.8 scale
Yes thanks that worked and is OK for one or two files, but... I don't want to print every landscape oriented drawing into a file, then manually edit it and send it to the printer.
Maybe everything is mirrored now or top down... Unfortunately the rectangles have no mark where top/bottom and left/right should be.
I added a bit text and this showed it is upside down :-( I would prefer a printer driver option that just rotates the drawing. Regards Mario
Mario Streiber wrote:
Dierk Fröhling's Message from Wed December 1 2004 16:17:
Mario Streiber wrote:
Dierk Fröhling's Message from Wed December 1 2004 15:30:
Mario Streiber wrote:
Hi all,
I have a document (PS) in landscape orientation and want to print it on my HP LJ6L, but no matter what I do I can't rotate the printout so that it comes out in portrait orientation on the paper.
I use kprinter as print program, but changing the orientation in the properties dialog doesn't change anything.
Just for completeliness:
I print from inkscape, print command line in the program is configured as "| kprinter".
I can print to a file, load it into gv, change the orientation there, but still it is printed in landscape and doesn't fit on the paper.
Is it big? Could you post it here? Or send it as email to me and I will have a look on it.
I just reduced the inkscape drawing to a minimum. This is the resulting .ps file:
[...]
It draws just two big rectangles. I already found this document:
http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscap e-81.html
but the hints there don't help either, Maybe a cups update will help, I didn't try this.
I have SuSE 8.1 with
$ rpm -qa | grep cups cups-client-1.1.15-132 cups-devel-1.1.15-132 cups-libs-1.1.15-132 cups-drivers-1.1.15-86 cups-drivers-stp-1.1.15-86 cups-1.1.15-132
Regards Mario
Try the following as beginnig of the PS file:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 90 rotate 0.0 -595.00000 translate 0.8 0.8 scale
Yes thanks that worked and is OK for one or two files, but...
I don't want to print every landscape oriented drawing into a file, then manually edit it and send it to the printer.
Maybe everything is mirrored now or top down... Unfortunately the rectangles have no mark where top/bottom and left/right should be.
I added a bit text and this showed it is upside down :-(
I would prefer a printer driver option that just rotates the drawing.
Try instead: %!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 0.00000 translate 0.8 0.8 scale . . . Maybe that's better... If it works, you could use sed as in the example at: http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscape-81.html to modify the PostScript code (add the rotate line, change the translate line and change the scale line). CU Dierk -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
Dierk Fröhling wrote:
Try instead:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 0.00000 translate 0.8 0.8 scale . . .
Maybe that's better...
If it works, you could use sed as in the example at: http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscape-81.html to modify the PostScript code (add the rotate line, change the translate line and change the scale line).
sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' pstest.ps | sed -e 's/^0.8 -0.8/0.8 0.8/' ^-- without linebreak -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
Dierk Fröhling wrote:
Dierk Fröhling wrote:
Try instead:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 0.00000 translate 0.8 0.8 scale . . .
Maybe that's better...
If it works, you could use sed as in the example at: http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscape-81.html to modify the PostScript code (add the rotate line, change the translate line and change the scale line).
sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' pstest.ps | sed -e 's/^0.8 -0.8/0.8 0.8/'
^-- without linebreak
and without the file name! sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' | sed -e 's/^0.8 -0.8/0.8 0.8/' -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
Dierk Fröhling's Message from Thu December 2 2004 10:08:
Dierk Fröhling wrote:
Dierk Fröhling wrote:
Try instead:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 0.00000 translate 0.8 0.8 scale . . .
Maybe that's better...
If it works, you could use sed as in the example at: http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landsca pe-81.html to modify the PostScript code (add the rotate line, change the translate line and change the scale line).
sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' pstest.ps | sed -e 's/^0.8 -0.8/0.8 0.8/'
^-- without linebreak
and without the file name!
sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' | sed -e 's/^0.8 -0.8/0.8 0.8/'
Many thanks for your efforts, but the modifications still mirror the printed page. Here is the .ps file again with a letter added (lowercase k in the upper left corner) that shows the mirroring: %!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 0.0 595.00000 translate 0.8 -0.8 scale gsave [1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000] concat gsave [1.0000000 0.0000000 0.0000000 1.0000000 -10.751160 743.75510] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 152.66046 -566.75702 moveto 152.66046 -141.91464 lineto 910.57446 -141.91464 lineto 910.57446 -566.75702 lineto 152.66046 -566.75702 lineto closepath [] 0 setdash 0.35404503 setlinewidth 0 setlinejoin 0 setlinecap stroke grestore gsave [7.5221810 -0.0000000 0.0000000 8.5339330 0.0000000 0.0000000] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 20.255056 27.925713 moveto 20.255056 21.757744 lineto 21.024588 21.757744 lineto 21.024588 25.742119 lineto 22.446463 23.683525 lineto 23.180838 23.683525 lineto 21.825369 25.687431 lineto 23.583181 27.925713 lineto 22.645681 27.925713 lineto 21.024588 25.749931 lineto 21.024588 27.925713 lineto 20.255056 27.925713 lineto fill grestore grestore showpage Mario
Mario Streiber wrote:
Dierk Fröhling's Message from Thu December 2 2004 10:08:
Dierk Fröhling wrote:
Dierk Fröhling wrote:
Try instead:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 0.00000 translate 0.8 0.8 scale . . .
Maybe that's better...
If it works, you could use sed as in the example at: http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landsca pe-81.html to modify the PostScript code (add the rotate line, change the translate line and change the scale line).
sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' pstest.ps | sed -e 's/^0.8 -0.8/0.8 0.8/'
^-- without linebreak
and without the file name!
sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 0.0 translate/' | sed -e 's/^0.8 -0.8/0.8 0.8/'
Many thanks for your efforts, but the modifications still mirror the printed page. Here is the .ps file again with a letter added (lowercase k in the upper left corner) that shows the mirroring:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 0.0 595.00000 translate 0.8 -0.8 scale gsave [1.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000] concat gsave [1.0000000 0.0000000 0.0000000 1.0000000 -10.751160 743.75510] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 152.66046 -566.75702 moveto 152.66046 -141.91464 lineto 910.57446 -141.91464 lineto 910.57446 -566.75702 lineto 152.66046 -566.75702 lineto closepath [] 0 setdash 0.35404503 setlinewidth 0 setlinejoin 0 setlinecap stroke grestore gsave [7.5221810 -0.0000000 0.0000000 8.5339330 0.0000000 0.0000000] concat 0.0000000 0.0000000 0.0000000 setrgbcolor newpath 20.255056 27.925713 moveto 20.255056 21.757744 lineto 21.024588 21.757744 lineto 21.024588 25.742119 lineto 22.446463 23.683525 lineto 23.180838 23.683525 lineto 21.825369 25.687431 lineto 23.583181 27.925713 lineto 22.645681 27.925713 lineto 21.024588 25.749931 lineto 21.024588 27.925713 lineto 20.255056 27.925713 lineto fill grestore grestore showpage
Mario
hopefully final version: %!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 595.0 translate 0.8 -0.8 scale . . . sed command: sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 595.0 translate/' Oh and for A3 paper replace every 842 by 1191 and every 595 by 842. For letter size 595->612, 842->792. For tabloid size 595->792, 842->1224 CU Dierk -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
hopefully final version:
%!PS-Adobe-2.0 %%BoundingBox: 0 0 842 595 %%HiResBoundingBox: 0.0000000 0.0000000 842.00000 595.00000 -90 rotate -842.0 595.0 translate 0.8 -0.8 scale . . .
Yes this finally worked.
sed command: sed -e 's/^0.0 595.00000 translate/-90 rotate\n-842.0 595.0 translate/'
Oh and for A3 paper replace every 842 by 1191 and every 595 by 842. For letter size 595->612, 842->792. For tabloid size 595->792, 842->1224
I'm still looking for a "real" solution. But even with a newer cups version (1.22) as recommended in that SDB doc at http://portal.suse.de/sdb/de/2002/12/jsmeix_print-cups-landscape-81.html it didn't work. So I decided to write a more flexible script to do the rotation to portrait: $ cat psrotate2portrait #!/usr/bin/awk -f BEGIN { rotate = 0 } { done = 0 } /BoundingBox/ { if ($4 > $5) { rotate = 1 printf("%s %s %s %s %s\n", $1, $2, $3, $5, $4) xt = $4 yt = $5 done = 1 } } /translate/ { if (rotate > 0) { printf("-90 rotate\n-%s %s translate\n", xt, yt) done = 1; } } done == 0 { print } $ It derives the translation parameters from the BoundingBox parameters, and if the orientation is already portrait, it does not rotate. Thanks Dierk for your hints to the ps syntax. As the above scripts is also just a workaround, does anyone else also have this problem? Is this specific to inkscape? Does this program create buggy ps code? According to the SDB doc the ps code should contain an Orientation command, but the ps file created by inkscape does not... Mario
participants (2)
-
Dierk Fröhling
-
Mario Streiber