[okular] [Bug 434613] New: System DPI ignored for PDF files

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Fri Mar 19 09:25:07 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=434613

            Bug ID: 434613
           Summary: System DPI ignored for PDF files
           Product: okular
           Version: unspecified
          Platform: Mint (Ubuntu based)
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel at kde.org
          Reporter: zfr at zbalbous.com
  Target Milestone: ---

SUMMARY

When opening PDF files, the DPI seems to be determined from the monitor EDID,
if one is provided. The problem is, it's not uncommon for this to be incorrect,
and for this reason I use xrandr and/or xorg.conf to enter the correct DPI.
This is however ignored by Okular.

As such, if the monitor's EDID is wrong, it's not possible to have Okular use
the correct DPI, other than by using a custom EDID, which is not always an easy
workaround.


STEPS TO REPRODUCE
1. Type 'xrandr --dpi 96' in terminal. 
2. Open an A4 (or any other sie) PDF document in Okular. Check its width at
100%.
3. Type 'xrandr --dpi 80' in terminal.
4. Open an A4 (or any other sie) PDF document in Okular. Check its width at
100%.

Alternatively

1. Add 'Option "DPI" "96 x 96"' under 'Device' in xorg.conf. Restart. 
2. Open an A4 (or any other sie) PDF document in Okular. Check its width at
100%.
3. Add 'Option "DPI" "80 x 80"' under 'Device' in xorg.conf. Restart. 
4. Open an A4 (or any other sie) PDF document in Okular. Check its width at
100%.

OBSERVED RESULT

In both cases the width of the A4 page will be same. It will ignore the DPI you
set manually. It will use DPI from your monitor's EDID's (if one is supplied).

EXPECTED RESULT

The width of the A4 page should be different, depending on DPI. An A4 paper is
210mm wide, which is equal to 8.27 inches, which should be around 794px at 96
DPI and 661px at 80 DPI.

OTHER NOTES

Some other pdf readers, like MuPDF, use the manual DPI you set correctly.

Also, this issue is particularly bad for my monitor, whose EDID provides an
wrong horizontal and vertical DPIs that are not equal. This causes pages viewed
on Okular not only to be of incorrect size, but also slightly stretched.

It would be ideal, if you could actually set the DPI manually in settings.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Linux Mint 19.3 Cinnamon 4.4.8
(available in About System)
Okular version: 20.12.3
KDE Plasma Version: 
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list