Bug 140963 - SVG in Writer leads to huge and slow-rendering PDF export
Summary: SVG in Writer leads to huge and slow-rendering PDF export
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf, filter:svg
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2021-03-11 21:33 UTC by Robert
Modified: 2021-03-12 22:06 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Libreoffice PDF export that demonstrates the increase in size and slow performance (13.04 MB, application/pdf)
2021-03-11 21:33 UTC, Robert
Details
Original Writer file that embeds the SVG (210.67 KB, application/vnd.oasis.opendocument.text)
2021-03-11 21:34 UTC, Robert
Details
SVG file used for the PDF export test (376.92 KB, image/svg+xml)
2021-03-11 21:36 UTC, Robert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert 2021-03-11 21:33:59 UTC
Created attachment 170417 [details]
Libreoffice PDF export that demonstrates the increase in size and slow performance

Dear all,

I try to promote within my workplace the use of free software including LibreOffice.

I noticed that if I embed an SVG logos of 400 KiB in an otherwise empty ODT and export this to a PDF, than the PDF has 13MB and many PDF readers (if not all) suffer from huge performance issues in rendering the PDF. I have tried the following PDF readers:

1. Okular (KDE Linux)
2. Acrobat Reader (Windows)
3. Firefox (Linux, I can literally see the individually steps of the logo painting)


I would instead expect that the PDF is under 1MB and loads as fast as a PDF file stemming from the Inkscape SVG to PDF export.

I assume that the SVG logo uses some features (like gradients) that the LibreOffice export does not handle efficiently.
Comment 1 Robert 2021-03-11 21:34:58 UTC
Created attachment 170418 [details]
Original Writer file that embeds the SVG
Comment 2 Robert 2021-03-11 21:36:30 UTC
Created attachment 170419 [details]
SVG file used for the PDF export test
Comment 3 Roman Kuznetsov 2021-03-12 19:44:22 UTC
Confirm a big PDF size in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9d8accf03984a64a4105826e55b221962628eb93
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

But when I opened that result PDF in Firefox I saw some drawing of symbols in logo and then scrolling was too fast

Export ODT to PDF from LO 5.2 gave me 6 mb PDF file
Comment 4 Robert 2021-03-12 22:06:25 UTC
I have exported the same odt file to pdf using:

LibreOffice 6.0.4.2 (x64)
CPU threads: 8; OS: Windows 10.0; UI render: default;
locale: en-GB (en_GB); Calc: group

Also here, the pdf is about 6mb (6.774KB). I have opened the pdf in Acrobat reader and the initial rendering of the logo takes several seconds.