[okular] [Bug 442280] Okular does not take /UserUnit into account (page size incorrect)

Manuel Geißer bugzilla_noreply at kde.org
Fri Sep 10 21:00:00 BST 2021


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

--- Comment #1 from Manuel Geißer <geisserml at gmail.com> ---
Python shell code to reproduce (replace TestFiles.userunit_10 with the path
string where you saved the file, and skip the first import which depends on
custom test infrastructure of the lib I am developing):

```python3
Python 3.8.10 (default, Jun  2 2021, 10:49:15) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tests_pdfnodegraph.testfiles import TestFiles
>>> import pikepdf
>>> pdf = pikepdf.Pdf.open(TestFiles.userunit_10)
>>> page = pdf.pages[0]
>>> page.MediaBox
pikepdf.Array([ Decimal('0.0'), Decimal('0.0'), Decimal('1785.6'),
Decimal('1785.6') ])
>>> page.UserUnit
Decimal('10.0')
>>> 1785.6 * 1/72 * 25.4
629.9199999999998
>>> 1785.6*10 * 1/72 * 25.4
6299.2
```

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


More information about the Okular-devel mailing list