This forum has been archived. All content is frozen. Please use KDE Discuss instead.
Please use bugs.kde.org for bug reports or feature requests. Development related questions should be directed to the okular-devel mailing list.

Okular will only print as root

Tags: None
(comma "," separated)
armandhr
Registered Member
Posts
11
Karma
0
OS

Okular will only print as root

Mon Nov 23, 2009 1:44 am
Hello--I'm not exactly sure if this is the appropriate forum to ask this question, but I couldn't find any information on this problem anywhere else, so I thought I'd try here.

First of all, I'm running Kubuntu 9.10 (KDE version 4.3.3) on an HP TouchSmart tx2z laptop printing to an HP Deskjet 5940 printer. It actually works very well for most applications, but I do have one problem trying to print a PDF or DVI from Okular (some other formats, such as ODT, work fine). The printer shows up just fine, and when I print the document does indeed get sent to the printer queue, but then it gets stuck as "held" indefinitely. Trying to "release" the document does no good, although I can "cancel" it. The printer's status (as revealed by lpstat) then goes to "Couldn't read xref table".

Interestingly, if I start Okular as root, it prints just fine. Clearly, there is some sort of permissions problem going on, but I'm a little confused because none of my other applications (Kate, OpenOffice.org, etc.) need to be started as root in order to print. Any insight you can give would be appreciated.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Mon Nov 23, 2009 4:39 am
Can you try enabling "Force Rasterization" under Print > Options > PDF Options?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Mon Nov 23, 2009 6:12 am
bcooksley wrote:Can you try enabling "Force Rasterization" under Print > Options > PDF Options?

Thanks for your reply; unfortunately, this still doesn't work. I also tried uninstalling and reinstalling Okular, but the same behavior occurs.

So far, it seems Okular can print ODT and image files (JPG, TIF, etc.) just fine, but not DVI, PS, or PDF.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Mon Nov 23, 2009 6:36 am
And you recieve the exact same error regardless of the file type being printed?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Mon Nov 23, 2009 8:24 am
bcooksley wrote:And you recieve the exact same error regardless of the file type being printed?
Well, there's never exactly an error message displayed. But yes, the behavior is the same regardless of whether I try to print a DVI, PS, or PDF: the document gets sent to the printer queue, where it is permanently "held" until cancelled, and the printer's status gets set to "Couldn't read xref table." If there is some particular error log I should look into to try to obtain more information, please let me know.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Mon Nov 23, 2009 8:35 am
Can you please check if an alternative PDF viewer is able to print? XPDF should be able to do the job.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Mon Nov 23, 2009 8:53 am
bcooksley wrote:Can you please check if an alternative PDF viewer is able to print? XPDF should be able to do the job.
Yes, XPDF can print just fine, even without being run as root.
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Mon Nov 23, 2009 8:54 pm
I should probably mention that this is a local (rather than network) printer I am trying to print to, and the "Print to File (PDF)" and "Print to File (Postscript)" options both work fine in Okular.

I have attached the output of /var/log/cups/error_log below in case that helps. Again, this file prints perfectly under XPDF, and perfectly under Okular if run as root.

Code: Select all
E [23/Nov/2009:12:25:43 -0800] [Job 149] May not be a PDF file (continuing anyway)
E [23/Nov/2009:12:25:43 -0800] [Job 149] PDF file is damaged - attempting to reconstruct xref table...
E [23/Nov/2009:12:25:43 -0800] [Job 149] Couldn't find trailer dictionary
E [23/Nov/2009:12:25:43 -0800] [Job 149] Couldn't read xref table
D [23/Nov/2009:12:25:43 -0800] [Job 149] The following messages were recorded from 12:25:43 to 12:25:43
D [23/Nov/2009:12:25:43 -0800] [Job 149] Adding start banner page "none".
D [23/Nov/2009:12:25:43 -0800] [Job 149] Queued on "Deskjet-5900-series" by "armand".
D [23/Nov/2009:12:25:43 -0800] [Job 149] Auto-typing file...
D [23/Nov/2009:12:25:43 -0800] [Job 149] Request file type is application/postscript.
D [23/Nov/2009:12:25:43 -0800] [Job 149] File of type application/postscript queued by "armand".
D [23/Nov/2009:12:25:43 -0800] [Job 149] Adding end banner page "none".
D [23/Nov/2009:12:25:43 -0800] [Job 149] job-sheets=none,none
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[0]="Deskjet-5900-series"
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[1]="149"
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[2]="armand"
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[3]="CoolEquations.pdf"
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[4]="1"
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[5]="noCollate Duplex=DuplexTumble finishings=3 media=A4 number-up=1 outputorder=normal PageRegion PageSize=Letter portrait sides=one-sided � job-uuid=urn:uuid:a3bba9de-8bdc-377d-7484-e3aeaea732fd job-originating-host-name=localhost"
D [23/Nov/2009:12:25:43 -0800] [Job 149] argv[6]="/var/spool/cups/d00149-001"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[0]="CUPS_CACHEDIR=/var/cache/cups"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[1]="CUPS_DATADIR=/usr/share/cups"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[2]="CUPS_DOCROOT=/usr/share/cups/doc-root"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[4]="CUPS_REQUESTROOT=/var/spool/cups"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[5]="CUPS_SERVERBIN=/usr/lib/cups"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[6]="CUPS_SERVERROOT=/etc/cups"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[7]="CUPS_STATEDIR=/var/run/cups"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[8]="HOME=/var/spool/cups/tmp"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[10]="SERVER_ADMIN=root@mycroft-holmes"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[11]="SOFTWARE=CUPS/1.4.1"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[12]="TMPDIR=/var/spool/cups/tmp"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[13]="TZ=America/Los_Angeles"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[14]="USER=root"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[15]="CUPS_SERVER=/var/run/cups/cups.sock"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[16]="CUPS_ENCRYPTION=IfRequested"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[17]="IPP_PORT=631"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[18]="CHARSET=utf-8"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[19]="LANG=en_US.UTF-8"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[20]="PPD=/etc/cups/ppd/Deskjet-5900-series.ppd"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[21]="RIP_MAX_CACHE=448831k"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[22]="CONTENT_TYPE=application/postscript"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[23]="DEVICE_URI=hp:/usb/Deskjet_5900_series?serial=CN64P1Z17D04KF"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[24]="PRINTER_INFO=HP Deskjet 5900 series"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[25]="PRINTER_LOCATION=mycroft-holmes"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[26]="PRINTER=Deskjet-5900-series"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[27]="CUPS_FILETYPE=document"
D [23/Nov/2009:12:25:43 -0800] [Job 149] envp[28]="FINAL_CONTENT_TYPE=printer/Deskjet-5900-series"
D [23/Nov/2009:12:25:43 -0800] [Job 149] Started filter /usr/lib/cups/filter/pstopdf (PID 7562)
D [23/Nov/2009:12:25:43 -0800] [Job 149] Started filter /usr/lib/cups/filter/pdftopdf (PID 7563)
D [23/Nov/2009:12:25:43 -0800] [Job 149] Started filter /usr/lib/cups/filter/foomatic-rip (PID 7564)
D [23/Nov/2009:12:25:43 -0800] [Job 149] Started backend /usr/lib/cups/backend/hp (PID 7565)
D [23/Nov/2009:12:25:43 -0800] [Job 149] pstopdf 6 args: 149 armand CoolEquations.pdf 1 noCollate Duplex=DuplexTumble finishings=3 media=A4 number-up=1 outputorder=normal PageRegion PageSize=Letter portrait sides=one-sided � job-uuid=urn:uuid:a3bba9de-8bdc-377d-7484-e3aeaea732fd job-originating-host-name=localhost /var/spool/cups/d00149-001
D [23/Nov/2009:12:25:43 -0800] [Job 149] PPD: /etc/cups/ppd/Deskjet-5900-series.ppd
D [23/Nov/2009:12:25:43 -0800] [Job 149] Resolution: 1200
D [23/Nov/2009:12:25:43 -0800] [Job 149] eval: 1: job-uuid=urn:uuid:a3bba9de-8bdc-377d-7484-e3aeaea732fd: not found
D [23/Nov/2009:12:25:43 -0800] [Job 149] Getting input from file
D [23/Nov/2009:12:25:43 -0800] [Job 149] foomatic-rip version 4.0.3.215 running...
D [23/Nov/2009:12:25:43 -0800] [Job 149] Parsing PPD file ...
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option Resolution
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option PageSize
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option Model
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option PrintoutMode
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option InputSlot
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option Duplex
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option DryTime
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option Quality
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option ImageableArea
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option PaperDimension
D [23/Nov/2009:12:25:43 -0800] [Job 149] Added option Font
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] Parameter Summary
D [23/Nov/2009:12:25:43 -0800] [Job 149] -----------------
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] Spooler: cups
D [23/Nov/2009:12:25:43 -0800] [Job 149] Printer: Deskjet-5900-series
D [23/Nov/2009:12:25:43 -0800] [Job 149] Shell: /bin/bash
D [23/Nov/2009:12:25:43 -0800] [Job 149] PPD file: /etc/cups/ppd/Deskjet-5900-series.ppd
D [23/Nov/2009:12:25:43 -0800] [Job 149] ATTR file:
D [23/Nov/2009:12:25:43 -0800] [Job 149] Printer model: HP Deskjet 5900 Series hpijs, 3.9.8
D [23/Nov/2009:12:25:43 -0800] [Job 149] Job title: CoolEquations.pdf
D [23/Nov/2009:12:25:43 -0800] [Job 149] File(s) to be printed:
D [23/Nov/2009:12:25:43 -0800] [Job 149] <STDIN>
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] Ghostscript extra search path ('GS_LIB'): /usr/share/cups/fonts
D [23/Nov/2009:12:25:43 -0800] [Job 149] Printing system options:
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'noCollate'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown boolean option "noCollate".
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'finishings=3'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown option finishings=3.
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'media=A4'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'number-up=1'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown option number-up=1.
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'outputorder=normal'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown option outputorder=normal.
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'portrait'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown boolean option "portrait".
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'sides=one-sided'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option '�'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown boolean option "�".
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'job-uuid=urn:uuid:a3bba9de-8bdc-377d-7484-e3aeaea732fd'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown option job-uuid=urn:uuid:a3bba9de-8bdc-377d-7484-e3aeaea732fd.
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'job-originating-host-name=localhost'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Unknown option job-originating-host-name=localhost.
D [23/Nov/2009:12:25:43 -0800] [Job 149] Options from the PPD file:
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'Duplex=DuplexTumble'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'PageRegion'
D [23/Nov/2009:12:25:43 -0800] [Job 149] Pondering option 'PageSize=Letter'
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] ================================================
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] File: <STDIN>
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] ================================================
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] Cannot process "<STDIN>": Unknown filetype.
D [23/Nov/2009:12:25:43 -0800] [Job 149]
D [23/Nov/2009:12:25:43 -0800] [Job 149] Closing foomatic-rip.
D [23/Nov/2009:12:25:43 -0800] [Job 149] prnt/backend/hp.c 802: ERROR: null print job total=0
D [23/Nov/2009:12:25:43 -0800] [Job 149] Backend returned status 1 (failed)
D [23/Nov/2009:12:25:43 -0800] [Job 149] End of messages
D [23/Nov/2009:12:25:43 -0800] [Job 149] printer-state=3(idle)
D [23/Nov/2009:12:25:43 -0800] [Job 149] printer-state-message="Couldn't read xref table"
D [23/Nov/2009:12:25:43 -0800] [Job 149] printer-state-reasons=none
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Tue Nov 24, 2009 6:39 am
Can you check you have the latest version of CUPS from the standard repositories installed? ( http://ubuntuforums.org/showthread.php?t=905044 )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Tue Nov 24, 2009 9:56 am
bcooksley wrote:Can you check you have the latest version of CUPS from the standard repositories installed? ( http://ubuntuforums.org/showthread.php?t=905044 )
I think I have the latest version; I mean, the only repositories I have added other than the default ones are http://ppa.launchpad/kubuntu-ppa/ppa/ubuntu karmic and http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu karmic, and it says I am completely updated. The version of the CUPS packages I have installed seems to be 1.4.1-5 based on the package names, although if there is some other way I should check the version or some other repositories I should look for updates in, please let me know.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Tue Nov 24, 2009 8:48 pm
This is unusual. Can you please check to see if there is any difference between XPDF and Okular in how printing is handled?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Wed Nov 25, 2009 7:42 am
bcooksley wrote:This is unusual. Can you please check to see if there is any difference between XPDF and Okular in how printing is handled?
I really don't know at this point--I'm pretty sure XPDF just uses "lpr", but I don't know how Okular sends information to the printer.

If it helps, I turned "Save debugging information" on and generated the following error log files for each case (successful printing with XPDF, failed printing with Okular, and successful printing with Okular as root):

http://stashbox.org/712236/error_log_xpdf.txt
http://stashbox.org/712238/error_log_okular.txt
http://stashbox.org/712239/error_log_sudo_okular.txt

Sorry for the file hosting service; just didn't want to clutter up this message with unreadable long lists and I couldn't figure out how to attach them.

I don't really know what to make of the differences between these logs, but maybe someone else does.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Wed Nov 25, 2009 9:16 am
The problem appears to be that CUPS thinks it is recieving a PDF file from Okular, when it is infact recieving Postscript from Okular. Unfortunately I do not know why this happens. I haven't seen it before, so it is likely to be a bug in CUPS.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
armandhr
Registered Member
Posts
11
Karma
0
OS

Re: Okular will only print as root

Wed Nov 25, 2009 8:09 pm
bcooksley wrote:The problem appears to be that CUPS thinks it is recieving a PDF file from Okular, when it is infact recieving Postscript from Okular. Unfortunately I do not know why this happens. I haven't seen it before, so it is likely to be a bug in CUPS.
That makes sense, but then why would Okular successfully print as root? That was the one thing that kept me from thinking this was some sort of bug in the first place--I just thought I had my permissions settings wrong somewhere.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Okular will only print as root

Thu Nov 26, 2009 5:19 am
It doesn't make sense why it works as root. Only a expert in CUPS would be able to determine the issue, as KDE doesn't do anything special.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell