Bug 157267 - PDF export always seems to be lossless even when selecting JPEG compression
Summary: PDF export always seems to be lossless even when selecting JPEG compression
Status: RESOLVED DUPLICATE of bug 157028
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 23:56 UTC by Murdo Maclachlan
Modified: 2023-09-16 20:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample document with a large lorem ipsum for exporting (69.66 KB, application/vnd.oasis.opendocument.text)
2023-09-16 14:37 UTC, Murdo Maclachlan
Details
PDF export of sample document with JPEG compression, quality 35% (51.64 KB, application/pdf)
2023-09-16 14:38 UTC, Murdo Maclachlan
Details
PDF export of sample document with JPEG compression, quality 35%, and DPI 40 (51.64 KB, application/pdf)
2023-09-16 14:38 UTC, Murdo Maclachlan
Details
PDF export of sample document with lossless compression (51.64 KB, application/pdf)
2023-09-16 14:38 UTC, Murdo Maclachlan
Details
PDF export of sample document with lossless compression and DPI 40 (51.64 KB, application/pdf)
2023-09-16 14:39 UTC, Murdo Maclachlan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Murdo Maclachlan 2023-09-15 23:56:26 UTC
Description:
I just updated to LibreOffice 7.6.1 today having prievously been on 7.5.6. It seems on this version that when exporting to PDF, selecting JPEG compression and or "Reduce image resolution to:" makes no difference. My testing suggests the document is always exported at lossless compression, no matter the settings.

I noticed this as I have a Writer document I regularly export to PDF, and I always have JPEG compresson selected, with quality around 35% (I don't remember the exact number any more, as I changed it when testing). Usually this results in a ~1 MiB PDF, but after I updated to 7.6.1 it went up to 3.1 MiB for my most recent version.

I messed around with different compression qualities and turning "Reduce image resolution" on and off and selecting different values for it, but there was no change in file size. Eventually I siwtched to "Lossless compression" and as I suspected it gave the same file size. As such, I believe this is always being used even when other methods are selected.

I've tested with some other documents of various sizes, as well as testing some Calc documents to make sure it's not just Writer, and can confirm this seems to be happening for all LibreOffice documents. I'm unable to test 7.6.0 as I install LibreOffice from a package manager that doesn't support downgrading.

Steps to Reproduce:
1. Load any document in LibreOffice
2. Export to PDF with lossless compression
3. Export to PDF with various JPEG compression qualities

Actual Results:
File size is always the same (large due to lossless compression)

Expected Results:
File size should be different depending on compression options chosen


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 16; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-GB (en_US.UTF-8); UI: en-US
SlackBuild for 7.6.1 by Eric Hameleers
Calc: threaded
Comment 1 m_a_riosv 2023-09-16 09:39:52 UTC
Please attach a sample file.
Comment 2 Murdo Maclachlan 2023-09-16 14:37:15 UTC
Created attachment 189622 [details]
Sample document with a large lorem ipsum for exporting

I can't share the exact files I discovered this bug with as they are private documents, so here is an example Writer document with a large lorem ipsum as sample text.

As stated in the bug report, the bug happens for every document I have tested with. I will also attach PDFs exported from this document with various settings.
Comment 3 Murdo Maclachlan 2023-09-16 14:38:01 UTC
Created attachment 189623 [details]
PDF export of sample document with JPEG compression, quality 35%
Comment 4 Murdo Maclachlan 2023-09-16 14:38:33 UTC
Created attachment 189624 [details]
PDF export of sample document with JPEG compression, quality 35%, and DPI 40
Comment 5 Murdo Maclachlan 2023-09-16 14:38:49 UTC
Created attachment 189625 [details]
PDF export of sample document with lossless compression
Comment 6 Murdo Maclachlan 2023-09-16 14:39:05 UTC
Created attachment 189626 [details]
PDF export of sample document with lossless compression and DPI 40
Comment 7 m_a_riosv 2023-09-16 19:29:06 UTC
Your file has no images, so the image's compression has nothing to do here.
Seems to me like a duplicate of tdf#157028
Comment 8 Murdo Maclachlan 2023-09-16 20:36:47 UTC
Oh, I didn't notice tagged PDFs were newly automatically enabled on 7.6. Confirmed disabling it results in much more reasonable file size. Thanks.
Comment 9 Murdo Maclachlan 2023-09-16 20:36:59 UTC

*** This bug has been marked as a duplicate of bug 157028 ***