Bug 402842 - Can not print with kate and kwrite
Summary: Can not print with kate and kwrite
Status: RESOLVED UPSTREAM
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 18.12.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-04 02:29 UTC by Potomac
Modified: 2019-01-09 00:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
log of cups when a print has failed (39.16 KB, text/plain)
2019-01-05 17:23 UTC, Potomac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Potomac 2019-01-04 02:29:01 UTC
SUMMARY
I use archlinux,
I can not print with kate (18.12.0-1 version) and kwrite, I get an error from cups : [CAPTFILTER] Input File Error

If I use okular then I can print without problem,
no problem also with libreoffice,

so there is a problem for the print feature in kate and kwrite,

my printer is a usb device "Canon LBP 3000"

STEPS TO REPRODUCE
1. install kate (18.12.0-1 version)
2. use a usb printer device like canon lpb 3000
3. print a text from kate or kwrite
4. you will notice that the printer will refuse to print
5. if you try another software (okular, libreoffice) then you can print
without problems

OBSERVED RESULT
no print with kate and kwrite

EXPECTED RESULT
the printer should print


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: archlinux 64 bits, plasma-framework 5.53.0-1,  plasma-desktop 5.14.4-2, kate 18.12.0-1

Qt Version: 5.12.0-1
Comment 1 Potomac 2019-01-04 21:13:14 UTC
the complete error message from cups when I try to print with kate/kwrite :

[CAPTFILTER] Input File Error
paused - "ccp send_data error, exit"

it seems that kate/kwrite use improper print options compared to my printer driver (paper format, margins for example, something that trigger an error on the printer driver)
Comment 2 Potomac 2019-01-05 17:23:40 UTC
Created attachment 117299 [details]
log of cups when a print has failed

here is a debug log of cups, we have much more details
Comment 3 Potomac 2019-01-06 21:58:35 UTC
it is in fact a bug of Qt5 when a component generates PDF, when the locale of the user is not english then numbers inside PDF are displayed with comma separator instead point, which triggers a malformed PDF, and an error in cups,

for example for MediaBox objects the comma is used by Qt5 which is bad :

/MediaBox [0 0 595,000000 842,000000]

see this archlinux thread forum :
https://bbs.archlinux.org/viewtopic.php?pid=1824924#p1824924

and my bugreport :
https://bugreports.qt.io/browse/QTBUG-72868

a workaround is to set LC_NUMERIC to "C" before running a Qt5 application :

LC_NUMERIC=C kate
Comment 4 Potomac 2019-01-08 20:04:38 UTC
Qt developpers have released a patch in order to fix this bug :

https://codereview.qt-project.org/#/c/249357/

https://codereview.qt-project.org/#/c/249357/2/src/gui/painting/qpdf.cpp
Comment 5 Christoph Feck 2019-01-09 00:21:08 UTC
Thanks for the update; changing status.