Link to home
Start Free TrialLog in
Avatar of cigtoxdoc
cigtoxdoc

asked on

/usr/lib/cups/filter/pdftops failed

I have three PCs on my desk. All feed two Brother MFC-9440CN printer/scanners using USB connections and TrippLite USB switches. All PCs running 12.04 64-bit (but can also boot to Win XP Pro SP3). Two of three PCs work well with both MFC devices doing PDF printing. All three work well on scannning from both MFCs. One PC keeps giving /usr/lib/cups/filter/pdftops fail errors when printing PDF, but not character-based documents. Same error occurs when using cups-pdf to print to file. Offending PC is hp/compaq dx2250M dating from 2007. Win XP side works fine, and this PC has printed PDFs from Ubuntu 12.04 64-bit before.

Posting same question on other forums has failed to yield an answer.  I have attached a copy of the CUPS error file.

John
CUPS-printing-error.pdf
Avatar of rindi
rindi
Flag of Switzerland image

You mention your printers are using a USB connection to the PC's to print (or did I misunderstand something), but your pdf shows ipp... You may just need to reconfigure cups so you print directly to the printer.

Besides that make sure to run sudo yum update and after that sudo yum upgrade regularly to make sure your systems stay up-to-date. This could also fix errors caused by a broken package.
Avatar of cigtoxdoc
cigtoxdoc

ASKER

Thank you for your reply.  First, there is no "yum" with Ubuntu.  If I need to work with *rpm files, I use apt.

Second, I have removed and reloaded both the Brother drivers (Brother has special installer for MFC-9440CN) and the CUPS-PDF driver.  No success.  It still makes it ipp.

Perhaps is you can tell me the local of the file that contains the printer-uri setting I can fix this problem.

John
Of course I meant sudo apt-get update and sudo apt-get upgrade, not yum (don't know how I could get that mixed up).

Can't you use native drivers of Ubuntu instead of the legacy drivers of brother?
All Brother-related drivers have been removed, and PC restarted.  The printer comes up as "MFC-9440CN on CUPS MFC-9440CN.  cups-pdf will not work (even after reinstallation) and gives error message "Can't create temporary file."  Nothing else will print except for PDF documents using Qoppa Software's PDF Studio 8 Pro (a proprietary linux equivalent of Adobe Acrobat) and QuickBooks 2001 (running under wine) documents.  PDF documents opened with linux version of Adobe Reader 9 will also print.

So, if looks like some else is going on.

John
I didn't see "Can't create temporary file." in CUPS-printing-error.pdf that you originally posted. From which program are you seeing that error? strace of that program should expose the culprit
Thank you, Mr. Roe:

I looked up the syntax for strace.  It appears that one way to use strace is to use it with the PID for the process in question.  However, when I look at the output of Systems Monitor 3.4.1, I cannot find anything that relates to the program cups-pdf.

Please let me know the correct syntax for strace, and I will run it and post the results here.

John
I am not familiar with Systems Monitor. I usually do ps axfu in a maximized xterm if I am looking for a process by name. Doing that just now found
root      1950  0.0  0.0   7092  3016 ?        Ss   Apr21   0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf

Open in new window

That's all that runs on my system when there is no printing going on. Verify that is the case on your system (ps axfu will show if cupsd has any child processes). Assuming it hasn't, verify that the command pgrep cupsd gives you the same PID as shown by ps.
Assuming all still OK, you are ready to run strace. This produces a lot of output: in testing I found there were a great many uninteresting calls to time() and epoll_wait() so I excluded them, but there's still a lot of output
strace -f -p $(pgrep cupsd) -e 'trace=!time,epoll_wait' 2>cupsd_strace.txt

Open in new window

Wait until the error has occurred, then ^C the strace. Post cupsd_strace.txt as a file attachment (click "Attach File" next to the paperclip). If it's too big, gzip cupsd_strace.txt and post cupsd_strace.txt.gz
Forgot to mention - you need to be root when running strace, because cupsd is running as root.
Mr. Roe, thank you very much for your help.

Here is the command string I used:

root@john-dx2250M:/home/john# strace -p 890 -e 'trace=!time,epoll_wait' 2>cupsd_strace.txt

I had to rename file as this website would not let me name compressed file as you suggested and I had to uncompress it.

John
cupsd-straceexp.txt
Bad luck, you missed out -f (follow child processes) option which is critical. (I thought the file looked a bit small). If EE doesn't accept .gz, just stick an extra .txt on the end e.g. mv cupsd-straceexp.txt.gz cupsd-straceexp.txt.gz.txt. Then EE should accept it.

I meant for you to use the command exactly as I posted (swipe and middle-click in the xterm) - don't you have pgrep?

I do see the error message being received (from a child process)
Hello Mr. Roe:

Thank you for your patience.  The last time I was this deep into command line Unix was 1985-1987.

The command line you suggested did not work as expected.  The command line: strace -f -p 890 -e 'trace=!time,epoll_wait' 2>cupsd_strace.txt created a very sizeable file AFTER I called up the PRINTERS window and had CUPS-PDF do a print test page, print self-test page, and clean print heads.  Those three commands caused the file to be populated.

I have attached a zip file prepared with archive manager.

John
cupsd-strace-experts-exchange.zip
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello Mr. Roe:

Thank you for figuring out the cause of problems.

Both problems solved by command kdesudo konqueror and eliminating two extra groups (one listed as mark) using the file properties window in konqueror.  Now working with:
drwxrwx--t  19 john john      4096 Apr 24 23:40 tmp

I need to have tmp as john john as firefox will sometimes put downloads in tmp if there is no file association listed.

This might not be correct Linux, but it works.  My PCs are all single user.

John
Two other linux support forums were not able to solve this problem.