Bug 106311 - PNG images are stretched and cropped in PDF export with OpenGL (pages 3 and 4)
Summary: PNG images are stretched and cropped in PDF export with OpenGL (pages 3 and 4)
Status: RESOLVED DUPLICATE of bug 121615
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
Reported: 2017-03-03 22:23 UTC by Jan Nielsen
Modified: 2019-03-27 14:31 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:

Example ODT document. (6.30 MB, application/vnd.oasis.opendocument.text)
2017-03-03 22:23 UTC, Jan Nielsen
Example exported as PDF. (2.81 MB, application/pdf)
2017-03-03 22:24 UTC, Jan Nielsen
Example exported (correctly) as PDF without OpenGL enabled (3.07 MB, application/pdf)
2017-03-04 20:29 UTC, Jan Nielsen

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Nielsen 2017-03-03 22:23:58 UTC
Created attachment 131621 [details]
Example ODT document.

I have a simple document containing four images on 4 separate pages. The first two images are JPGs and last two are PNGs. They look fine in Writer v5.2.5.1, but when exporting af PDF, the PNGs are stretched horizontally (approx. factor 3) so they don't fit on the page. The same problem occurs if the images are inserted into Calc and exported from there. See attached ODT and PDF.
Comment 1 Jan Nielsen 2017-03-03 22:24:29 UTC
Created attachment 131622 [details]
Example exported as PDF.
Comment 2 Buovjaga 2017-03-04 19:29:39 UTC Comment hidden (obsolete)
Comment 3 Jan Nielsen 2017-03-04 19:50:41 UTC
Version: (x64)
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22
CPU tråde: 8; Styresystem version: Windows 6.19; Gengiver af brugergrænseflade: GL; 
Lokalisering: da-DK (da_DK); Calc: group
Comment 4 Buovjaga 2017-03-04 19:54:44 UTC
Ok, two things:

first try disabling Tools - Options - LibreOffice - View - Use OpenGL for all rendering (and restart LibO)

If that solves it for you, try installing LibO version 5.3 and try again with OpenGL enabled.
Comment 5 Jan Nielsen 2017-03-04 20:28:31 UTC
Disabling OpenGL seems to fix the problem.

Upgrading to LO 5.3 is not an option at this point due to a critical bug in Calc.
Comment 6 Jan Nielsen 2017-03-04 20:29:36 UTC
Created attachment 131630 [details]
Example exported (correctly) as PDF without OpenGL enabled
Comment 7 Jan Nielsen 2017-03-04 20:30:37 UTC
I can't help but notice that the exported PDF became 9% larger after disabling OpenGL.
Comment 8 Buovjaga 2017-03-04 20:45:46 UTC Comment hidden (obsolete)
Comment 9 Jan Nielsen 2017-03-04 21:17:47 UTC Comment hidden (obsolete)
Comment 10 Jan Nielsen 2017-03-04 21:22:31 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2017-03-04 23:00:37 UTC
(In reply to Jan Nielsen from comment #10)
> Please disregard my last comment. The bug is still present in the daily
> build. I accidentally opened another version of my document in which I used
> some other images that didn't trigger the bug.

Ok, that is very interesting. You see, we've had some PDF export trouble with OGL before: bug 94739.

At least it was good news that your Calc bug is gone :)

It might be useful, if you copied & pasted to a comment the contents of your C:\Users\User\AppData\Roaming\LibreOffice\4\cache\opengl_device.log
Comment 12 Roman Kuznetsov 2017-03-04 23:20:11 UTC
don't reproduce for LO, Windows 7

video - AMD 6450

DriverVersion: 15.200.1062.1004
DriverDate: 8-3-2015
DeviceID: PCI\VEN_1002&DEV_6779&SUBSYS_03DA1043&REV_00
AdapterVendorID: 0x1002
AdapterDeviceID: 0x6779
AdapterSubsysID: 0x03da1043
DeviceKey: System\CurrentControlSet\Control\Video\{72FA7661-26BE-4A7C-B473-0F288EEB349A}\0000
DeviceString: AMD Radeon HD 6450
Comment 13 Jan Nielsen 2017-03-05 12:03:32 UTC
DriverDate: 11-14-2016
AdapterVendorID: 0x10de
AdapterDeviceID: 0x05ea
AdapterSubsysID: 0x075310de
DeviceKey: System\CurrentControlSet\Control\Video\{333EE63B-F466-47B0-8036-6975727B93D7}\0000
DeviceString: NVIDIA GeForce GTX 260
Comment 14 Timur 2017-08-29 17:26:20 UTC Comment hidden (obsolete)
Comment 15 Jan Nielsen 2017-08-29 17:37:18 UTC Comment hidden (obsolete)
Comment 16 Buovjaga 2018-03-27 06:57:43 UTC
*** Bug 116545 has been marked as a duplicate of this bug. ***
Comment 17 Buovjaga 2018-03-27 06:59:21 UTC
*** Bug 106357 has been marked as a duplicate of this bug. ***
Comment 18 Mike Kaganski 2018-06-27 13:53:57 UTC
*** Bug 118410 has been marked as a duplicate of this bug. ***
Comment 19 Mike Kaganski 2018-07-04 07:19:59 UTC
*** Bug 118532 has been marked as a duplicate of this bug. ***
Comment 20 Luboš Luňák 2019-03-27 14:31:12 UTC

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