Issue 74402 - Incorrect clipping of EMF images in PDF export
Summary: Incorrect clipping of EMF images in PDF export
Status: UNCONFIRMED
Alias: None
Product: Impress
Classification: Application
Component: code (show other issues)
Version: OOo 2.1
Hardware: All All
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-10 12:28 UTC by sergiocallegari
Modified: 2014-10-12 01:32 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
EMF (actually WMF) picture showing the issue (53.50 KB, application/octet-stream)
2007-02-10 12:30 UTC, sergiocallegari
no flags Details
Resulting pdf (38.27 KB, application/pdf)
2007-02-10 13:23 UTC, kpalagin
no flags Details
Original .odp (20.41 KB, application/vnd.oasis.opendocument.presentation)
2007-02-10 13:24 UTC, kpalagin
no flags Details
Additional testcase - imported MATLAB figure (65.41 KB, application/x-compressed)
2007-12-03 09:16 UTC, phil_
no flags Details
Additional testcase - similar behavior for GDI metafile (74.33 KB, application/x-compressed)
2007-12-11 13:36 UTC, phil_
no flags Details
Testcase - SWF export (63.31 KB, application/x-compressed)
2007-12-12 15:17 UTC, phil_
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description sergiocallegari 2007-02-10 12:28:29 UTC
In openoffice 2.1 on Ubuntu linux 6.10 (edgy eft), using the official build of
openoffice, not the ubuntu build.

I have an EMF image image displays fine. Yet when I export to PDF clipped part
of the image do appear.
Comment 1 sergiocallegari 2007-02-10 12:30:35 UTC
Created attachment 42899 [details]
EMF (actually WMF) picture showing the issue
Comment 2 kpalagin 2007-02-10 13:06:16 UTC
Confirming with 2.2 m2 on WinXP - export to PDF produces some graphical 
artefacts. I am attaching resulting .pdf.
Comment 3 kpalagin 2007-02-10 13:23:46 UTC
Created attachment 42900 [details]
Resulting pdf
Comment 4 kpalagin 2007-02-10 13:24:25 UTC
Created attachment 42901 [details]
Original .odp
Comment 5 wolframgarten 2007-02-12 07:59:19 UTC
Reproducible. Reassigned.
Comment 6 Martin Hollmichel 2007-11-09 17:19:15 UTC
set target from 2.x to 3.x according to
http://wiki.services.openoffice.org/wiki/Target_3x
Comment 7 phil_ 2007-12-03 09:16:08 UTC
Created attachment 50058 [details]
Additional testcase - imported MATLAB figure
Comment 8 phil_ 2007-12-03 09:24:07 UTC
Similar behavior occurs when importing figures from MATLAB in .emf format.
In the files that I just attached an import of an .emf file compared to an
import of a .bmp file is made.
Parts of the image are not cropped anymore when exported to PDF.
Also, the fonts are different after exporting to PDF (smaller) and the lines are
distorted. An effect which is also visible in the other testcase.
Is there a need to open a separate issue concerning the distortion of fonts and
lines?
BTW: The effects identically occur in writer when exporting to PDF.
Comment 9 phil_ 2007-12-11 13:36:17 UTC
Created attachment 50226 [details]
Additional testcase - similar behavior for GDI metafile
Comment 10 phil_ 2007-12-11 13:42:10 UTC
I just ran across a similar problem when importing a chart from Excel as GDI
metafile.

The testcase I just attached shows the incorrect behavior:
If the chart image is cropped, the description text remains visible in the
exported PDF file.
If the same spreadsheet is opened with OOo Calc and pasted _as GDI metafile_,
then the problem does _not_ occur when cropping the image.

Also this behavior is identical in OOo writer.
Comment 11 phil_ 2007-12-12 15:15:54 UTC
It's me again.  ;-)

I just ran across a forum posting that seems to be linked to this problem:
http://user.services.openoffice.org/en/forum/viewtopic.php?f=5&t=671

I tested my two test cases (EMF & WMF import) as an export to SWF, again getting
distortions (i.e. moved elements) in the SWF file.

So I think these problems are linked to each other.

Let me know if I should open a separate issue on the SWF export.
Comment 12 phil_ 2007-12-12 15:17:35 UTC
Created attachment 50263 [details]
Testcase - SWF export
Comment 13 phil_ 2007-12-12 15:33:36 UTC
Maybe this is linked to a different issue:
http://www.openoffice.org/issues/show_bug.cgi?id=77128
Comment 14 adrien_cordonnier 2009-06-08 12:23:00 UTC
As it can be seen from the first test case (envelope1), clipping is incorrect
only for the text. The blue line is clipped. I can confirm clipping works with
shapes but not with text (OOo 3.0.1, WinXP).

Print preview and printing to pdfCreator works fine. So the bug is likely to
come from pdf export code.
Comment 15 Armin Le Grand 2013-09-20 08:39:10 UTC
ALG: Just tried with a new draw, insert ellipse, add text, convert to metafile, crop to make the graphic and text be cut. Print and PDF export works. 
Also tried the 1st example in a current trunk version (envelope1), all looks good. I am not sure what this example is about: Shall it be cropped? When you break it you can see that there is text outside the emf frame.
I could not find an error using draw/impress on a AOO400 version, I had added code to clip metafiles when they are cropped some time ago. When still reproducable, please send a step-by-step explanation.
Comment 16 Madhu Koteshwara Manjunath 2014-10-12 01:32:57 UTC
Replicated the Bug under the following Environment and configuration:

Operating System: Windows 8
System Type: 32-bit Operating System
Open Office Version: 4.1.1

Steps and Observations:
1. At first, I created a .odg file using open office drawing and then added some images and drew some shapes like circle added some text.

2. Further I tried to Export the same .odg file as a pdf using the option Export to PDF in Open Office drawing.

3. After saving the pdf, I tried to open the PDF file and there was a cropped image of with only the central part of the drawing and the sides being clipped off.

4. I tried the same scenario, by trying to crop things in the .odg file and then export as pdf. But the pdf only had the central part of the cropped image in the original .odg file.

This bug is very important since Export as PDF is one of the main functionality and is being used by every customer and it needs to be fixed.

The Drawing could only be converted to a pdf manually by using the .odg image and creating a seaprate pdf file as of now since the Export as PDF in Open office drawing does not show the exact drawing in the pdf file. But certainly the Export to PDF is a very important feature and needs to be fixed.