Bug 338456

Summary: PDF printing smaller pages not centered
Product: [Applications] okular Reporter: Peter Schulte-Stracke <mail>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED WORKSFORME    
Severity: major CC: aacid, emanuele.bacchiega, justin.zobel, stefan.brandner
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: First page of an recent article
Pages from a scanned book.
Printed pages, first by Okular, then by lp.

Description Peter Schulte-Stracke 2014-08-21 20:04:21 UTC
Repeatedly, since some time, printing PDF pages of smaller (book size) pages with Okular results in pages not centered, as expected, but moved to the right and top, usually with parts of the text column not printed; and perhaps, from the impression, slightly upscaled.

With Acrobat Reader the pages are printed correctly.
With evince I tested one PDF and found it slightly shifted to the left, but otherwise ok.
With lp (Cups) the page was not centered vertically but otherwise ok.
Comment 1 Albert Astals Cid 2014-08-21 21:03:08 UTC
Please attach such file
Comment 2 Peter Schulte-Stracke 2014-08-22 08:25:13 UTC
Created attachment 88364 [details]
First page of an recent article
Comment 3 Peter Schulte-Stracke 2014-08-22 08:25:59 UTC
Created attachment 88365 [details]
Pages from a scanned book.
Comment 4 Peter Schulte-Stracke 2014-08-22 08:57:33 UTC
Created attachment 88366 [details]
Printed pages, first by Okular, then by lp.
Comment 5 Peter Schulte-Stracke 2014-08-22 09:01:11 UTC
(In reply to Albert Astals Cid from comment #1)
> Please attach such file
I selected from the files to keep them smaller, and printed them from okular and directly with cups (lp). The latter is not perfect, not centered vertically, it seems, but otherwise it is not as unusable for reading as the pages produced via Okular. What a pity!
Comment 6 Albert Astals Cid 2014-08-22 21:22:53 UTC
I just printed "firs tpage of a recent article" and it appeared centered and uncut (how i would expect it).

Which okular, cups and poppler versions do you have?
Comment 7 Peter Schulte-Stracke 2014-08-23 18:48:48 UTC
$ okular --version
Qt: 4.8.6
KDE Development Platform: 4.14.0
Okular: 0.19.3

For cups I get from dpkg -l the following list:
 
cups            1.7.5-1       amd64   Common UNIX Printing System(tm) - PPD/driver support, w
cups-browsed    1.0.58-1      amd64   OpenPrinting CUPS Filters - cups-browsed
cups-bsd        1.7.5-1       amd64   Common UNIX Printing System(tm) - BSD commands
cups-client     1.7.5-1       amd64   Common UNIX Printing System(tm) - client programs (SysV
cups-common     1.7.5-1       all     Common UNIX Printing System(tm) - common files
cups-core-drivers 1.7.5-1     amd64   Common UNIX Printing System(tm) - PPD-less printing
cups-daemon     1.7.5-1       amd64   Common UNIX Printing System(tm) - daemon
cups-dbg        1.7.5-1       amd64   Common UNIX Printing System(tm) - debugging symbols
cups-driver-gutenprint 5.2.10-3 all   transitional dummy package for gutenprint printer drive
cups-filters    1.0.58-1      amd64   OpenPrinting CUPS Filters - Main Package
cups-filters-core-drivers 1.0.58-1 amd64 OpenPrinting CUPS Filters - PPD-less printing
cups-pdf        2.6.1-9       amd64   PDF writer backend for CUPS
cups-pk-helper  0.2.5-2       amd64   PolicyKit helper to configure cups with fine-grained pr
cups-ppdc       1.7.5-1       amd64   Common UNIX Printing System(tm) - PPD manipulation util
...erver-common 1.7.5-1       all     Common UNIX Printing System(tm) - server common files
libcups2        1.7.5-1       amd64   Common UNIX Printing System(tm) - Core library
libcups2        1.7.5-1       i386    Common UNIX Printing System(tm) - Core library
libcupscgi1     1.7.5-1       amd64   Common UNIX Printing System(tm) - CGI library
libcupsfilters1 1.0.58-1      amd64   OpenPrinting CUPS Filters - Shared library
libcupsimage2   1.7.5-1       amd64   Common UNIX Printing System(tm) - Raster image library
libcupsmime1    1.7.5-1       amd64   Common UNIX Printing System(tm) - MIME library
libcupsppdc1    1.7.5-1       amd64   Common UNIX Printing System(tm) - PPD manipulation library
...river-hpcups 3.14.6-1      amd64   HP Linux Printing and Imaging - CUPS Raster driver (hpcups)

And for poppler the following:
ii  libpoppler-dev:amd64      0.26.4-1          PDF rendering library -- development files
ii  libpoppler-glib4          0.12.4-1.2+squeez PDF rendering library (GLib-based shared library)
ii  libpoppler-glib8:amd64    0.26.4-1          PDF rendering library (GLib-based shared library)
ii  libpoppler-qt4-4:amd64    0.26.4-1          PDF rendering library (Qt 4 based shared library)
ii  libpoppler-qt4-dev        0.26.4-1          PDF rendering library -- development files (Qt 4 interf
ii  libpoppler46:amd64        0.26.4-1          PDF rendering library
ii  libpoppler5               0.12.4-1.2+squeez PDF rendering library
ii  poppler-data              0.4.7-1   all     encoding data for the poppler PDF rendering library
ii  poppler-utils             0.26.4-1          PDF utilities (based on Poppler)
ii  python-poppler            0.12.1-8.1        Poppler Python bindings

Sometimes I have really strange problems – probably I should rebuild my system, if only it were possible in an incremental way :-)
Comment 8 Albert Astals Cid 2014-08-24 16:47:02 UTC
These are versions either the same or very similar to mine. Maybe it's printer dependent? I'm think i'm without ideas here, sorry :/
Comment 9 Stefan Brandner 2014-11-19 13:15:10 UTC
I do have exactly the same problem on a new installed Opensuse 13.2. It happens with certain pdf file including the ones in this bug.
To exclude a printer driver problem I installed cups-pdf. When I print to cups-pdf I do see the problem as well.
stefan@linux-vy41:/etc/cups> okular --version
Qt: 4.8.6
KDE: 4.14.2
Okular: 0.20.2
Comment 10 Stefan Brandner 2014-12-10 08:28:56 UTC
I have filed a printing bug at opensuse bugzilla.
https://bugzilla.opensuse.org/show_bug.cgi?id=908624
The root cause for the problem is poppler which creates wrong BoundingBox values when"fit-to-page" is used.
See poppler bug:
https://bugs.freedesktop.org/show_bug.cgi?id=87161
Comment 11 Emanuele 2015-06-04 12:14:13 UTC
Hi,

I'm experiencing the same issue with Okular in Kubuntu 15.04 64 bit. I see there is a patch available for OpenSuse, could someone tell me whether it is possible to apply it to Kubuntu and how?

Many thanks

Emanuele
Comment 12 Justin Zobel 2020-11-08 03:03:30 UTC
Peter I'm unable to replicate this on current Okular, can you please test and confirm if we are able to close this bug report, thanks.
Comment 13 Bug Janitor Service 2020-11-23 04:33:49 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2020-12-08 04:34:12 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!