Bug 62806 - serious scaling issue exporting WMFs to PDF
Summary: serious scaling issue exporting WMFs to PDF
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.0.1.1 rc
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2013-03-27 11:03 UTC by Michael Meeks
Modified: 2017-08-13 13:02 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF embedded in the second attachment (49.50 KB, image/x-emf)
2013-03-27 19:00 UTC, Michael Meeks
Details
document created by the same procedure, but seems OK and prints fine (25.50 KB, application/msword)
2013-03-28 12:12 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2013-03-27 11:03:29 UTC
Load this document (from bug#38619) - the charts on page 9 end up with some (massive) scaling issue - the clipping region luckily works well, but the text and objects inside the WMF are the wrong size.

https://bugs.freedesktop.org/attachment.cgi?id=49034

The same issue appears to be a problem for:

https://bugs.freedesktop.org/attachment.cgi?id=76865
Comment 1 Michael Meeks 2013-03-27 19:00:32 UTC
Created attachment 77121 [details]
EMF embedded in the second attachment
Comment 2 Michael Meeks 2013-03-27 19:40:37 UTC
Timur - how did you generate the 2nd attachment here ? :-)

I just fixed bug#62834 - and would -love- to create an automated regression / unit test for this.

Unfortunately, that document is a bit big to check into git - I'll also need another one for the scaling issue that is identified there.

Any chance of a small document - preferably a table inside an EMF with two entries: "Hello" and "World" (or something) that exhibits the same bug#62834 - so that I can write a unit test harness for this sort of thing.

I've tried generating that with LibreOffice, but everything works - so it must be related to the unusual structure of the meta-file :-)

Thanks !
Comment 3 Timur 2013-03-27 20:21:12 UTC
(In reply to comment #2)
I don't know, I received it. What I know, it's source is Oracle database, but I don't know whether it's an export or just some printscreen. I asked the author, hopefully he will reply.
Comment 4 Timur 2013-03-28 12:12:33 UTC
Created attachment 77152 [details]
document created by the same procedure, but seems OK and prints fine

The explanation is: table from Excel is pasted in Word, with Paste Special..as Picture (EMF), maybe resized after that.
Attached document is created by the same procedure, but it seems OK. 
So, we stay we the original document, which is 30KB.
Comment 5 Timur 2013-05-09 08:50:08 UTC
I'd like to put this in MAB 4.0 unless someone objects?
Comment 6 Michael Meeks 2013-05-09 09:27:16 UTC
sounds reasonable to me.
Comment 7 Michael Meeks 2013-06-11 16:34:15 UTC
This is fixed in master - it may well be down to:

commit c47f0903fe0fb2f743d179d1ac9a2dcdfb19af10
Author: Radek Doulik <rodo@novell.com>
Date:   Mon Apr 29 00:00:00 2013 +0200

    Fix bnc#795857 Use correct sizes for EMF+ bitmap rendering
    
    Fix pdf export wrong size issues for embedded EMF+ images.

I'm looking at back-porting that fix back to -4-1 - just doing a test build.
Comment 8 Timur 2013-06-12 07:05:20 UTC
Good news. Will it be in 4.0.4.2?

Although this discussion doesn't belong here, this is the first time I noticed that there are also bnc, i, lp, rhbz apart from fdo in fixed bugs. It's really interesting, I haven't seen it explained somewhere.
Comment 9 Michael Meeks 2013-06-12 09:04:14 UTC
> Good news. Will it be in 4.0.4.2?

If that's in tripple review mode now, I suspect not - that's a lot of resource to ask.

> Although this discussion doesn't belong here, this is the first time I
> noticed that there are also bnc, i, lp, rhbz apart from fdo in fixed
> bugs. It's really interesting, I haven't seen it explained somewhere.

These are all abbreviations; bugzilla.novell.com, redhat bugzilla, issues (from OO) and FreeDesktop.org etc. :-)
Comment 10 Timur 2013-07-03 10:07:25 UTC
Will this be backported to 4.x? There is no target now. Thank you.
Comment 11 Michael Meeks 2013-07-03 10:48:56 UTC
Sure it is in 4.0 - should be in 4.0.5 - but play with a snapshot I guess :-)
Comment 12 Timur 2013-08-19 07:49:52 UTC
This is not in the list for 4.0.5.1 and also not in 4.0.5.2 (which doesn't seems complete).