Bug 160618 - LibreOffice (Draw) can't rotate orientation (landscape document into portrait) for printing
Summary: LibreOffice (Draw) can't rotate orientation (landscape document into portrait...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.6.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2024-04-10 21:20 UTC by Hadmut Danisch
Modified: 2024-04-30 03:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
label on a landscape page, Draw textbox unrotated (158.20 KB, image/png)
2024-04-11 13:20 UTC, V Stuart Foote
Details
label on a portrait page, Draw textbox rotated to 270° (148.56 KB, image/png)
2024-04-11 13:21 UTC, V Stuart Foote
Details
Print file (14.48 KB, application/vnd.oasis.opendocument.graphics)
2024-04-27 17:32 UTC, Hadmut Danisch
Details
Inkscape print dialog page 1 (107.41 KB, image/png)
2024-04-29 17:53 UTC, Hadmut Danisch
Details
Inkscape print dialog page 2 (106.56 KB, image/png)
2024-04-29 17:54 UTC, Hadmut Danisch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hadmut Danisch 2024-04-10 21:20:06 UTC
Hi, 

I'm currently trying to use LibreOffice (Writer and Draw) to print Paper Labels with a Label Printer (brother QL-820NWBc). 

Problem: 

The Label Stickers are fed to the printer in Portrait orientation (Example: 29mm width, 90mm height). 

To ease editing, I try to create Labels in landscape mode (i.e. widht 90mm, height 29mm), to have the text readable. 

Whatever I tried, LibreOffice seems to be completely unable to rotate a landscape document by 90° to fit into a portrait orientation paper. It has options to keep the original size or to shrink it to fit onto the paper, but whatever I tried, the text remained in horizontal orientiation and never fit the vertical paper format. 

the only way is to define the page in portrait mode, and to rotate the text, i.e. have it difficult to read while editing. 


That's a severe flaw. A document tool should be able to rotate a landscape document by 90° to be printed on a printer, since all printers get their paper in vertical/portrait mode.
Comment 1 Hadmut Danisch 2024-04-10 21:31:56 UTC
BTW: Inkscape, in contrast, does print correctly.
Comment 2 V Stuart Foote 2024-04-11 13:18:04 UTC
Can not confirm, though I do not have the specific label printer.

Using a postscript printer (gs with CutePDF) the "printer" supports setting a  page size as needed to hold the horizontal layout drawing in its landscape page layout.

I can achieve a print in landscape orientation, or a portrait orientation by selecting from page orientation and then rotating the drawing object to 270°. 

Which ever I need to send to printer. See attached clips.

Of course this is one "label" at a time. But you could save to template (or use predefined for filling label sheets). 

And not clear what label sheet sizes your Brother QL-820NWBc reports to CUPS or the os for LibreOffice to make use of directly.  

So, you might do fine with a ghostscript based print flow that exactly fits the media if you have no printer support otherwise.

=-ref-=
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 30c6e51fc9cb0fa864e1755271343d847fcced25
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 3 V Stuart Foote 2024-04-11 13:20:28 UTC
Created attachment 193620 [details]
label on a landscape page, Draw textbox unrotated
Comment 4 V Stuart Foote 2024-04-11 13:21:19 UTC
Created attachment 193621 [details]
label on a portrait page, Draw textbox rotated to 270°
Comment 5 V Stuart Foote 2024-04-11 13:24:30 UTC
ops, sorry had those descriptions reversed...
Comment 6 Stéphane Guillou (stragu) 2024-04-26 00:52:09 UTC
Thanks for the report.
Can you please:
- share the document your are trying to print
- provide more precise steps to detail what settings you have tried
- try the settings Stuart suggested
- share the full version info copied with the button in Help > About LibreOffice
Comment 7 Hadmut Danisch 2024-04-27 17:32:15 UTC
Created attachment 193880 [details]
Print file

Example of what I am trying to print.
Comment 8 Hadmut Danisch 2024-04-27 17:55:06 UTC
Setting the page format to portrait, i.e. making the width 29mm and the height 90mm, and rotating the label by 270° works, it then prints correctly. 

But: Editing is a nightmare then. As soon as you select the text label to edit it (because wanting to print a different label), libreOffice shows the text Label temporarily in horizontal, i.e. readable orientation, thus making it difficult to estimate whether the text fits onto the label. 


What I was trying:

Using the attached label file in landscape orientation in order to be able to properly edit the label, and then print. I tried all the orientations in LibreOffice's print dialog, using "Page Layout Orientation", trying all settings. 

The results were different, sometimes scaling the text label differently to either print it in landscape orientiation in original size (where only the first two letters fit on the sticker), or scaling it down to fit on the paper width of 29mm, thus printing the complete text but in microscopic size, but whatever I do, it never rotates the label to fit the paper size (i.e. the sticker). 

As I said, it works without problems with other programs like Inkscape, and I saw somewhere a hint in Linux' printer settings that the driver is able and set to automatically rotate the printed image (as it does for Inkscape). 

So the printer driver (automatically installed by Linux once the printer is present and alive in the network) is able to automatically rotate a landscape designd label to a portrait orientation, but somehow LibreOffice prevents this to work. It looks as if LibreOffice always enforces to print the document exactly in the orientation as it appears on the screen, and always prevents rotating.
Comment 9 QA Administrators 2024-04-28 03:16:30 UTC Comment hidden (obsolete)
Comment 10 Stéphane Guillou (stragu) 2024-04-29 10:17:11 UTC
I guess one way to see the "limitation" is that it is not possible to use a Portrait orientation with a width larger than the height in the Page style: it automatically switches to "Landscape" - which makes it easy to exchange the values between the two fields.
Or is it a bug in that the paper size is not matched between LO and the printer?
My experience with printing is not extensive, so I'm unsure and would like to hear others' opinion.

Hadmut, what would be helpful would be a screenshot/description of the print settings that work for you in another program like Inkscape.
Comment 11 Stéphane Guillou (stragu) 2024-04-29 11:35:11 UTC
Quoting Mike Kaganski on IRC:
> Printing must allow to send the document page (e.g., authored as A4 landscape)
> to printer's A4 portrait, and automatically rotate the landscape page image to
> fit the portrait paper. I didn't test, but if the issue is that that doesn't
> happen, then that's a definite and clear bug.

So seems like a bug.

We also have bug 154959, so can you please clarify the following:
- In LO's Print dialog, does the Preview on the left change when you switch between Landscape and Portrait? (with this dialog's setting: General > Page Layout > Orientation)
- Which Linux distribution do you use?
Comment 12 Hadmut Danisch 2024-04-29 17:52:21 UTC
- I'm using Ubuntu 23.10, 

- Yes, the orientation of the preview changes between portrait and landscape when changing in LO print dialog.  The problem is, that the paper format changes (width and height swap), and it treats paper as 29mm width and 90mm height, but the Text does not rotate with. Text always remains in landscape (horizontal) mode. 


- I'll attach inkscape print dialog screenshots
Comment 13 Hadmut Danisch 2024-04-29 17:53:30 UTC
Created attachment 193896 [details]
Inkscape print dialog page 1

tab 1 of print dialog in inkscape
Comment 14 Hadmut Danisch 2024-04-29 17:54:06 UTC
Created attachment 193897 [details]
Inkscape print dialog page 2

Inkscape print dialog tab 2
Comment 15 QA Administrators 2024-04-30 03:14:27 UTC Comment hidden (obsolete)