Bug 120941 - Impress: export to SVG results in unnecessarily large file (because of included script)
Summary: Impress: export to SVG results in unnecessarily large file (because of includ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:svg, regression
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2018-10-26 14:20 UTC by Ofir
Modified: 2023-10-09 18:11 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
PPTX with a dashed line (28.79 KB, application/zip)
2018-10-26 14:21 UTC, Ofir
Details
PDF exported from impress (20.42 KB, application/pdf)
2018-10-26 14:21 UTC, Ofir
Details
SVG exported from Impress (725.84 KB, image/svg+xml)
2018-10-26 14:21 UTC, Ofir
Details
PDF exported from PowerPoint 2013 (2.13 KB, application/pdf)
2018-10-26 14:22 UTC, Ofir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ofir 2018-10-26 14:20:32 UTC
Description:
The attached PPTX has a dashed line.
The size of the PDF exported from impress is 21KB, x10 compared to PDF exported from PowerPoint.
When exported to SVG the line is converted to many small path elements and the file size is 726KB.

Steps to Reproduce:
1. Open the attached line.pptx file in Impress
2. Export to PDF and check the file size.
3. Export to SVG and check the file size.

Actual Results:
PDF file size is 21KB.
SVG file size is 726KB.
SVG has many small path elements.

Expected Results:
PDF file size should be 3KB.
SVG file size should be few KBs.
SVG should have a single dashed line element.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Ofir 2018-10-26 14:21:02 UTC
Created attachment 146033 [details]
PPTX with a dashed line
Comment 2 Ofir 2018-10-26 14:21:24 UTC
Created attachment 146034 [details]
PDF exported from impress
Comment 3 Ofir 2018-10-26 14:21:46 UTC
Created attachment 146035 [details]
SVG exported from Impress
Comment 4 Ofir 2018-10-26 14:22:17 UTC
Created attachment 146036 [details]
PDF exported from PowerPoint 2013
Comment 5 Roman Kuznetsov 2018-10-26 21:49:32 UTC
please create different bugs for different problems with PPTX->PDF and PPTX->SVG
Comment 6 Ofir 2018-10-28 22:57:44 UTC Comment hidden (obsolete)
Comment 7 Roman Kuznetsov 2018-11-01 17:55:24 UTC Comment hidden (obsolete)
Comment 8 Ofir 2018-11-01 19:32:37 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2019-05-02 10:05:53 UTC
Let's use this bug to track the SVG problem only

Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: f420aa3e027e04e49b7031ebf0613debcaab2ea0
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

and

Version: 5.4.0.0.alpha1+
Build ID: 9feb7f7039a3b59974cbf266922177e961a52dd1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default; 

the size is 334 kbs...
Comment 10 raal 2019-05-09 21:09:01 UTC
This seems to have begun at the below commit.
Adding Cc: to Marco Cecchetti ; Could you possibly take a look at this one?
Thanks
 ec0e5b057dc3cbbda20e94e608eb7005432d6b68 is the first bad commit
commit ec0e5b057dc3cbbda20e94e608eb7005432d6b68
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Dec 7 10:57:55 2017 +0100

    source 154521777f8c551f10ffbe414891df9d2a529ae3

author	Marco Cecchetti <marco.cecchetti@collabora.com>	2015-12-02 17:57:57 +0100
committer	Andras Timar <andras.timar@collabora.com>	2015-12-09 19:38:19 +0000
commit 154521777f8c551f10ffbe414891df9d2a529ae3 (patch)
tree 873784f7a3d21b698c38eeb015a87508dae80406
parent 689962feae2054f965a7378c3408b0ccfad2bbd5 (diff)
svg export: no more an experimental feature
Comment 11 QA Administrators 2021-05-09 03:50:49 UTC Comment hidden (obsolete)
Comment 12 Roman Kuznetsov 2021-05-21 19:50:32 UTC
471 kb in

Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 58b0c95ad50139a62bddb348d10f94053c09cd5b
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded

so still repro
Comment 13 Rajasekaran Karunanithi 2022-11-23 23:52:04 UTC
Exported into pdf and svg formats,line element was same in both formats. pdf size: 1.56kb and svg size:482kb.So still reproducable in LO 7.4.2.3 under Windows 10(x64).

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ta-IN (en_IN); UI: en-US
Calc: threaded
Comment 14 Stéphane Guillou (stragu) 2023-07-04 22:35:23 UTC
I suppose a solution to avoid multiple paths could be to support stroke-dasharray on SVG export: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray

But in this case, the exported SVG is mainly made up of an ECMAScript from line 161 to line 16704.
This is not specific to PPTX. One can export an ODP file to SVG, the same script will be included.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ec60d354359067f8c5c686ef2239ee705916de43
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded