Issue 96708 - PDF export for image fails
Summary: PDF export for image fails
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: DEV300m36
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: OOo 3.1
Assignee: wolframgarten
QA Contact: issues@gsl
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2008-11-29 14:55 UTC by Rainer Bielefeld
Modified: 2009-02-17 08:30 UTC (History)
1 user (show)

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


Attachments
sample document (65.16 KB, application/vnd.oasis.opendocument.graphics)
2008-11-29 14:57 UTC, Rainer Bielefeld
no flags Details
CORRECT sample file (124.53 KB, application/vnd.oasis.opendocument.graphics)
2008-11-29 15:16 UTC, Rainer Bielefeld
no flags Details
simplified test case (68.11 KB, application/vnd.oasis.opendocument.graphics)
2009-01-12 14:37 UTC, philipp.lohmann
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2008-11-29 14:55:56 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
Comment 1 Rainer Bielefeld 2008-11-29 14:57:53 UTC
Created attachment 58383 [details]
sample document
Comment 2 Rainer Bielefeld 2008-11-29 15:16:34 UTC
Created attachment 58384 [details]
CORRECT sample file
Comment 3 Rainer Bielefeld 2008-11-29 15:42:48 UTC
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
Comment 4 philipp.lohmann 2008-12-01 14:38:56 UTC
not reproducible on macosx, will try on windows
Comment 5 philipp.lohmann 2009-01-09 12:36:17 UTC
reprocucible on Windows
Comment 6 philipp.lohmann 2009-01-12 14:36:28 UTC
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.
Comment 7 philipp.lohmann 2009-01-12 14:38:00 UTC
Created attachment 59328 [details]
simplified test case
Comment 8 Armin Le Grand 2009-01-13 12:23:08 UTC
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...
Comment 9 Armin Le Grand 2009-01-13 14:17:14 UTC
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.
Comment 10 Armin Le Grand 2009-01-13 15:21:18 UTC
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.
Comment 11 Armin Le Grand 2009-01-20 12:50:15 UTC
AW->WG: Please verify. Using the reduced BugDoc (test12.odg) is simplest test.
Comment 12 wolframgarten 2009-01-20 13:51:31 UTC
Verified in CWS.
Comment 13 wolframgarten 2009-02-17 08:30:06 UTC
Tested in OOO310_m1. Closed.