Bug 510662 - Okular stretches images embedded in PDFs
Summary: Okular stretches images embedded in PDFs
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (other bugs)
Version First Reported In: 25.08.2
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL: https://discuss.kde.org/t/okular-slig...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-15 23:52 UTC by Roke Julian Lockhart Beedell
Modified: 2025-10-16 00:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A Document That Reproduces The Problem (71.63 KB, application/pdf)
2025-10-15 23:56 UTC, Roke Julian Lockhart Beedell
Details
311 px in firefox-143.0.4 (1.03 MB, image/png)
2025-10-16 00:02 UTC, Roke Julian Lockhart Beedell
Details
311 px in chromium-141.0.7390.65 (1.03 MB, image/png)
2025-10-16 00:03 UTC, Roke Julian Lockhart Beedell
Details
303 px in okular-25.08.2 (1.03 MB, image/png)
2025-10-16 00:03 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2025-10-15 23:52:25 UTC
# SUMMARY

Okular stretches images embedded in PDFs.

# STEPS TO REPRODUCE

1. Create an HTML file with an embedded JPEG, like https://gitlab.com/RokeJulianLockhart.SKLHAD/SG5N9Q/-/commit/867ce958336f5b05ec5a94b06e3a33e841330a53 demonstrates.

2. Export that as a PDF, via firefox-143.0.4 or chromium-141.0.7390.65.

3. Invoke it in Okular, and FF and Chromium's PDFJSes.

4. Compare the widths of the images (merely observe how Okular renders it).

# OBSERVED RESULT

In Firefox's PDFJS instance, a JPEG embedded in a PDF when printed-to-PDF from a webpage with an embedded `img` renders at 446 px at 100 %. In Okular, the equivalent size is 110 %, where it renders at 450 px.

# EXPECTED RESULT

Both should be the same width. The to-be-attached screenshots shall demonstrate both that the zoom levels are equivalent, and that in Okular, the image is noticeably stretched.

# SOFTWARE/OS VERSIONS

> ~~~
> Name         : okular
> Version      : 25.08.2
> Release      : 1.fc42
> Architecture : x86_64
> Install Date : Tue 14 Oct 2025 12:32:19 BST
> Size         : 7369430
> Signature    : RSA/SHA256, Sat 11 Oct 2025 17:03:24 BST, Key ID c8ac4916105ef944
> Source RPM   : okular-25.08.2-1.fc42.src.rpm
> Build Date   : Sat 11 Oct 2025 03:56:51 BST
> Build Host   : buildhw-x86-12.rdu3.fedoraproject.org
> Packager     : Fedora Project
> Vendor       : Fedora Project
> Bug URL      : https://bugz.fedoraproject.org/okular
> ~~~

# ADDITIONAL INFORMATION

This was originally confirmed at https://discuss.kde.org/t/okular-slightly-stretches-some-pdfs-does-anyone-else-experience-this/31567/5?u=rokejulianlockhart#:~:text=I%20see%20exactly%20446%20px,equivalent%20size%20of%20110%25.
Comment 1 Roke Julian Lockhart Beedell 2025-10-15 23:56:02 UTC
Created attachment 185821 [details]
A Document That Reproduces The Problem

>  The bug was created successfully, but attachment creation failed. Please add your attachment by clicking the "Add an Attachment" link below.

Attached a document that reproduces the problem.
Comment 2 Roke Julian Lockhart Beedell 2025-10-16 00:02:45 UTC
Created attachment 185822 [details]
311 px in firefox-143.0.4

My measurements, and zoom (130 %, not 110) were inaccurate in retrospect, but not least because the difference is actually even greater than before, it doesn't matter.
Comment 3 Roke Julian Lockhart Beedell 2025-10-16 00:03:07 UTC
Created attachment 185823 [details]
311 px in chromium-141.0.7390.65
Comment 4 Roke Julian Lockhart Beedell 2025-10-16 00:03:38 UTC
Created attachment 185824 [details]
303 px in okular-25.08.2