Created attachment 88102 [details] Photograph of printed output. On the left is output from "lpr -P<printer-name> <filename>", and on the right is output from kate. When printing, a couple of pixels on the left are missing. My printer is an HP CP1525nw color LaserJet. I tried it on Kubuntu 14.04 with the "HP Color LaserJet CP1510 Series Postscript (recommended)" driver as well as OpenSUSE 13.1 with hplip. Printing from e.g. emacs or "lpr <filename>" works normally. See attachment. Several people on the Kubuntu mailing list have confirmed the same issue: https://lists.ubuntu.com/archives/kubuntu-users/2014-August/059710.html
This is Doug McGarrett, one of those who confirmed the problem. On my LaserJet 2200dn, I usually lose the whole first character on each line, not just a few pixels.
Try changing the margin settings in .kde/share/config/katerc [Kate Print Settings][Margins] bottom=10 left=10 right=10 top=10 On my system, these are "millimeters", but the actual unit may depend on locale, so experiment with them. To save toner or ink, please print to PDF file, and you can use Okular to view how big the margins are.
I changed all four settings from 3.52777777777944 to 5 and it prints fine now. But why doesn't kate print properly out of the box? Where does that number come from initially?
3.52777mm = 10pt. From what I see, this value comes from QPrinter. Inside the Kate sources, you can find this comment: // NOTE: Saving & loading the margins works around QPrinter/QPrintDialog bugs: // - https://bugreports.qt.nokia.com/browse/QTBUG-15351 // - https://bugs.kde.org/show_bug.cgi?id=205802 // - https://bugs.kde.org/show_bug.cgi?id=180051 // Changing the margins now works. However, when you reopen the print dialog // later, the WRONG margins are displayed. The correct ones are still used. // This is a critical bug in Qt. Maybe this comment is outdated, and we can now trust Qt 4.8 and should remove that part of the code. At least this should be re-evaluated for Qt 5.3, which has completely rewritten margin handling.
Qt Bug 15351 says that it is fixed in Qt 5, but not yet in 4.8. Fix was planned for 4.8.6, but got delayed for 4.8.7. Now it is doubtful that it will make it into 4.8.7 as that is to be released within several weeks, while the fix is still not backported. https://bugreports.qt-project.org/browse/QTBUG-15351
IMHO the code was changed in the KF5 port, at least I fail to find that comment and it works with Qt 5 / KF 5, for KDE 4.x we won't change stuff, if Qt fixes it in Qt 4.x, nice, else we need to live with that for 4.x