Apache OpenOffice (AOO) Bugzilla – Issue 96708
PDF export for image fails
Last modified: 2009-02-17 08:30:06 UTC
I checked with "Ooo 3.1 Multilingual version German UI WIN XP: [DEV300m36 (Build 9369)]" and found a.m. problem. Steps to reproduce: 1. open "test13.odg" 2. Menu "File -> Export to PDF", settings: Card General: All pages, jpg 85% 300 dpi, General completely unchecked Card Start Display: Only page / Standard / Standard 3. Export expected: PDF looks like .odg actual: blue arrow image is missing I have lots of documents with scanned tiff-images sometimes exceeding the page boundaries for few mm, so this is a big problem for me Works fine with 3.0
Created attachment 58383 [details] sample document
Created attachment 58384 [details] CORRECT sample file
And even worse: if you cut away parts of the picture, it will look as if all of the picture is within the page boundaries, but OOo will not export it. Steps to reproduce: 1. Open attached "test12.odg" 2. Click on blue arrow image 3. Right click / context menu "crop image" crop away 6mm all around, now it looks as if all of the image should be within page (no control point out of page area) 4. click somewhere into empty area of the image 5. Export to PDF 7. Open with AR Expected: blue arrow image visible in PDF export Actual: not visible That problem makes 3.1 completely unusable for me
not reproducible on macosx, will try on windows
reprocucible on Windows
pl->aw: it seems the image never reaches the PDF export filter, thanks for looking into this. Adding regression keyword (worked in 3.0). Set target to 3.1. Adjusted title, the problem also shows up when the image is not bigger than the page.
Created attachment 59328 [details] simplified test case
AW: Looks like a problem in VclProcessor2D::RenderBitmapPrimitive2D. When the object is sheared (like the one here), RenderBitmapPrimitive2D_self is used. Old versions like DrawBitmapEx(...) or GraphicObject.Draw(...) do not support shearing, that's the reason. In RenderBitmapPrimitive2D_self the transformed graphic is painted using DrawBitmapEx, but with deactivated MapMode. I guess this needs to be done with MapMode when a Metafile is recorded (as is the case here). Getting VCL to debug into it...
AW: I have added support for size reduction and metafile recording to RenderBitmapPrimitive2D_self, but still the graphic is missing in the pdf file. Need to ask PL about that.
AW: PL leaded me to the filter project where in pdfexport.cxx the export can be followed. A scaled BitmapEx action is part of the export, so there must be some error still in RenderBitmapPrimitive2D_self. Indeed, found. The size reduction ignored the reduction of original size. Also adapted reduction maximum to be based o the original's bitmap size, multiplied by sqrt(2.0) to have no quality loss with 45 degree (the maximum expansion when rotating the bitmap) rotations. Checked, works as expected. Checking in. Done.
AW->WG: Please verify. Using the reduced BugDoc (test12.odg) is simplest test.
Verified in CWS.
Tested in OOO310_m1. Closed.