Bug 116904 - UNO: LibreOffice ignores MaxImageResolution
Summary: UNO: LibreOffice ignores MaxImageResolution
Status: RESOLVED DUPLICATE of bug 105954
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.4.5.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2018-04-09 16:58 UTC by julian.steinkellner
Modified: 2018-06-07 09:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
problematic document (331.97 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-04-23 13:13 UTC, julian.steinkellner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description julian.steinkellner 2018-04-09 16:58:15 UTC
Description:
After updating from LibreOffice 5.1.5.2 to 5.4.5.1 docx-files containing a picture with high DPI do not result in smaller pdfs when converting with MaxImageResolution=75 compared to converting with MaxImageResolution=300.

Steps to Reproduce:
1.
Install unoconv from https://github.com/dagwieers/unoconv/blob/master/unoconv
Just this file is needed: https://github.com/dagwieers/unoconv/blob/master/unoconv

2.
Install LibreOffice 5.4.5.1
unoconv -e MaxImageResolution=300 -f pdf docx.docx
stat -c %s docx.pdf
unoconv -e MaxImageResolution=75 -f pdf docx.docx
stat -c %s docx.pdf

3.
Install LibreOffice 5.1.5.2
unoconv -e MaxImageResolution=300 -f pdf docx.docx
stat -c %s docx.pdf
unoconv -e MaxImageResolution=75 -f pdf docx.docx
stat -c %s docx.pdf

Actual Results:  
Point 2: equal file sizes of the pdf after first and second conversion.
Point 3: PDF converted with MaxImageResolution=75 is smaller than the pdf converted with MaxImageResolution=300.

Expected Results:
Second pdf should be smaller due to picture with less DPI in pdf after the second conversion.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Comment 1 Buovjaga 2018-04-18 15:35:59 UTC
(In reply to julian.steinkellner from comment #0)
> Description:
> After updating from LibreOffice 5.1.5.2 to 5.4.5.1 docx-files containing a
> picture with high DPI do not result in smaller pdfs when converting with
> MaxImageResolution=75 compared to converting with MaxImageResolution=300.

Could you try with 6.0.x and master as well? https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/current/

I guess you have to edit the line
extrapaths += glob.glob(os.environ['PROGRAMFILES']+'\\LibreOffice*') + \

to be

extrapaths += glob.glob(os.environ['PROGRAMFILES']+'\\LibreOfficeDev') + \

in order to force it to use the master build.

If it still happens, please attach an example docx file so we can quickly test.

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 2 julian.steinkellner 2018-04-23 13:13:58 UTC
Created attachment 141561 [details]
problematic document

The picture in this document is copyrighted by Universität Innsbruck.
Comment 3 julian.steinkellner 2018-04-23 13:15:11 UTC
I tried converting the DOCX with LibreOffice 6.0.3.2 and with the master.
It was not working with both versions on CentOS.

But I noticed that other images do not lead to this problem.

I attached the problematic DOCX file.
Comment 4 Buovjaga 2018-05-10 14:43:34 UTC
(In reply to julian.steinkellner from comment #0)
> 2.
> Install LibreOffice 5.4.5.1
> unoconv -e MaxImageResolution=300 -f pdf docx.docx
> stat -c %s docx.pdf
> unoconv -e MaxImageResolution=75 -f pdf docx.docx
> stat -c %s docx.pdf

Reproduced.

Arch Linux 64-bit
Version: 6.0.3.2
Build ID: 6.0.3-1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 5 Buovjaga 2018-06-06 17:48:07 UTC
I should have tested this before bibisecting, but at least now we know what this was about and what fixed it. Closing thus as duplicate of bug 105954.

Julian: please test with 6.1 beta version or 6.0.5 to see the fix.

*** This bug has been marked as a duplicate of bug 105954 ***
Comment 6 julian.steinkellner 2018-06-07 09:19:20 UTC
I tested it with version 6.1 beta and 6.0.5. It seems to be fixed in both versions.
Thank you.