Apache OpenOffice (AOO) Bugzilla – Issue 74402
Incorrect clipping of EMF images in PDF export
Last modified: 2014-10-12 01:32:57 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.
Created attachment 42899 [details] EMF (actually WMF) picture showing the issue
Confirming with 2.2 m2 on WinXP - export to PDF produces some graphical artefacts. I am attaching resulting .pdf.
Created attachment 42900 [details] Resulting pdf
Created attachment 42901 [details] Original .odp
Reproducible. Reassigned.
set target from 2.x to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Created attachment 50058 [details] Additional testcase - imported MATLAB figure
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.
Created attachment 50226 [details] Additional testcase - similar behavior for GDI metafile
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.
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.
Created attachment 50263 [details] Testcase - SWF export
Maybe this is linked to a different issue: http://www.openoffice.org/issues/show_bug.cgi?id=77128
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.
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.
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.