Issue 124609

Summary: Size of EPS export not exact
Product: Draw Reporter: Thorsten Wagner <thorsten.wagner.4>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, elish, hdu, rj.amdphreak
Version: 4.1.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---
Description Flags
Sample drawing
EPS export
Screenshot 1 (AOO 4.0.1)
Screenshot 2 (AOO 4.0.1)
Screenshot 3 (AOO 4.1)
my screenshot 1
EPS Options screenshot
my screenshot 2
Screenshot 4 (AOO 4.1)
Screenshot 5 (AOO 4.1) none

Description Thorsten Wagner 2014-04-05 17:42:44 UTC
When exporting an area to EPS the width and hight of resulting EPS matches not exactly the original.

Steps to reproduce:

(1) Load sample drawing (attached to the ticket)

(2) Select a subset of objects

(3) Export selection to EPS (see attached file "Sample.eps", width 10 cm, height 10 cm)

(4) Import exported EPS image (width 10,01 cm, height 10,06 cm)

Exporting to some other formats, e.g. PNG is working correctly (see attached file "Sample.png").

The problem appears on Mac OS X 10.9.2 with OpenOffice 4.1 revision 1582709 from trunk, but seems to exist in earlier revisions too.
Comment 1 Thorsten Wagner 2014-04-05 17:43:07 UTC
Created attachment 83098 [details]
Sample drawing
Comment 2 Thorsten Wagner 2014-04-05 17:43:23 UTC
Created attachment 83099 [details]
EPS export
Comment 3 Edwin Sharp 2014-04-06 06:42:31 UTC
step 3 - both width and height = 10 cm impossible?
width = 10 cm -> height = 7.5 cm
height = 10 cm -> width = 13.33 cm

AOO410m15(Build:9761)  -  Rev. 1583666
2014-04-01 13:50 - Linux x86_64
Comment 4 Thorsten Wagner 2014-04-07 22:40:31 UTC
Edwin, what information do you need exactly?
Comment 5 Thorsten Wagner 2014-04-07 22:49:13 UTC
Some background information:

(1) I'm trying to create vector graphics images for use in impress presentations. The aim is getting resolution independent slides while avoiding problems when exporting to PowerPoint later.

(2) SVG export does not work (see issues no. 124608 and 124610). EPS export works generally, but with drawbacks described in this ticket.

I attached to screenshots to show the problem in detail:

(1) Screenshot 1 shows a selection of objects. The selection is 10 cm by 10 cm (see red box).

(2) Screenshot 2 shows the imported EPS image. The image is 10,01 cm by 10,06 cm (see red box).

I would expect an image of 10 cm by 10 cm like the original prior to export.
Comment 6 Thorsten Wagner 2014-04-07 23:18:58 UTC
While taking the screenshots I discovered an additional problem related to AOO 4.1, maybe only on Mac OS X:

(1) Size of the selected objects is 10,01 cm by 10,01 cm (see screenhot 3, red box). Prior to saving size was 10,00 cm by 10,00 cm.

(2) With AOO 4.0.1 size is 10,00 cm by 10,00 cm (see screenshot 1, red box).

(3) The problem of imprecise size exists with AOO 4.0.1 to (see screen shot 2, red box).

To sum up it seems that there are two problems:

(1) Imprecises with AOO 4.1 on Mac OS X, maybe rounding problems.

(2) Imprecises when exporting to EPS or importing from EPS not related to AOO 4.1 and not related to Mac OS X (the problem appears on Windows with AOO 4.0.1 too).
Comment 7 Thorsten Wagner 2014-04-07 23:21:51 UTC
Created attachment 83125 [details]
Screenshot 1 (AOO 4.0.1)
Comment 8 Thorsten Wagner 2014-04-07 23:22:21 UTC
Created attachment 83126 [details]
Screenshot 2 (AOO 4.0.1)
Comment 9 Thorsten Wagner 2014-04-07 23:22:50 UTC
Created attachment 83127 [details]
Screenshot 3 (AOO 4.1)
Comment 10 Edwin Sharp 2014-04-08 06:12:38 UTC
Created attachment 83128 [details]
my screenshot 1

User     Width Height
Thorsten 10.00 10.00
Edwin    10.01 10.01

AOO410m14(Build:9760)  -  Rev. 1585331
2014-04-07_04:11:07 - Rev. 1585379
Comment 11 Edwin Sharp 2014-04-08 06:13:53 UTC
Created attachment 83129 [details]
EPS Options screenshot

What are your settings here?
Comment 12 Edwin Sharp 2014-04-08 06:17:54 UTC
Created attachment 83130 [details]
my screenshot 2

User     Width Height
Thorsten 10.02 10.05
Edwin    10.01 10.06
Comment 13 Armin Le Grand 2014-04-08 09:20:50 UTC
Hi Thorsten,

it's good that someone takes a closer look where we are with vector formats, but I need some more infos. What is 'Subset' in the Description, point (2) exactly? This needs to be defined to allow exact reproduction.

I used 'EOA and text' for reproducing now, these have already 10x10 cm. The effect you see happens probably because the objects have not only a fill, but also a line set. Most external formats know no 'hairline' like AOO does that is 0 cm wide; instead these use a small size from which half of that adds to the BoundRect of all shapes.

When the objects are selected in AOO the sizes shown are without line width (makes no difference in this case, the lines are hairlines). To make the effect more present you can use wider lines. I used 0.2cm to check; the UI still shows 10x10 cm (as intended), the eps options dialog suggests 10,20x10,20cm. After reimport I get 10,23x10,23cm.

I switched line off for the EOA objects and repeated the test and I get 10,02x10,02 as size. An eps expert may take a look what exactly the created eps contains, maybe there are also slight rounding errors at im/export (or both) involved.

To answer the question if the  Size of EPS export is not exact (issue title) the content of the eps has to be checked. I am no eps expert (cannot really read it) but ist starts with something like

%%BoundingBox: 0 0 289 289

which would suggest a non-cm and coodinate system. If this means that the coordinates are all expressed as integers in that value range (I saw no floats in the resulting exported file) that small change would not surprise me (and is smaller than I would have feared).

Comment 14 2014-04-08 09:31:31 UTC
(In reply to Armin Le Grand from comment #13)

Thanks for the great explanation on how the line-width influences the exported EPS size!

> %%BoundingBox: 0 0 289 289

AFAIK this measure is in postscript units (i.e. points == 1/72 of an inch). So the BoundingBox above is 10.19527*cm on each axis. which matches very well with the 10.2cm you were expecting. BoundingBox values can only be integers, so such small rounding artifacts cannot be avoided.
Comment 15 Thorsten Wagner 2014-04-08 20:04:27 UTC
Created attachment 83140 [details]
Screenshot 4 (AOO 4.1)
Comment 16 Thorsten Wagner 2014-04-08 20:18:42 UTC
My EPS options are shown on screenshot 4. Furthermore you'll see the following issues:

(1) Sidebar on the right shows 10,01 cm x 10,01 cm.

(2) Statusbar at the bottom shows 10,00 cm x 10,00 cm.

(3) EPS suggestion is 10,00 x 10,00 cm too.

As mentioned in comment 6 this seems to be a rounding issue new in AOO 4.1 and related to Mac OS X only.

I tried exporting a modified selections without border lines and reimported it (see screenshot 5):

(1) Sidebar and statusbar values didn't change after clearing border lines.

(2) After reimport sidebar on the right shows 10,01 cm x 10,01 cm, statusbar at the bottom shows 10,02 cm x 10,02 cm.

The result is not correct without border lines too.
Comment 17 Thorsten Wagner 2014-04-08 20:19:05 UTC
Created attachment 83141 [details]
Screenshot 5 (AOO 4.1)
Comment 18 Edwin Sharp 2014-04-22 10:52:43 UTC
Comment 19 oooforum (fr) 2019-01-29 11:00:03 UTC
*** Issue 128022 has been marked as a duplicate of this issue. ***