Bug 57574 - PRINTING: symmetric margins produce asymmetric result
Summary: PRINTING: symmetric margins produce asymmetric result
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export Print
  Show dependency treegraph
 
Reported: 2012-11-26 20:17 UTC by csongor
Modified: 2020-09-03 13:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
small page document with a symmetrical table (1.48 KB, application/pdf)
2012-11-26 20:17 UTC, csongor
Details
the odt version containing symmetric table, this produces the asymmetric table of pdf (8.95 KB, application/vnd.oasis.opendocument.text)
2012-11-26 20:19 UTC, csongor
Details
small page PDF document with a non-symmetrical table (1.48 KB, application/pdf)
2012-11-26 20:21 UTC, csongor
Details
screenshot that illustrates the asymmetry in pdf (52.48 KB, image/png)
2012-11-26 20:24 UTC, csongor
Details
original LO document (8.00 KB, application/vnd.oasis.opendocument.text)
2014-07-09 10:33 UTC, csongor
Details
PDF document exported by LO (1.21 KB, application/pdf)
2014-07-09 10:33 UTC, csongor
Details
screenshot of a PDF viewer as it displays the PDF (62.16 KB, image/png)
2014-07-09 10:34 UTC, csongor
Details
illustration in LO5.0.4 (8.60 KB, application/vnd.oasis.opendocument.text)
2015-12-20 23:31 UTC, csongor
Details
illustration in LO5.0.4 - pdf (1.20 KB, application/pdf)
2015-12-20 23:31 UTC, csongor
Details
illustration in LO5.0.4 - png screenshot (55.14 KB, image/png)
2015-12-20 23:32 UTC, csongor
Details
Original ODT, exported PDF and two screenshots. Created with LO 5.2.4.2 (228.44 KB, application/zip)
2017-01-04 03:13 UTC, csongor
Details
screenshot that illustrates almost perfect left and right margins (101.49 KB, image/png)
2020-09-03 13:40 UTC, csongor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description csongor 2012-11-26 20:17:23 UTC
Created attachment 70614 [details]
small page document with a symmetrical table

I put a table with a single cell into a new document. I set it to be aligned to the centre and I define symmetric margins on the page. I suppose the table should be centred on the page. In contrary, it is shifted a bit left. 

To illustrate this I created a funny document. Page size is 0.7cm both horizontally and vertically. Margins are 0.1cm whole around. I attach the odt document and the exported pdf as well. The reason for so small document is the visualisation of the asymmetry via zoomed view of the whole document. 

Therefore I attach a screenshot of the pdf viewer as well. 

I indicated by red symbols that the two margins are not symmetrical. 

I think under the detailed circumstances the pdf file should be symmetrical.
Comment 1 csongor 2012-11-26 20:19:31 UTC
Created attachment 70615 [details]
the odt version containing symmetric table, this produces the asymmetric table of pdf
Comment 2 csongor 2012-11-26 20:21:12 UTC
Created attachment 70616 [details]
small page PDF document with a non-symmetrical table
Comment 3 csongor 2012-11-26 20:24:57 UTC
Created attachment 70617 [details]
screenshot that illustrates the asymmetry in pdf
Comment 4 csongor 2012-11-26 20:33:16 UTC
Such asymmetry occurs for A4-sized page too. I used 70x70 page size instead of 297x210 in order to visualise the whole page in one screenshot. It would have been much more difficult to use A4 sized page with this zoom level in the pdf viewer. 

The measure of asymmetry seems to be insignificant but if I print two symmetric tables on two sides of a sheet then corresponding table lines from the opposite side should coincide with each other. Unfortunately they do not, so if I slice the sheet according to the lines of one side then the lines of the opposite side will remain visible.
Comment 5 A (Andy) 2013-12-29 11:53:19 UTC
Sorry that you had to wait such a long time for a reply.

With the naked eye I could not recognize any asymmetries (LO 4.1.4.2, Win8). Does this issue still persist for you with the latest release of LO? How did you measure your recognized shift?
Comment 6 QA Administrators 2014-07-08 17:29:03 UTC Comment hidden (obsolete)
Comment 7 csongor 2014-07-09 10:32:34 UTC
Hi, sorry for not responding for so long and thank you for the reminder. 

The newest version I have is 4.1.4.2. It still produces the symptom. However, this version is able to create smaller page which is better for this illustration. I created the three attachments. The first is the original ODT document, the second one is the PDF which was exported by LO. The third one is the PNG screenshot about the Foxit PDF Raader as it shows the PDF document. It is easy to see on the latter one that the left and upper border are more thin than the other two borders. 

Obviously, nobody prints a page in 45x45 millimetre size with 0.1 mm border. This is just for illustration. 

Originally I realised it with an A4 size page where the difference is bigger. I printed two opposite sides of the same sheet. If the margin width is the same on the left and right side then the lines should cover each other. I was wonder if my printer's mechanical characteristics is responsible for the misalignment between the two sides of the page or the printed documents differ. Surprisingly, it turned out that the pdf version of a LO document having symmetric margins is not symmetric.
Comment 8 csongor 2014-07-09 10:33:29 UTC
Created attachment 102477 [details]
original LO document
Comment 9 csongor 2014-07-09 10:33:58 UTC
Created attachment 102478 [details]
PDF document exported by LO
Comment 10 csongor 2014-07-09 10:34:37 UTC
Created attachment 102479 [details]
screenshot of a PDF viewer as it displays the PDF
Comment 11 Buovjaga 2014-11-25 09:14:04 UTC
I reproduced. Changed component to Printing and PDF export, because the document is ok when viewed in Writer.

Win 7 64-bit Version: 4.5.0.0.alpha0+
Build ID: 772befa08f02b08da1ab493896a0744bc73781c7
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-11-23_22:39:02
Comment 12 QA Administrators 2015-12-20 16:07:54 UTC Comment hidden (obsolete)
Comment 13 csongor 2015-12-20 23:28:59 UTC
I tested it on the following version right now:
Version: 5.0.4.2
Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78
Locale: hu-HU (hu_HU)

The symptom is still there, however, some numbers have been changed. The page size is 4.5cm x 4.5cm. For some reason it is not possible to create smaller pages any more. (Why?...)

I attach the new 
- odt, 
- its pdf version exported from LO and
- png screenshot of the pdf file, viewed in Foxit PDF Viewer

I applied the Print Screen on the pdf viewer, pasted the screenshot in Gimp and then re-coloured the border to be red. After that, I measured the width of the red area in all the four sides. As you can see, it is still asymmetric.
Comment 14 csongor 2015-12-20 23:31:28 UTC
Created attachment 121457 [details]
illustration in LO5.0.4
Comment 15 csongor 2015-12-20 23:31:55 UTC
Created attachment 121458 [details]
illustration in LO5.0.4 - pdf
Comment 16 csongor 2015-12-20 23:32:20 UTC
Created attachment 121459 [details]
illustration in LO5.0.4 - png screenshot
Comment 17 QA Administrators 2017-01-03 19:55:14 UTC Comment hidden (obsolete)
Comment 18 csongor 2017-01-04 03:11:07 UTC
I installed the newest LO and tested. The bug is still present, the margins are asymmetric, however they are asymmetric in a different way in LO than they are in PDF. In LO the left margin looks wider while in PDF the right margin is.

I did the followings:
- created a document with the smallest possible page size
- added a 1x1 table to it
- exported it to a pdf file
- captured a screenshot from LO
- captured a screenshot from the pdf viewer
- packed the following files into a zip:
  - the original ODT
  - the exported PDF
  - PNG of the LO screenshot
  - PNG of the PDF viewer screenshot (called Preview in MacOS) 
- attached the ZIP to this comment. 

(I created a ZIP because this ticket would have too many attachments and this gives some structure to the mass of files.)
Comment 19 csongor 2017-01-04 03:13:23 UTC
Created attachment 130131 [details]
Original ODT, exported PDF and two screenshots. Created with LO 5.2.4.2
Comment 20 QA Administrators 2018-01-05 03:41:00 UTC Comment hidden (obsolete)
Comment 21 QA Administrators 2020-08-26 03:59:02 UTC Comment hidden (obsolete)
Comment 22 csongor 2020-09-03 13:40:29 UTC
Created attachment 165094 [details]
screenshot that illustrates almost perfect left and right margins

I made a test with the newest LO and the result is much better now. 

Originally the margins were 249 versus 240 pixels which is 3.75% difference. (See the first screenshot described as "screenshot that illustrates the asymmetry in pdf".)

Now it is 192 versus 189, which is just 1.6%, less than half of the original value. (See the newest screenshot described as "screenshot that illustrates almost perfect left and right margins")

Not perfect yet but I think it is acceptable. 

Ideally, the top margin also should have the same size in the pdf/png as the left and right margins because they are set identically in the LO document. However, this asymmetry is already ruined in LO where the top and bottom margins beyond the black borders are already different, despite being defined by the same value. This would be another ticket once it becomes important. From the perspective of this ticket, I think the current behaviour is acceptable so I change the ticket accordingly

LO version details: 
Version: 7.0.1.2 (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 12; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: en-AU (en_AU); UI: en-GB
Calc: threaded