Issue 119198 - ERROR Exporting SVG as PDF
Summary: ERROR Exporting SVG as PDF
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0
Hardware: Mac Mac OS X 10
: P3 Major with 2 votes (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-07 00:23 UTC by rk601
Modified: 2013-07-12 16:13 UTC (History)
4 users (show)

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


Attachments
PDF stroke-widths TEST Errors (237.42 KB, application/zip)
2012-04-07 00:23 UTC, rk601
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description rk601 2012-04-07 00:23:35 UTC
Created attachment 77428 [details]
PDF stroke-widths TEST Errors

We are delighted to see progress toward the next release of Apache OpenOffice 3.4.0. However we have found that the Export of SVG as PDF results in errors. The most obvious error is the modified "stroke-width". These errors occur in all types of PDF export (WRITER/DRAW/etc).

As an example, we tested the desired functionality in the Master:

Apache OpenOffice 3.4.0 
Build ID: AOO340m1(Build:9590) - Rev 1309668
On OSX 10.6.8

Steps to reproduce:

1. Locate the desired SVG picture (we used "PDF stroke-widths TEST.svg")
2. Open a new WRITER Text Document
3. Select Insert -> Picture -> From File... (We selected "PDF stroke-widths TEST.svg")
4. Click Open
5. Select File -> Export as PDF...
6. Finish exporting the PDF file.
7. Open the exported PDF file.

Expected results: SVG image within the PDF will display without error.
Actual results: The SVG image has incorrect "stroke-width" errors.

Please Note: Armin Le Grand has informed us that an outdated PDF system is currently used by AOO. With all of the hard-work toward excellent SVG usage in AOO, it is extremely unfortunate that AOO is unable to correctly export SVG.

See attachment for sample documents and screenshots.
Comment 1 Armin Le Grand 2012-05-04 14:58:42 UTC
ALG: Happens as described for the reasons described. Isn't there a bug report for this already (the PDF LineWidth error ?)
Comment 2 vandertim 2012-08-15 12:50:10 UTC
Confirmed on Windows 7!

When will the outdated PDF system be updated? A PDF update will greatly benefit many components of Apache OpenOffice.
Comment 3 SVN Robot 2012-08-15 15:31:49 UTC
"alg" committed SVN revision 1373472 into trunk:
#119198# Added to apply CurrentTransformation in primitive to metafile conver...
Comment 4 Armin Le Grand 2012-08-15 15:36:48 UTC
ALG: Found the problem. Pdf export uses metafiles to export, but for lines not the metafile actions for lines are used, but a structure called SvtGraphicStroke is created, streamed and hidden in a metafile comment action. For this action the line width was not adapted using the current transformation (the stack of transformations for conversion) from the primitive to metafile converter. It was used for creating the usual metafile line actions (which are and need to be created additionally), that's why conversion to metafile worked well for svg graphics.
Added that conversion and the PDF export works well. Still, it should be based on primitives in the future.
Comment 5 binguo 2012-11-14 07:56:26 UTC
Verified on Aoo_Trunk_20121109.1800 rev 1407366, pdf file displays fine, the bug is fixed.
Comment 6 binguo 2012-11-14 08:21:06 UTC
close it.
Comment 7 bteamlab 2013-04-15 17:36:04 UTC
We would appreciate the fix of Mr. Le Grand to be ported to LibreOffice:

https://bugs.freedesktop.org/show_bug.cgi?id=58154
Comment 8 Ariel Constenla-Haile 2013-04-15 19:10:26 UTC
(In reply to comment #7)
> We would appreciate the fix of Mr. Le Grand to be ported to LibreOffice:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=58154

But this is beyond the power of anyone here. Anyway, you can be sure that they will take the code, as they did with the whole implementation done by Armin, see https://blogs.apache.org/OOo/entry/good_news_libreoffice_is_integrating

"One caveat is that the fixes and enhancements I have already done (It's never perfect in the first shot :-)) for this feature in the trunk for AOO 4.0 will be missing eventually because it's not easy for a third person to identify all the relevant changes which are part of this. I did not check that, but I hope it was done in a careful and responsible way (what I assume, they are experienced and trusted OpenSource guys). In the current state it will need watching out for changes and some manual work all the time. I clearly wish this to happen for the users of my feature. Or the other way around - I do not want to be blamed for known and already fixed bugs ;-)"