|
|
10.4: Create a virtual PDF printer
How to setup a virtual printer on MacOSX 10.4 (Tiger).
I decided to condense the Virtual Printer HOW-TO on macosxhints.com, since it spans many postings and deals with both 10.3 and 10.4, and therefor was a little too confusing at first. NB: I have installed and tested this on a updated 10.4.2 system (Powerbook), and it works as advertised. (Please excuse my liberal use of cut and paste from the previous postings.) Why create a virtual printer?I know that you can always select "Save as PDF" when printing, but I had a situation where I wanted to be able to print to PDF without having to go through the Print dialog. Also sometimes the application disables "Save as PDF". Here's what you need to do (in a Terminal): - Copy the included script to: /usr/libexec/cups/backend/pdf - Make it executable by everyone: % sudo chmod a+x /usr/libexec/cups/backend/pdf - You must restart the CUPS daemon, so it finds your new backend and model : % sudo killall -HUP cupsd - Now you can configure your virtual printer using the Printer Setup Utility. - In the Printer Setup Utility click the 'Add' button. - In the 'Printer Browser' window that opens you hold down the key while clicking 'More Printers...'. - Then, finally, you will see the 'Advanced' option in the drop-down menu at the top. - After you've selected 'Advanced' you can select 'PDF Writing' from the 'Device:' drop-down menu. (This comes from the "pdf" script that you added to /usr/libexec/cups/backend/) - For "Device Name:", give it something descriptive: like PDFWriter or VPrinter. - For the device URI, use "pdf://tmp" , it is a good choice as it gets cleaned out automatically when you restart.If you want to put the files somewhere else, specify it. - For the printer model leave it as Generic.(I deleted the reference to using the Adobe distiller driver that was present in the original posting.) - Click on Add and you are ready to go! The script creates a log file (/tmp/pdf.log) each time it prints, which might be helpful if something goes wrong. The script checks to see if the output file exists, it creates a new name. ( This was important because printing multiple worksheets out of excel causes each worksheet to be seen as a unique print job, and each subsequent sheet overwrote the previous one.) Remember your files will be printed to /tmp and will therefor be lost if you don't copy them to somewhere safe before you restart the system.(/tmp get cleaned out at system restart.) In OSX 10.4 (Tiger):Create a SmartFolder on the Desktop, that searches /tmp for PDFs and call it "PDFWriter_spool". Your printed files will always be easy to reach this way. Here is the latest version of the script:(version as of July 16 2004 by n9yty)
10.4: Create a virtual PDF printer
This is a great hint and works really well. I have one problem though - the owner of the file stubbornly remains as root. I have checked through the tail end of the code and inspected the logfile but no avail. The log file shows $2 as my corrrect username. The chmod step works fine, $2 is obviously !="" so can't understand while file remains root:staff. This is really relativly minor but a real annoyance! I see this problem has been reported previously.
10.4: Create a virtual PDF printer
This is a little late, but change the chown line to:
10.4: Create a virtual PDF printer
I changed
chown $2 $OUTPUTFILENAME to /usr/sbin/chown $2 $OUTPUTFILENAMEand it worked. (Better than giving rights to everyone.)
10.4: Create a virtual PDF printer
Not working in 10.4.5.
10.4: Create a virtual PDF printer WORKS
Works like a charm on latest 10.4.x as of June, 06.
MINOR PROBLEM: Even though, I made sure to edit the chown line of the above posting to add the path (/usr/sbin/chown $2 $OUTPUTFILENAME) the doc is still owned by root. Anybody good at scripts who can tell me how to change that chown line or chmod line? WORKAROUND: Open the PDF, save it to another folder somewhere. Create a chron job to clean the originals nightly. + Also, got it to work from my Windoze XP box. Here's what I did: - After following the above instructions to the letter (well, almost, I did set the print path to inside a SAMBA shared directory), I opened up the Control Panel and verified that the PDFWriter was shared (under Printers & Faxes). - I also went to the CUPS control panel (browse to 127.0.0.1:631) to verify that the PDFWriter was there. - On WinXP, I clicked on Printers and went through the Add Printer 'wizard', selected Network Printer. - Entered my server's IP address: http://ipaddress:631/printers/PDFWriter - Selected print driver by GENERIC and used the "MS Publisher Color Printer" driver. Works like a freakin charm! Thanks to all those above who have been hammering this one out.
10.4: Virtual PDF Printer (ownership)
Duh, To answer my own above "PROBLEM" |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.15 seconds |
|