Version: 1.1.2 OS: OpenSUSE 42.3 RPM version: okular-17.04.2-1.6.x86_64 Since re-installing from OpenSUSE 42.1 to 42.3, Okular is unable to print to remote printers (served via a CUPS print server). The GUI will not throw any exceptions. However, Okular will print the following to the console (if started that way): lpr: The printer or class does not exist. In another case, it printed to the first printer in the list rather than the one selected. Note that we have 149 printers defined (as shown in lpstat -t). Perhaps the long list of printers is causing some sort of overflow ? Note that other software such as firefox is printing fine from the same user session.
Does the printing from other Qt/KDE applications work? It might be the problems with libqpdf similar to those in the current Mageia: https://bugs.mageia.org/show_bug.cgi?id=21444 What is the version of qpdf/libqpdf btw? Thanks in advance for the info.
I have just attempted to print from Konsole (File --> Print Screen --> [select printer] --> Print) and the same symptoms. (Silently fails). I also tried from Kate and it also has the same symptoms. If launching Konsole or Kate from the command line, you see the following logged to the console: QPainter::begin(): Returned false QPainter::save: Painter not active QPainter::setPen: Painter not active QPainter::setFont: Painter not active QPainter::restore: Unbalanced save/restore QPainter::save: Painter not active QPainter::setPen: Painter not active QPainter::restore: Unbalanced save/restore QPainter::translate: Painter not active QPainter::setPen: Painter not active QPainter::pen: Painter not active QPainter::pen: Painter not active QPainter::setPen: Painter not active QPainter::setClipping: Painter not active, state will be reset by begin QPainter::translate: Painter not active QPainter::end: Painter not active, aborted I am running this version of libqpdf: libqpdf13-5.1.3-5.1.x86_64 I am running cup 1.7.5 on both client and server so I don't think it is related to that other bug... Thanks!
Can you please run QT_LOGGING_RULES=org.kde.okular.core=true okular And try to print and paste the org.kde.okular.core: Executing "lpr" with arguments line?
Hmm.. that line did not even show up in the terminal. Here is the full output: ~> QT_LOGGING_RULES=org.kde.okular.core=true okular org.kde.okular.core: "/usr/lib64/qt5/plugins/okular/generators/okularGenerator_txt.so" org.kde.okular.core: Output DPI: QSizeF(94.1467, 94.0741) org.kde.okular.core: request observer=0x1a37910 527x702@0 org.kde.okular.core: request observer=0x1a37910 527x702@1 org.kde.okular.core: sending request observer=0x1a37910 527x702@0 async == true isTile == false org.kde.okular.core: request observer=0x1a37910 527x702@1 org.kde.okular.core: request observer=0x1a37910 527x702@1 org.kde.okular.core: request observer=0x1a37910 527x702@1 org.kde.okular.core: request observer=0x1c398a0 327x436@0 org.kde.okular.core: request observer=0x1c398a0 327x436@1 org.kde.okular.core: sending request observer=0x1c398a0 327x436@0 async == true isTile == false org.kde.okular.core: sending request observer=0x1c398a0 327x436@1 async == true isTile == false org.kde.okular.core: request observer=0x1a37910 507x676@0 org.kde.okular.core: request observer=0x1a37910 507x676@1 org.kde.okular.core: sending request observer=0x1a37910 507x676@0 async == true isTile == false org.kde.okular.core: request observer=0x1a37910 507x676@1 org.kde.okular.core: request observer=0x1a37910 507x676@1 org.kde.okular.core: request observer=0x1a37910 507x676@1 QPainter::begin(): Returned false ^C
So, I just re-ran that and instead of opening a txt file, I opened a PDF and tried to print that. Here is the line you are looking for: org.kde.okular.core: Executing "lpr" with arguments ("-P", "", "-#1", "-J", "Dell.pdf", "-r", "/tmp/okular_S21220.ps") lpr: The printer or class does not exist.
At this point i'd say this is most likely a Qt/distribution bug, please install the qt5 assistant program and see if can you print from there (make sure you're running the Qt5 version by doing Help->About) Since basically we're asking Qt your printer name and it says its empty "". What is the output of lpstat -a?
You are right. assistant-qt5 has the same issue (although I don't know how to enable the right logging that shows me the lpr command args that are being run). lpstat -a shows me all 149 printers in this format: PRINTER_NAME accepting requests since DAY_DATE_TIME
So it would seem it's a problem of Qt upstream if assistant also fails, not something we can really help with, sorry. You may want to report this upstream in the qt bug tracker (only mention assistant, otherwise they'll try to shift it back to "KDE being broken")
If you report it upstream Qt please add the url of the bug here so we can follow up the discussion.
Just for the reference, the similar bug in Mageia has been fixed by cups-filters patching update. http://advisories.mageia.org/MGAA-2017-0055.html
I created a bug for this with openSUSE: https://bugzilla.opensuse.org/show_bug.cgi?id=1052793