Bug 91437 - Aspect ratio for cropped images gets messed up when exporting to PDF
Summary: Aspect ratio for cropped images gets messed up when exporting to PDF
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2015-05-21 17:25 UTC by Jeff Fortin Tam
Modified: 2016-10-06 12:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (291.29 KB, application/vnd.oasis.opendocument.text)
2015-05-21 17:25 UTC, Jeff Fortin Tam
Details
screenshot (824.48 KB, image/png)
2015-05-21 17:26 UTC, Jeff Fortin Tam
Details
sample (287.58 KB, application/vnd.oasis.opendocument.text)
2015-05-21 21:56 UTC, Jeff Fortin Tam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Fortin Tam 2015-05-21 17:25:40 UTC
Created attachment 115780 [details]
sample

In version 4.4.3, exporting to PDF a document containing a cropped image yields a stretched image in the resulting PDF. LibreOffice 4.2 does not exhibit this issue.

See attached sample file and screenshot.
Comment 1 Jeff Fortin Tam 2015-05-21 17:26:23 UTC
Created attachment 115781 [details]
screenshot

Note that this issue occurs when you use the direct PDF export feature, but it does NOT occur when you use the "print to file" feature.
Comment 2 Jeff Fortin Tam 2015-05-21 19:29:10 UTC
FWIW, version 4.3.7.2 is not affected.
Comment 3 Michael 2015-05-21 19:50:45 UTC
Can you give the exact steps to reproduce?
Comment 4 Jeff Fortin Tam 2015-05-21 21:50:06 UTC
Simply open the attached sample document, press the PDF export button in the main toolbar (or from the File menu) and you look at the resulting PDF with a squashed image compared to what you see in Writer.
Comment 5 Jeff Fortin Tam 2015-05-21 21:56:53 UTC
Created attachment 115785 [details]
sample

Same sample as attachment #115780 [details], but with increased cropping, leading to 10x more obvious results in PDF export.
Comment 6 tommy27 2015-05-24 11:45:58 UTC
not reproducible under Win8 using LibO 4.4.1 and 5.1.0 alpha
PDF output looks the same as in ODT source

please tell your Linux distro and version
Comment 7 Jeff Fortin Tam 2015-05-24 13:36:38 UTC
I got 4.4.3 from the RPM packages directly from the libreoffice.org website, so I thought my Linux distro (Fedora 21, 64 bits) was irrelevant.
Comment 8 Michael 2015-05-25 14:06:38 UTC
I can confirm this under Fedora 21 x64. It is a regression, bibisect below.

The missing step to reproduce the bug is to select "Lossless compression" option on the PDF export dialog. If you select JPEG output, with or without DPI adjustment, then the cropping works correctly.


$ git bisect log
# bad: [60af19e4996c07eaa9d1f7e1e908cfe211df368b] libreoffice-4.4.2.2
# good: [f829590e1c73663ee9463c2f54219794b88764b0] libreoffice-3.6.0.4
git bisect start 'libreoffice-4.4.2.2' 'libreoffice-3.6.0.4'
# bad: [81670b1d7fce4d919e8511349b15604e1cafd071] libreoffice-4.2.0.0.beta1
git bisect bad 81670b1d7fce4d919e8511349b15604e1cafd071
# good: [3f64d25afafbaa313ac24854bf16a2425fe41e0a] libreoffice-4.0.5.1
git bisect good 3f64d25afafbaa313ac24854bf16a2425fe41e0a
# good: [178d758842dc5bee047bc18637d5415e3107e87a] libreoffice-4.1.2.1
git bisect good 178d758842dc5bee047bc18637d5415e3107e87a
# good: [d4ca11f997c195199e6917c65db601c28668d749] libreoffice-4.1.4.2
git bisect good d4ca11f997c195199e6917c65db601c28668d749
# good: [73acf5570946d56f104448ac7f4d7cd8ec3f58c7] libreoffice-4.1.5.3
git bisect good 73acf5570946d56f104448ac7f4d7cd8ec3f58c7
# good: [5d580e5e09759c42f334130df617cff3b8118b4e] libreoffice-4.1.6.2
git bisect good 5d580e5e09759c42f334130df617cff3b8118b4e
# first bad commit: [81670b1d7fce4d919e8511349b15604e1cafd071] libreoffice-4.2.0.0.beta1
Comment 9 Robinson Tryon (qubit) 2015-12-13 11:13:18 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2016-10-06 12:19:06 UTC
I can no longer reproduce it in

Version: 5.3.0.0.alpha0+
Build ID: ae3ec79354f7b4967e736c6a4cd7c08fc52e2b7d
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

thus, closing this as RESOLVED WORKSFORME