Bug 113143 - FILESAVE PDF: wrong position of a JPEG image on exported notes page
Summary: FILESAVE PDF: wrong position of a JPEG image on exported notes page
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.2.1.2 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.0.1 target:6.0.5
Keywords: bibisected, bisected, filter:pdf, regression
: 115973 116631 (view as bug list)
Depends on:
Blocks: JPEG-compression-regressions
  Show dependency treegraph
 
Reported: 2017-10-15 20:59 UTC by Mike Kaganski
Modified: 2018-06-27 13:47 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
A slide with an image exported to wrong position on notes view in PDF (98.28 KB, application/vnd.oasis.opendocument.presentation)
2017-10-15 20:59 UTC, Mike Kaganski
Details
A PDF showing the bad result (95.24 KB, application/pdf)
2017-10-15 21:23 UTC, Mike Kaganski
Details
Proposal something (1.13 KB, text/plain)
2018-03-03 19:36 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2017-10-15 20:59:36 UTC
Created attachment 137002 [details]
A slide with an image exported to wrong position on notes view in PDF

The attached presentation contains a single slide with an image which is put to wrong position when exported to PDF with notes exported.

Steps:
1. Open the attachment in Impress
2. File->Export as PDF...
3. Check "Export notes pages" (you may also check "Export only notes pages" to skip the normal slide page) and do "Export"
4. Open resulting PDF and check image position on the notes page

Expected: the image must be at the same position and of the same size (relative to slide shown borders)

Actual: the image is shifted to the right  and bottom, and is larger than originally
Comment 1 Mike Kaganski 2017-10-15 21:23:28 UTC
Created attachment 137005 [details]
A PDF showing the bad result

The attachment shows the slide in two views: a normal (1st page) and notes (2nd page). If you use 100% zoom, it's evident that the image hasn't been scaled to correspond to reduced size of slide on notes page, and possibly the position also wasn't adjusted.
Comment 2 Mike Kaganski 2017-10-16 04:47:10 UTC
Tested with

Version: 5.4.2.2 (x64)
Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL

and

Version: 6.0.0.0.alpha0+ (x64)
Build ID: 71ac6dd8bf10504b94ca5c50ce17db92871c1a4b
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL

and

Version: 5.2.1.2 (x64)
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: ru-RU (ru_RU); Calc: CL

but NOT reproducible with

Version: 5.1.6.2 (x64)
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: ru-RU (ru_RU); Calc: group

Checked using Adobe Acrobat Reader DC 2017 Version 2017.012.20098
Comment 3 Mike Kaganski 2017-10-16 05:42:42 UTC
/cygdrive/d/sources/bibisect-win32-5.2
$ git bisect log
# bad: [86cb9d229718f48f9538032b80037238ea79e8a5] source 78223678b7513ffe46804cb08f2dc5bc899b2bab
# good: [1f670510f08cb800cbae2a1dd6ea70d3542e4721] source 49c2b9808df8a6b197dec666dfc0cda6321a4306
git bisect start 'master' 'oldest'
# bad: [3f9909c4c2ada7a3c705eba0e7ff39f96fb4dcae] source b08e200c3dfa964f257c8b7719ef9c801fb107d7
git bisect bad 3f9909c4c2ada7a3c705eba0e7ff39f96fb4dcae
# good: [73b30cd08e6a8875e5948ffe1f468c343d48d423] source 7cca8d3b3f5a9eda0060342fd2576d08a874b1c3
git bisect good 73b30cd08e6a8875e5948ffe1f468c343d48d423
# bad: [cda2b8a89c6c27851397500a93220d293266e5a2] source 5a5dbb31d559fb8d3cf9831863bea1f215a34f3d
git bisect bad cda2b8a89c6c27851397500a93220d293266e5a2
# good: [a1e3e8938fe8652505bd5b0ae80825f1597d42a4] source 49e1a1a4f5591faaca61559e6492909faf1bc94d
git bisect good a1e3e8938fe8652505bd5b0ae80825f1597d42a4
# good: [e8b95bcc418768655c46ab6dc586bcafe2b3cb22] source 5ec98c76986c1fe004fe10b1a003618d74a2c5d3
git bisect good e8b95bcc418768655c46ab6dc586bcafe2b3cb22
# good: [c3e03cf52fe3831ffd7a7de67a8fc98bdd5aa6e2] source f351e6eaee3bd7ba7bbf4c600fe913887ef677ce
git bisect good c3e03cf52fe3831ffd7a7de67a8fc98bdd5aa6e2
# good: [7c7330961ef17b42298d99f3664aee2f6b599c78] source 3d0a2c8c43179ae0e19be154f44def8bb6cf8de6
git bisect good 7c7330961ef17b42298d99f3664aee2f6b599c78
# bad: [2ecd45a9590452360bf08a18bda1158e5d9fb6a1] source 098c1e495ee87f0674018fd18c77a3a1abef698d
git bisect bad 2ecd45a9590452360bf08a18bda1158e5d9fb6a1
# bad: [42d8322a7ac7039217b863da26e0b5cf20862656] source 805b328858e2d1414e7a9e7701c42a41ede2a617
git bisect bad 42d8322a7ac7039217b863da26e0b5cf20862656
# good: [f7d2b01fa49decdeb252fcea00aa64f625660809] source 4bae5148842115d860b5392b98ff8121b468ac4c
git bisect good f7d2b01fa49decdeb252fcea00aa64f625660809
# bad: [b6c71a779b65f57259262e6ebcc69cdc87a44f5e] source 153bf01280f32c7216bd872665ca81a90fb301fe
git bisect bad b6c71a779b65f57259262e6ebcc69cdc87a44f5e
# good: [1fe0d4859857b7c3086eb863a89a27e5aa4bdca2] source e07ffae5046e9c91ef96026435cab84c3bcb4534
git bisect good 1fe0d4859857b7c3086eb863a89a27e5aa4bdca2
# bad: [9ff0a94931d5aba1e838c680c9604562eb2e71e2] source 76ec54e8c9f3580450bca85236a4f5af0c328588
git bisect bad 9ff0a94931d5aba1e838c680c9604562eb2e71e2
# first bad commit: [9ff0a94931d5aba1e838c680c9604562eb2e71e2] source 76ec54e8c9f3580450bca85236a4f5af0c328588

https://cgit.freedesktop.org/libreoffice/core/commit/?id=76ec54e8c9f3580450bca85236a4f5af0c328588

author	Michael Meeks <michael.meeks@collabora.com>	2016-02-08 14:24:15 (GMT)
committer	Michael Meeks <michael.meeks@collabora.com>	2016-02-09 00:09:08 (GMT)
commit 76ec54e8c9f3580450bca85236a4f5af0c328588
tree 1c4d36e921be16426fc8a61c7a85bdc006e0fafa
parent e07ffae5046e9c91ef96026435cab84c3bcb4534
tdf#97662 - Try to preserve original compressed JPEGs harder.
Avoiding de-compressing and re-compressing them saves lots of time too.
Comment 4 Mohamed 2017-10-16 08:58:46 UTC
The issue is reproduced in the following environment as well:
    • Operating system : Ubuntu 16.04.3 64-bits.
    • LibreOffice :Version: 5.4.2.2
		Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
		CPU threads: 8; OS: Linux 4.4; UI render: default; VCL: gtk2; 
		Locale: ja-JP (ja_JP.UTF-8); Calc: group

However it is working well with:
    • Operating system: CentOS Linux release 7.3.1611 (Core).
    • LibreOffice: Version: 5.0.6.2
                   Build ID: 5.0.6.2-3.el7
                   Locale: ja-JP (ja_JP.UTF-8)
Comment 5 Xisco Faulí 2017-10-16 19:35:25 UTC
Adding Cc: to Michael Meeks
Comment 6 raal 2018-03-03 15:11:48 UTC
*** Bug 115973 has been marked as a duplicate of this bug. ***
Comment 7 Telesto 2018-03-03 19:36:56 UTC
Created attachment 140315 [details]
Proposal something

A clue:
rOutDevData.HasAdequateCompression seems to work correctly with mbGroupIgnoreGDIMtfActions = false;
Comment 8 Buovjaga 2018-04-03 12:02:07 UTC
*** Bug 116631 has been marked as a duplicate of this bug. ***
Comment 9 Commit Notification 2018-05-25 06:46:20 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=89dc667cebfec5315f0c0361e49d759e88458689

tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pages

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-05-27 15:50:44 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9f098d328439a8acece7d871020cf184e0e14930&h=libreoffice-6-1

tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pages

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2018-05-29 20:03:04 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=257014ce03dee29506e8e70c204e912c4ed33172&h=libreoffice-6-0

tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pages

It will be available in 6.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xisco Faulí 2018-05-31 10:17:28 UTC
Verified in

Version: 6.1.0.0.beta1+
Build ID: 2a0d8106a558845357d39648656e08ec6f091cf8
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Miklos, Thanks for fixing this!!