Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

CUPS Error message when printing from some applications

Hi. I've got an issue when printing from some apps, but not others. Up to a few months ago everything was fine, then it started when Word would not print direct to my printer (Epson Stylus Pro 3880), not a big deal as I don't use it a lot and could print it through Safari if needed. Then more worryingly as a designer I found that PDFs stopped printing direct too, again I can print through Safari and Preview. Last night I installed a firmware update and now InDesign (CS4) is refusing to print!! Not great as printing via Safari/Preview doesn't give me the same level of control over my prints. Just checked both Illustrator and Photoshop and they both print okay. I get the same error code each time "error: /usr/libexec/cups/filter/pstoraster failed" Does anyone know what could be causing this?

Thanks in anticipation. D

Macbook Pro, Mac OS X (10.6.4), 2.5 GHz Intel Core 2 Duo, 2GB 667 MHz DDR2 SDRAM

Posted on Oct 12, 2010 5:25 AM

Reply
15 replies

Oct 12, 2010 6:35 AM in response to deematso

Welcome to the Apple Discussions area.

This is a strange error as OS X does not install the pstoraster filter. To the best of my knowledge, Ghostscript is the only software that installs this filter. Did you ever install Ghostscript? Do you need Ghostscript for any of your printers to work?

My recommendattion would be to first (re)install Ghostscript from http://www.linuxfoundation.org/collaborate/workgroups/openprinting/macosx/foomat ic. If you need Ghostscript to run your printer, then you should be finished.

If you do not need Ghostscript, then run the uninstaller that is included with the Ghostscript package. That should resolve your problem.

See a similar thread about this at http://discussions.apple.com/thread.jspa?messageID=12230105&#12230105

Oct 12, 2010 7:32 AM in response to Matt Broughton

Hi Matt. Thanks for the welcome and the advice.

Yes I used Ghostscript for a previous printer and before posting this I did try uninstalling without any success after reading the post you mentioned. I've just tried it again – this time with a reboot and I'm HAPPY to say that everything works perfectly.

This has been bugging me for a while, now I can get on with some work and pay some bills.

Thanks skipper : D

Nov 15, 2010 2:35 AM in response to Matt Broughton

Hi Matt

I'm having problems again printing from PDFs, not the same problem as last time but just as frustrating. Here's the message shown in the Console:

15/11/10 10:20:40 am cupsd[658] sandbox cache error: database is locked
15/11/10 10:20:42 am sandboxd[666] rastertoescp(658) deny file-write* /private/var/spool/cups/Library

This mean anything to you?

The issue flared up after my system crashed following the latest OS X (10.6.5) update which caused a kernel panic and I was forced to restore the HD from backup. After the restore most things were back to normal but I had to reinstall Safari and Acrobat as they kept crashing. I've run Disk Warrior and repaired all permissions but neither showed up any major issues.

I hope you get this and are able to offer some advice like last time.

Many thanks, Damian

Nov 16, 2010 5:32 PM in response to deematso

deematso wrote:
15/11/10 10:20:40 am cupsd[658] sandbox cache error: database is locked
15/11/10 10:20:42 am sandboxd[666] rastertoescp(658) deny file-write* /private/var/spool/cups/Library


This error combined with your getting the /usr/libexec/cups/filter/pstoraster failed error again along with having to reinstall some other software indicate to me that something went wrong when you restored your system from your backup. There may have been an error when restoring or perhaps your backup was corrupt or too old.

You could try:
1. Delete the /Library/Printers/EPSON folder
2. Delete the /Library/Caches/Epson folder if present
3. Reset the printing system as outlined in http://docs.info.apple.com/article.html?path=Mac/10.6/en/14001.html
4. Reinstall the Epson drivers and re-add your printer.

You should also reinstall and then uninstall Ghostscript to clear the "/usr/libexec/cups/filter/pstoraster failed" errors.

Feb 15, 2011 6:02 PM in response to mstrhans

I believe the correct solution is to link pstocupsraster to pstoraster in /usr/libexec/cups/filter using the following on the command line:
***********************************
cd /usr/libexec/cups/filter
sudo ln -s pstocupsraster pstoraster
************************************

You have to rename the pstoraster which may already in in the /usr/libexec/cups/filter directory before doing the above. The pstoraster that was in the directory did NOT from APPLE and probably came from a ghostscript install. (You can "cat pstoraster" to see that it's a script file that is not from APPLE). Doing the above commands should fix any pstoraster and printing with Adobe problems.

Note: I did this and it fixed my "cannot print using Adobe Acrobat Reader" problem. For some stupid reason, Adobe uses the pstoraster filter to print to my HP printer.

Feb 16, 2011 6:00 PM in response to cytan

cytan wrote:
I believe the correct solution is to link pstocupsraster to pstoraster in /usr/libexec/cups/filter


I must disagree with this being the correct solution. The pstoraster filter is indeed part of Ghostscript. The error that pstoraster failed really indicates that the installation of Ghostscript is broken.

You should fix the problem, not create a work around. The correct solution is to fix Ghostscript. You can do that by reinstalling Ghostscript. If you do not need to have Ghostscript installed, you can use the uninstaller. The purpose of first installing Ghostscript is to make sure that the package receipts are present on the system so that the uninstaller will function properly.

Note: I did this and it fixed my "cannot print using Adobe Acrobat Reader" problem.


I am glad that your solution worked for you.

For some stupid reason, Adobe uses the pstoraster filter to print to my HP printer.


Adobe does not specify what filters to use. That job is up to the printing system. The printing system looks to see what type of input is coming from the application. In the case of Adobe applications, this is almost always PostScript. The printing system then looks at the printer's PPD to see what sort of output is needed for the driver. In this case it is a raster output. Next, the printing system decides on what filters to use by using the chain of filters with the "lowest cost" value based on all the appropriate filters at hand. Each filter has a "cost" associated with it relative to the amount of system resources it uses.

When Ghostscript, and therefore pstoraster, is present, the filter chain to get to raster output is pstops -> pstoraster. When Ghostscript is not present, and therefore pstoraster is not available, the printing system will use the filter chain pstoappleps -> pstocupsraster.

If you create a symlink for pstoraster, then you are imposing your own directions on the printing system.

Feb 17, 2011 5:11 AM in response to Matt Broughton

Hi Matt,
I completely disagree with you that it is not Adobe's fault:
(1) Removing ghostscript and pstoraster and reinstalling the hp driver does not make Adobe use the correct filter. In fact it continues giving an error because it can't find pstoraster.
(2) pstoraster is a LINUX thing, not an APPLE thing. A clean Snow Leopard install does not have pstoraster. Why would our printer subsystem even look for pstoraster?
(3) No other app uses pstoraster for printing (at least on my system) besides Adobe reader, therefore I speculate that because Adobe reader is cross platform program, the code just ifdef'd in the LINUX cups system and assumed that it is the same as for mac os x.
(4) Doing a "proper" install of ghostscript whould require an install of perhaps esp-ghostscript subsystem from cups originally coded for LINUX. But we already have cups from APPLE which does not use ghostscript which I think is totally unnecessary.

Therefore, I believe this work around is the best way to go until Adobe fixes the problem.

Feb 25, 2011 5:55 PM in response to Matt Broughton

Matt,

A little follow up on this discussion you and cytan had.

I have been pulling my hair out trying to print from Parallels 6 on my iMac, kept getting the exact message 'Error: /usr/libexec/filter/pstoraster failed'.

I searched all over the web for a solution, and found cytan's post on a different forum. Tried it to no avail.

Than I remembered that the same error message popped up when printing out of either Adobe Reader or Adobe Acrobat.

I extended my search and found your post here on the Mac Forum.

Thank you, Thank you... It worked perfect. I now can print directly out of Adobe instead of using a workaround with 'Preview'.

In Parallels I used a 'Bonjour' installer for Windows XP and everything prints like a charm.

Thanks again.

Wolfgang

Aug 4, 2011 9:39 AM in response to cytan

cytan,


As Matt pointed, an application printing to CUPS controls only the format of the input. It has no direct control over the chain of filters inside the printing pipeline. Acrobat isn't coded to use pstoraster, it is simpling submitting postscript to the print queue. In an un-molested Apple supplied CUPS setup, that works fine.


What is going on is that the CUPS system configuration got mangled by some third party bits. In the Unix tradition, the configuration is fairly transparent, in the form of plain text files. In particular, in /usr/share/cups/mime you will find out exactly how the filter pipeline is configured via a table of what filter to use to convert data between two mime types. So we can inspect how the filters are setup and how a broken pstoraster is getting into the chain.


I don't have a handy "before mangling" state, but I can clearly see the Apple specified filters to be invoked when the input data is application/postscript (in apple.convs). I can also see a conflicting filter definition referencing the broken pstopdf (in mime.convs) but with a higher precedence, overriding the apple specified filter. This is why, in reference to your points #1 and #2, simply removing pstoraster fails, because the filter configuration is what needs fixing.


On my system, I found the pstoraster filter to be a shell script referencing a MacPorts install of ghostscript. I've since removed MacPorts, but that evidentally left the CUPS configuration in this broken state. Without knowing exactly how the CUPS system was put into the broken state, fixing it can be a bit tricky. Another posting suggested replacing the broken pstoraster with the Apple supplied equivalent of pstocupsraster. That might work, but it would be better to simply remove the conflicting filter specification, which on my system is this bit in /usr/share/cups/mime/mime.convs:


# pstoraster is part of GPL Ghostscript...

application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster


Removing that will restore the Apple specified filter chain for postscript input. With the filter specification gone, you are free to remove the pstoraster filter itself.


On wating for Adobe to fix this...


Acrobat provides enough things to scream about without pinning non-Acrobat problems on it as well. Not only is this problem not the fault of Acrobat, but suggesting that Acrobat should reach into a CUPS system broken by some unknown third party and fix it is only going to complicate the situation by having two third party products trying to un-do each other's configuration of a system resource. Do you really trust Adobe to fiddle with system components it doesn't own? No, I didn't think so. Adobe installers and updaters have enough trouble with the stuff they do own.


So, why does this problem only seem to affect Acrobat (your point #3)? I suspect it is simply that Acrobat is in the minority of submitting Postscript to the print queue. Any print job produced via CoreGraphics APIs is going to enter the system via a different path (namely, PDF), but the Postscript method is completely legitimate and any application that submits Postscript will be affected in the same way as Acrobat.


I hope this sheds some useful light on what is really going on with this problem.


-john

Jan 11, 2012 3:33 AM in response to John Fieber

Hi Guys,


i have the same problem, but none of the solutions works.


The problem started in august. I buyed a new iMac with Lion and migrated my old system from my macbook with the Adobe Creative Suite.

Since this event I can't print out of any Adobe product. OS X Preview works fine.


I tried to install and uninstall Foomatic and Ghostscript, but it did not help.


Any ideas?


thanks

CUPS Error message when printing from some applications

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.