Bug 36874 - Label PRINTING misplaced on paper sheet
Summary: Label PRINTING misplaced on paper sheet
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:3.5 target:3.4.5
Keywords:
: 34271 35272 (view as bug list)
Depends on:
Blocks: 44516
  Show dependency treegraph
 
Reported: 2011-05-05 09:09 UTC by lynj42
Modified: 2012-01-05 22:24 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
L7651 Labels (35.20 KB, image/png)
2011-05-08 01:26 UTC, lynj42
Details
L7651 Format (31.87 KB, image/png)
2011-05-08 01:27 UTC, lynj42
Details
L7160 Labels (32.43 KB, image/png)
2011-05-08 01:28 UTC, lynj42
Details
L7160 Format (32.33 KB, image/png)
2011-05-08 01:30 UTC, lynj42
Details
Test kit (26.49 KB, application/zip)
2011-05-08 22:39 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lynj42 2011-05-05 09:09:47 UTC
I use Avery labels specifically L7160 and L7651 although I suspect all label printing is affected.

On the screen the labels look OK, and in print preview also.
When printing though, the whole page is shifted down approx. 1.7cm.

I've checked the Format tab when opening a new label, and the settings are correct. i.e. they're the same as in OpenOffice on my other Ubuntu 10.10 installation on the same computer which works OK. The printer driver is also identical:
	Brother HL-4040CN Foomatic/pxlcolor (recommended)

Printing from other applications is OK, and printing regular writer documents is also OK?


uname -a output is:
Linux lyn-521 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

LibreOffice is 3.3.2 installed with Natty.
Comment 1 Rainer Bielefeld Retired 2011-05-05 23:23:08 UTC
This sounds very similar to
Bug 35272 - Label PRINTING misplaced on paper sheet

I will mark that one as DUP because here we have much more details.

Modified Version due to DUP
Confirmed by dup, I will do an additional test for current version soon before I will assign.
Comment 2 Rainer Bielefeld Retired 2011-05-05 23:24:15 UTC
*** Bug 35272 has been marked as a duplicate of this bug. ***
Comment 3 lynj42 2011-05-06 00:21:28 UTC
This may not help, but the printer & driver already mentioned:
Brother HL-4040CN Foomatic/pxlcolor (recommended), is a network printer & there is
also a usb printer:
Brother MFC-210C CUPS v1.1, which shows the same problem,
Comment 4 Rainer Bielefeld Retired 2011-05-07 23:39:50 UTC
I really would like to know why the labels L7160 start with page size Envelope DL 110x220mm portrait with "LibreOffice 3.4Beta3  – WIN7  Home Premium  (64bit) German UI [DEV300m103 (Build:3)]". That was the paper size for my last print yesterday from a PDF. 

I know label dimensions 63,5 x 38,1 mm, but I have difficulties to find the paper sheet dimensions. staples.de and others say DIN A4? What'the margin? 

I compared print results for a DIN A4 page and labels L7160 with
left - right - top - bottom: 3,39mm - 3,39mm - 1,69mm - 12,12mm
what is the recommended minimum for my printer (and what is too less,  but that's an other problem).
I found something strange, LibO modifies margins after I closed page size settings. but  after some tests the settings were the same as for the A4 paper sheet.

I did an additional test for Avery C32016 business cards and found that it uses user paper format 205,40mm x 283,86mm instead of A4, what is the correct size of the paper sheets.
But the result looked fine except cut of last 2 cards because of wrong paper sheet size, contents was exactly in the label area.

@lynj42@gmail.com:
I need much more information:
0. Can you please contribute complete dimensions for the labels (margins,
   distance between the labels, ...)
1. All your paper dimensions and print dimensions settings
2. Do margin settings differ between normal a4 (or letter?)  and label sheets
3. do you see any differences printing a normal sheet and a label sheet?
4. What do you want to say with "On the screen the labels look OK"?
   I doubt that you can see correct margins on screen. What information did you
   get from preview?
6. do you see any significant differences between printing normal sheets 
   and labels? 
7. Please contribute information concerning your PC, OS, 
   Printer driver version!

My suspect is that all the problem can be reduced to wrong default margin settings. Do you agree?
Comment 5 lynj42 2011-05-08 01:26:07 UTC
Created attachment 46441 [details]
L7651 Labels
Comment 6 lynj42 2011-05-08 01:27:19 UTC
Created attachment 46442 [details]
L7651 Format
Comment 7 lynj42 2011-05-08 01:28:05 UTC
Created attachment 46443 [details]
L7160 Labels
Comment 8 lynj42 2011-05-08 01:30:21 UTC
Created attachment 46444 [details]
L7160 Format

To repeat what I said in the original report, these are the same settings which work fine in OpenOffice/Ubuntu 10.10 on the same computer.
Comment 9 lynj42 2011-05-08 01:40:07 UTC
I entered all this before adding the attachments, so if you get it twice that's why. Answers in Upper Case.

I need much more information:
0. Can you please contribute complete dimensions for the labels (margins,
   distance between the labels, ...)
SEE ATTACHMENTS

1. All your paper dimensions and print dimensions settings
SEE ATTACHMENTS

2. Do margin settings differ between normal a4 (or letter?)  and label sheets
STATED IN MY ORIGINAL TEXT. THESE LABELS ARE ONLY A4 ANYWAY.

3. do you see any differences printing a normal sheet and a label sheet?
STATED IN MY ORIGINAL TEXT

4. What do you want to say with "On the screen the labels look OK"?
   I doubt that you can see correct margins on screen. What information did you
   get from preview?
I CAN SEE THE LABELS ARE CORRECTLY ALIGNED, BOTH IN THE WRITER SCREEN & IN THE PRINT PREVIEW. IF THEY WEREN'T THE BOTTOM ROW WOULD BE PARTLY OFF THE PAGE AS IT IS WHEN PRINTED.

6. do you see any significant differences between printing normal sheets 
   and labels? 
STATED IN MY ORIGINAL TEXT

7. Please contribute information concerning your PC, OS, 
   Printer driver version!
STATED IN MY ORIGINAL TEXT. PLEASE READ IT?

My suspect is that all the problem can be reduced to wrong default margin
settings. Do you agree?
NO.
Comment 10 Rainer Bielefeld Retired 2011-05-08 11:06:06 UTC
@lynj42@gmail.com
Much yelling without requested or new information, please try to reduce useless citing and uppercase, it's tiring to read.

Can you please bundle attachments in a zip in future? That will ease keeping overview. 

Can you please confirm that you tried 3.2.2? Your version selected in the picker is different.

1. Misunderstanding! Please contribute relevant information from menu 
   'Format > Page' and if it seems relevant from 
   printer dialog in menu 'Files > Print'

2,3. Misunderstanding! You filed a bug report concerning printing labels, and it would be useful to see whether label printouts show differences to printouts for normal a4 "letters". Until now you did not contribute information, "Letter print works normal" is nothing that can help here.

4. With wrong paper size settings no truncation in print preview does not prove anything. Pls see 1.!

6. Works ok is not really concrete information. I suggest that you draw a little rectangle just touching top and left margin and compare distances to paper border for normal letter print and label print.

7. You selected "Other - All", so I thought you also might have seen the problem with other OS. Additionally your LibO version in the picker differs from the one in your report, so I thought ...

May be we should shift further investigation until next IRC QA session
Comment 11 lynj42 2011-05-08 11:57:09 UTC
(In reply to comment #10)
> @lynj42@gmail.com
> Much yelling without requested or new information, please try to reduce useless
> citing and uppercase, it's tiring to read.
> 
> Can you please bundle attachments in a zip in future? That will ease keeping
> overview. 
> 
> Can you please confirm that you tried 3.2.2? Your version selected in the
> picker is different.
> 
> 1. Misunderstanding! Please contribute relevant information from menu 
>    'Format > Page' and if it seems relevant from 
>    printer dialog in menu 'Files > Print'
> 
> 2,3. Misunderstanding! You filed a bug report concerning printing labels, and
> it would be useful to see whether label printouts show differences to printouts
> for normal a4 "letters". Until now you did not contribute information, "Letter
> print works normal" is nothing that can help here.
> 
> 4. With wrong paper size settings no truncation in print preview does not prove
> anything. Pls see 1.!
> 

> 6. Works ok is not really concrete information. I suggest that you draw a
> little rectangle just touching top and left margin and compare distances to
> paper border for normal letter print and label print.
> 
> 7. You selected "Other - All", so I thought you also might have seen the
> problem with other OS. Additionally your LibO version in the picker differs
> from the one in your report, so I thought ...
> 
> May be we should shift further investigation until next IRC QA session

(In reply to comment #10)
> @lynj42@gmail.com
> Much yelling without requested or new information, please try to reduce useless
> citing and uppercase, it's tiring to read.
> 
> Can you please bundle attachments in a zip in future? That will ease keeping
> overview. 
> 
> Can you please confirm that you tried 3.2.2? Your version selected in the
> picker is different.
> 
> 1. Misunderstanding! Please contribute relevant information from menu 
>    'Format > Page' and if it seems relevant from 
>    printer dialog in menu 'Files > Print'
> 
> 2,3. Misunderstanding! You filed a bug report concerning printing labels, and
> it would be useful to see whether label printouts show differences to printouts
> for normal a4 "letters". Until now you did not contribute information, "Letter
> print works normal" is nothing that can help here.
> 
> 4. With wrong paper size settings no truncation in print preview does not prove
> anything. Pls see 1.!
> 
> 6. Works ok is not really concrete information. I suggest that you draw a
> little rectangle just touching top and left margin and compare distances to
> paper border for normal letter print and label print.
> 
> 7. You selected "Other - All", so I thought you also might have seen the
> problem with other OS. Additionally your LibO version in the picker differs
> from the one in your report, so I thought ...
> 
> May be we should shift further investigation until next IRC QA session

(In reply to comment #10)
> @lynj42@gmail.com
> Much yelling without requested or new information, please try to reduce useless
> citing and uppercase, it's tiring to read.
> 
> Can you please bundle attachments in a zip in future? That will ease keeping
> overview. 
> 
> Can you please confirm that you tried 3.2.2? Your version selected in the
> picker is different.
> 
> 1. Misunderstanding! Please contribute relevant information from menu 
>    'Format > Page' and if it seems relevant from 
>    printer dialog in menu 'Files > Print'
> 
> 2,3. Misunderstanding! You filed a bug report concerning printing labels, and
> it would be useful to see whether label printouts show differences to printouts
> for normal a4 "letters". Until now you did not contribute information, "Letter
> print works normal" is nothing that can help here.
> 
> 4. With wrong paper size settings no truncation in print preview does not prove
> anything. Pls see 1.!
> 
> 6. Works ok is not really concrete information. I suggest that you draw a
> little rectangle just touching top and left margin and compare distances to
> paper border for normal letter print and label print.
> 
> 7. You selected "Other - All", so I thought you also might have seen the
> problem with other OS. Additionally your LibO version in the picker differs
> from the one in your report, so I thought ...
> 
> May be we should shift further investigation until next IRC QA session

Ok Rainer do what you like. I've provided as much information as I can, and the upper case was meant to make it easier to read rather than more difficult, but that seems to have annoyed you also. You can close the bug if you want to, and I will go back to using my previous version of Ubuntu/openOffice.
Comment 12 Rainer Bielefeld Retired 2011-05-08 22:39:50 UTC
Created attachment 46460 [details]
Test kit

I did the test I recommended to reporter and printed documents from test kit "MyA4Page.odt" (simple A4 page) and "My7160.odt" (Labels). In both document prints with HP OJ6110 the little rectangles were exactly at the same and at the calculated position, calculations for bottom right rectangle in "calculations.ods".
So for me everything is as expected, must be something with Linux, reporter's printer or system. I can't contribute anything more here.
Comment 13 Stephen Doonan 2011-05-16 13:57:17 UTC
This is what I have discovered about printing labels in LibreOffice 3.2.2

When a new label document is created, the height and width of the label document are based on the vertical and horizontal pitch of the labels, and the number of columns and rows of labels.

The height and width of the new document do NOT necessarily correspond to the height and width of the paper page they will be printed on: usually the right and bottom margins of a label document are very small. But the top margin and left margin of the label document are correct and appropriate, IF when printed the digital document and physical paper are aligned from the top left corner.

Unfortunately, the document and paper are not aligned from the top left corner, but instead (at least in my case, using Ubuntu 11.04 Linux and LibreOffice 3.2.2 Writer) the document is aligned with the BOTTOM left corner of the physical paper. This alignment effectively moves all the text a little lower on the physical paper (or self-adhesive labels page) than that text appears in the digital form of the document.

To work around this situation, I have chosen: Format--> Page ..., and changed the LibreOffice document page size to exactly match the physical paper or label-page size, and then added an exact and corresponding amount to the bottom margin of the document (on that same Format--> Page window/dialog).

By making the bottom margin correspond to the bottom margin of the paper or labels sheet the text will be printed on, the text is aligned properly during the printing process onto the physical paper/labels-sheet.
Comment 14 Rainer Bielefeld Retired 2011-05-16 22:11:14 UTC
I remember to have had similar problems with some envelopes in the past, it was terrible.

Some printer drivers have an option "rotate 180°", I can't tell whether that might help.
Comment 15 lynj42 2011-05-17 12:42:23 UTC
(In reply to comment #13)
> This is what I have discovered about printing labels in LibreOffice 3.2.2
> 
> When a new label document is created, the height and width of the label
> document are based on the vertical and horizontal pitch of the labels, and the
> number of columns and rows of labels.
> 
> The height and width of the new document do NOT necessarily correspond to the
> height and width of the paper page they will be printed on: usually the right
> and bottom margins of a label document are very small. But the top margin and
> left margin of the label document are correct and appropriate, IF when printed
> the digital document and physical paper are aligned from the top left corner.
> 
> Unfortunately, the document and paper are not aligned from the top left corner,
> but instead (at least in my case, using Ubuntu 11.04 Linux and LibreOffice
> 3.2.2 Writer) the document is aligned with the BOTTOM left corner of the
> physical paper. This alignment effectively moves all the text a little lower on
> the physical paper (or self-adhesive labels page) than that text appears in the
> digital form of the document.
> 
> To work around this situation, I have chosen: Format--> Page ..., and changed
> the LibreOffice document page size to exactly match the physical paper or
> label-page size, and then added an exact and corresponding amount to the bottom
> margin of the document (on that same Format--> Page window/dialog).
> 
> By making the bottom margin correspond to the bottom margin of the paper or
> labels sheet the text will be printed on, the text is aligned properly during
> the printing process onto the physical paper/labels-sheet.

Thanks Stephen. This pointed me in the right direction to what my problem was.
In fact it's probably not really a bug. It's what might be described to customers as a 'feature'.

I read in a partially formatted document and run a macro to add additional data such as the date. The document had been saved with page settings of 'User' which are: Width 20.83, Height 28.65. A4 settings are: Width 21.0, Height 29.7.

Ubuntu 10.10/Openoffice prints labels correctly regardless of which page setting is used. i.e page settings of 'User' or 'A4' yield a correctly aligned A4 sheet of labels???
I copied the same document into Ubuntu11/LibreOffice and that's what caused the problem, until I changed the page setting to A4, which now works fine.

I guess other issues have been raised here which need to be resolved, but my problem isn't one of them. I don't know if this means the bug can be closed, or not?
Comment 16 Winfried Donkers 2011-12-05 00:43:22 UTC
This bug applies to all LibO versions (up to 3.5MASTER) and all O/S and seems to be 'old' OOo-code.

This bug is also reported under 34271, 35104, 35272 (which is marked as DUPL) and 41755. it may be good to mark all these as duplicates of this bug.

Any labels chosen in the createlabel-dialog from manufacturers 'Avery A4', 'Hema A4' or 'Hema A5' produces a document with an incorrcet pageformat (i.e. custom and not A4 resp. A5).

The dimensions in /core/officecfg/registry/data/org/openoffice/Office/Labels.xcu are correct (that is, I checked some and the sum is exactly A4 page width/height).
I tried to find where the document is created (and so where the page format is determined), but I haven't been able to find that code.

With some hints I might be able to help with a patch (when it is an easyhack :) )
Comment 17 Winfried Donkers 2011-12-05 23:00:06 UTC
I think I found the cause of the problem.
The calculation of the page size is incorrect in /core/sw/source/ui/app/applab/cxx.
Am working on a solution and testing it.
Comment 18 Winfried Donkers 2011-12-06 23:25:13 UTC
(In reply to comment #17)
> I think I found the cause of the problem.
> The calculation of the page size is incorrect in
> /core/sw/source/ui/app/applab.cxx.
> Am working on a solution and testing it.

I seem to have fixed the problem, am testing the patch right now and thinking of a neat solution to use standard paper sizes (e.g. A4) when the calculated paper size differs less than 1 mm from the standard paper size.
Comment 19 Winfried Donkers 2011-12-08 23:17:49 UTC
(In reply to comment #18)

A patch has been submitted, which should solve the problem.
Example: Avery A4 L7159
before patch: page size 206.5x284.4mm (<>A4)
after patch: page size 210x297mm (== A4)
similar for lots of other labels.
Comment 21 terra_human 2011-12-26 00:51:01 UTC
*** Bug 34271 has been marked as a duplicate of this bug. ***