Issue 105441 - Export to PDF does not handle cropped graphics correctly
Summary: Export to PDF does not handle cropped graphics correctly
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: save-export (show other issues)
Version: OOO310m9
Hardware: Unknown Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needhelp, oooqa
: 113547 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-09-29 09:53 UTC by oharboe
Modified: 2017-05-20 10:35 UTC (History)
4 users (show)

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


Attachments
Try exporting this presentation (35.15 KB, application/vnd.oasis.opendocument.presentation)
2009-09-29 09:55 UTC, oharboe
no flags Details
Shows broken export, see logo at bottom left (66.20 KB, application/pdf)
2009-09-29 12:39 UTC, oharboe
no flags Details
zylin bluebar stripped to the bare minimum and logo inserted from archive. All done with OOO310m21 (31.81 KB, application/vnd.sun.xml.impress)
2009-09-30 07:00 UTC, sibaweg
no flags Details
Another test case (although windows/impress) where export to PDF doesn't respect cropping (91.78 KB, application/vnd.oasis.opendocument.presentation)
2009-10-06 06:20 UTC, tictactow
no flags Details
Correct Result of exporting file to pdf (20.89 KB, application/pdf)
2009-10-06 18:14 UTC, tictactow
no flags Details
Whoops, previous file was the correct version (using Microsoft PDF Export), this is the incorrect OO output (51.98 KB, application/pdf)
2009-10-06 18:18 UTC, tictactow
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description oharboe 2009-09-29 09:53:43 UTC
Export the attached .odp file and see logo at the bottom: it's not cropped
correctly.
Comment 1 oharboe 2009-09-29 09:55:25 UTC
Created attachment 65031 [details]
Try exporting this presentation
Comment 2 oharboe 2009-09-29 12:39:34 UTC
Created attachment 65032 [details]
Shows broken export, see logo at bottom left
Comment 3 Rainer Bielefeld 2009-09-29 12:57:39 UTC
I checked with "Ooo 3.1.1 WIN XP DE-multilingual version German UI activated
[OOO310m19 (Build 9420)]" and can confirm the reported effect for "zylin
electronics introduction.odp" and my own PDF export: There is a dark blue
horizontal bar under the "ZYLIN" logo in the pdf export, what should be cropped

I can not reproduce that with an own image and my own new presentation. I
created a smiley.png and inserted it into a new presentation. On Master page and
normal page I have each 4 copies of the smiley, one cropped left, one cropped
right, one at the top and one at the bottom.  All 8 cropped smileys are shown
correctly in a PDF export.
Even when I copy / paste the logo to my won test presentation, every thing will
look correctly in the PDF export.

@oharboe_
We need a step by step instruction (containing every keyy press and every mouse
click) how to reproduce that problem with a new document. 

@sibaweg:
May be you can do additional tests and contribute additional information?
Comment 4 oharboe 2009-09-29 13:22:50 UTC
>@oharboe_
>We need a step by step instruction (containing every keyy press and 
>every mouse click) how to reproduce that problem with a new document. 

I'm afraid it will be very hard to help you on that one. 

The odp file was created in PowerPoint and converted to odp 
afterwards by an external graphics artist....
Comment 5 Rainer Bielefeld 2009-09-29 16:20:37 UTC
Under these circumstances I doubt that a fix is possible, but may be, a
developer will find something  for what a fix will be of general interest.
Comment 6 sibaweg 2009-09-30 06:58:30 UTC
It seems odp gets the parameters of the PNG image with zylin logo incorrect:

* Stripping the presentation to the bare minimum (zylin logo and gray bar in
background) still shows the effect.

* Looking at the .png under Pictures shows a full zylin logo WITH a blue bar
beneath.

* Importing this image into odp shows it correctly.

* The pdf export reacts critically to the grey background bar. The blue bar
under the original zylin disappears if the grey backroung bar does not touch the
right margin. 

* Manipulating the image with Gimp is and re-creating odp garbles the original
image in odp AND in the pdf
Comment 7 sibaweg 2009-09-30 07:00:53 UTC
Created attachment 65048 [details]
zylin bluebar stripped to the bare minimum and logo inserted from archive. All done with OOO310m21
Comment 8 tictactow 2009-10-06 06:20:17 UTC
Created attachment 65152 [details]
Another test case (although windows/impress) where export to PDF doesn't respect cropping
Comment 9 tictactow 2009-10-06 18:12:34 UTC
Have made several attempts to create a pdf of my most recent testcase (i.e., 
Christian_Fab_Ad-v2.odp), including using the most recent OO developer snapshot.

All non-pdf exporting works perfectly (e.g., jpeg, bmp, ppt), but pdf ends up 
*rescaling* the image instead of cropping it, resulting in the entire graphic 
being visible.

I've attached what my jpeg and pdf exports look like for comparison.

Managed to get what I needed by exporting to powerpoint and using powerpoint to 
export to pdf, but who wants to do that regularly?

Any suggestions appreciated.

And yes, if you need a personal trainer in Toronto, let my friend know.  lol
Comment 10 tictactow 2009-10-06 18:14:03 UTC
Created attachment 65188 [details]
Correct Result of exporting file to pdf
Comment 11 tictactow 2009-10-06 18:18:39 UTC
Created attachment 65189 [details]
Whoops, previous file was the correct version (using Microsoft PDF Export), this is the incorrect OO output
Comment 12 wolframgarten 2009-10-07 12:05:37 UTC
Reproducible with m60 on linux. Reassigned.
Comment 13 Armin Le Grand 2010-04-20 16:44:51 UTC
AW: Due to #i106516# i checked this one and it does not happen at all with
DEV300m76, thus seems to be fixed already.
Comment 14 michael.ruess 2010-07-30 14:06:02 UTC
*** Issue 113547 has been marked as a duplicate of this issue. ***
Comment 15 fossatig 2010-09-02 21:48:18 UTC
I am surprised by how little I could find online about this issue, which is
pretty serious.

What happens is that Impress when exporting to PDF (and it does not matter if
it's done with "export to PDF" or "export directly to PDF" or "export (then
selecting PDF) instead of respecting the image cropping done within impress
itself exports the images scaled but full.
Very bad.  
It does not seem to matter whether or not the image was originally cropped by
another (older) version of OO.
If I crop the image in Gimp (e.g.), then of course it behaves fine... that's not
surprising given that the image will just be that way.

I see it on RHEL 5.x and ubuntu 9.10 
In both I am running OpenOffice 3.1.1 OOO310m9 (9420) (as it ships with the distros)

I see the problem on jpg images.  Not tested png or other formats.
Is there a workaround (other than recropping with gimp)?
It would not seem so judging from this thread.
Comment 16 fossatig 2010-09-06 07:34:05 UTC
Hello, after some experimentation, that included wiping away my .openoffice.org
directory to play it safe, I seem to have reached the conclusion that the
problem of loss-of-cropping-when-exporting-to-PDF goes away if I select 'jpg
compression' instead of 'lossless'.
I do not understand this, and I am sure that this has not been a problem in the
past, because I have been using the 'lossless compression' option for a very
long time.  So, something must have changed in OOO to cause this behavior.
For the time being it seems that I will use 'jpeg compression' and spare myself
more waste of time.

For completeness, could anybody confirm that they experience or not the problem
depending on the choice of compression for images when exporting to PDF?
Thanks.

G
Comment 17 gleppert 2011-03-23 18:07:24 UTC
Hi, this issue seems to be the same as here: https://bugs.freedesktop.org/show_bug.cgi?id=33656

And, I also confirm that this issue is still valid in OOo and LO
Comment 18 Rainer Bielefeld 2014-06-05 17:04:15 UTC
Reproduced problems today with OOo 3.1.1

but

No longer reproducible with "AOO 4.2.0-Dev – German UI / German locale [AOO420m1(Build:9800)  -  Rev. 1599676  2014-06-04]" on German WIN7 Home Premium (64bit)", “historic” 4. User Profile used for all predecessor versions

If there still are problems with pdf export of cropped pictures please submit new issues for each problem.