How to "print to file" - print to ps file

I need to find out how to make a "printer" that will print to a ps file. I have done many searches and can find / have found CUPS-PDF which makes a printer that makes a pdf file on the desktop but I need the file before the pdf is made.

In sys 9 (long time ago my memory might be wrong ... !) - I could make a Virtual Printer - that would print to file but can't find an easy way to do it under CUPS and OSX.

And yes I am aware that in the print dialgue under pdf there is a pull down to create a ps file but I actually need a "printer" to do it so there's no manual intervention - ie: it might be partially scripted/automatored ...

Mitch

MacBook Pro 17" and 15" + 17" Intel iMac, Mac OS X (10.5.7), OS 10.5 - G5 Dual 2.3 GHz-4 Gb RAM

Posted on Jul 22, 2009 6:59 PM

Reply
12 replies

Jul 22, 2009 7:19 PM in response to Mitch

I made a copy of some instructions that were previously posted here or on the server forum with regards to printing to file. Apologies for not acknowledging the creator of this reply - I did not make a note of who they were...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It is possible to do a print to file that incorporates all the specific printer settings. It is a bit technical and cumbersome. I should note that enabling print to file is considered somewhat of a security hole. I am sure that is one of the reasons it is not enabled by default.

To print to file, you must first enable the feature for the printing system. In the Terminal, enter:

cupsctl FileDevice=Yes


Then restart the printing system for the change to take effect.

sudo killall -HUP cupsd


Now you need to add a printer that will actually print to a file. This must be done via the Terminal. There is no graphical user interface for this. You will need to supply the name for the printer (printerName), the location where you want the file to be written (path2file), the actual file name (filename), and the location of the PPD for the printer (path2PPD).

lpadmin -p printerName -E -v file:path2fileLocation/filename -P path2PPD


Once you actually print to the file, you will probably want to change the ownership of the file. When the file is created, it is owned by the system. You will probably want to change it to be owned by yourself.

sudo chown yourUserName:staff path2File


You will also want to change the name of the file because every file that is printed to file will have the same name. Any file of the same name will be overwritten.

Message was edited by: PAHU

Jul 22, 2009 7:27 PM in response to baltwo

Yep you're right- but my user wants to be able to tell a "printer" to print to a file like you would print to say a Xerox.

Say the printer is made and called - Print to ps - then all you'd need to do would be command p and enter and the file would be sitting in a folder ready for the next step of the process ... which he hasn't passed on to me as yet ... you know these workflow process people who streamline things and make people redundant ??? - Possibly me ...

Thanks baltwo - I've found something which might do it - http://code.google.com/p/i-v-p-cups/ ...

Any other suggestions - graciously accepted !

Mitch

Jul 28, 2009 10:03 AM in response to Mitch

Any solution will take some programming. The two approaches that might pay off are starting with the CUPS-PDF source code, change the output to PS and building a driver, and using Automator. However, Automator may not be easier than using the button. You might be able to attach an action to the output folder for CUPS-PDF that would save any file in it to another folder as a PS file.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to "print to file" - print to ps file

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