| Summary: | When printing, selecting a manually-typed page number or range of pages causes nothing to be printed | ||
|---|---|---|---|
| Product: | [Applications] okular | Reporter: | DA4PKol <sebast.weber> |
| Component: | printing | Assignee: | Okular developers <okular-devel> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | normal | CC: | artempodgaisky, fanzhuyifan, germano.massullo, jnerin, john.kizer, kolAflash, nazar2692, roman.karwacik |
| Priority: | NOR | Keywords: | qt6 |
| Version First Reported In: | 24.02.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| URL: | https://codereview.qt-project.org/c/qt/qtbase/+/633938 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
DA4PKol
2024-03-18 16:47:47 UTC
*** Bug 502236 has been marked as a duplicate of this bug. *** I can reproduce this on Okular 24.12.3, Frameworks 6.12.0, Qt 6.8.2. Thank you for merging. What's important for reproducing this issue is that the "Pages" option is the one affected, the "Pages from" option seems to work fine. It seems like with the Okular is cropping the pages according to the specification on the "Pages" input first, and is additionally sending the page-ranges on the IPP level, which does not make sense in this context, as after cropping the page numbers have changed. *** Bug 485380 has been marked as a duplicate of this bug. *** *** Bug 490435 has been marked as a duplicate of this bug. *** *** Bug 488361 has been marked as a duplicate of this bug. *** I observe very similar behavior in Okular, where often a page is missed. And I think it's probably the same bug, so I add it here. . The behavior is quite irregular, but it's deterministic. Some examples: print page 1: prints page 1 print page 2: prints no pages printing page 2-3 or 2,3: prints page 3 printing page 2-4 or 2,3,4: prints pages 3 + 4 printing page 3-4 or 3,4: prints no pages . Used for testing: https://files.kde.org/neon/images/unstable/20250608-1147/neon-unstable-20250608-1147.iso KDE-6.4.80, Okular-25.04 apt update; apt install printer-driver-cups-pdf Printer name in Okular printing UI: PDF It's reproducible with all my real printers, like an "HP DeskJet 1000 j110". But this one's the easiest for testing. Only difference between cups-pdf and a real printer is, that when a real prints just prints nothing (0 pages), then cups-pdf will generate a blank page. . The KDE internal PDF printer can't be used for testing, because it only prints the whole documents. bug 436388: Printing page ranges doesn't work with "Print to File (PDF)" Maybe related: bug 427241: page number mapped wrong Workaround: Use another PDF viewer like Gnome's Document Viewer "Evince". This works fine on the same system, which is another indicator that this is really a KDE bug. P.S. Used PDF for testing: https://files.kde.org/neon/images/unstable/20250608-1147/neon-unstable-20250608-1147.iso /usr/share/doc/shared-mime-info/shared-mime-info-spec.pdf Other KDE applications are also broken. So this probably originates in a KDE library.
# Kate
// bash (73 lines are one A4, 9pt "Hack" font page)
for i in {1..5}; do for j in {101..173}; do echo "${i} ${j}"; done; done >> test.txt
// open with Kate and print page 2 via "Pages" input field => prints nothing (or empty page)
.
This Qt6 commit (2025-03-23) may possibly fix it:
rely on CUPS for multiple page ranges in unix version of QPrintDialog
[...]Restore the behavior of Qt5 [...]
[...]Pick-to: 6.9 6.8[...]
https://github.com/qt/qtbase/commit/2428cbf44e3e2aa4eaf00c9548ac5a74685101c4
in tag 6.9.1 (not in 6.9.0)
probably in future tag 6.8.4 (not in 6.8.3)
https://files.kde.org/neon/images/unstable/20250608-1147/neon-unstable-20250608-1147.iso
=> Qt-6.9.0
Okular code hint:
https://invent.kde.org/graphics/okular/-/blob/4abf50580bcb8595b63d139d91708e0015b7b6ce/generators/poppler/generator_pdf.cpp#L1513
.
Some affected distros: Debian-13 (KDE-6.3.4), Kubuntu-24.10 (KDE-6.1.5)
Hint: cups-pdf output seems to default to ~/PDF/
Hi folks - I can no longer reproduce these issues after upgrading to Qt 6.9.1 - given the merging of this code into the upstream project, it seems to make sense that it would positively impact this issue: https://codereview.qt-project.org/c/qt/qtbase/+/633938 There is another issue that I can still reproduce related to the "Pages" entry when printing, but that concerns a general issue with printing multiple pages per sheet: https://bugs.kde.org/show_bug.cgi?id=432258 |