|
|
Automagic pdf without Classic?
This hint is wonderful, thanks!
Automagic pdf without Classic?
I added some more features (to work with distiller, PStill and even
GhostScript)
http://user s.phg-online.de/tk/MOSXS/postscriptfile.gz A brief description of the new version: What is it? The main purpose of this backend is to have the ability to print into watched folders, so that output files can be postprocessed automatically by tools like distiller, PStill, GhostScript, whatever... How do I use it? To use it you simply copy it into your CUPS backend folder (on MacOS X usually /usr/libexec/cups/backend/), ensure, that it is
executable and restart the cups daemon (eg. by sending it a SIGHUP signal to reread it's configuration) Ah... and you'll have to configure a bit inside the script: $TARGET_BASEDIR --> should be set as a
"base dir" for hotfolders. All paths are relative to that $MAX_FILENAME_LENGTH --> defines how
long filenames should be. This is useful if you want to postprocess the files by e.g. distiller running in the "classic environment" $DEBUG --> set to TRUE to get some debug
messages$DEBUG_LOG --> This is where the backend
will write log messages to$GROUP --> this settings affects the group
ownership of the files$GS --> Specify the path to your GhostScript
executable if you want to drive the backend in ghostscript mode (see below) Operational details: The behaviour of the backend depends on how it is called. If you save it as postscriptfile, than all it advertises when you invoke the PrintCenter (while holding down [option]) is a basic print-to-disk "device". You have to take care, that you encode the path names you want to use correctly. If the backend will be called as "distiller", then it will advertise all subfolders of $TARGET_BASEDIR that meet
specific criteria (an
"In" folder and a folder.joboptions file inside). If it will be called as "pstill" then it searches for a "ProcessedPS" folder and an options file, that ends with ".pPref". If called as "ghostscript" then it will look for a folder called "Finished" and an options file called gs-options.txt. In this special case, it will not only store the resulting PDF or PS file into the watched folder but instead invoke GhostScript with the specific settings. For a detailed description read below. What if I want to use the backend for more than one sort of postprocessing mechanism? Simply create symlinks to the basic backend, as the functionality only depends on the name: [imac-2:/usr/libexec/cups/backend/] tk# ls -la
How to drive GhostScript? As there currently doesn't exist a hotfolder scheme for GhostScript, we simply define our own :-) Create inside $TARGET_BASEDIR a new folder,
containing a
subfolder called "Finished" and a simple textfile called gs-options.txt. In this file you write the settings you want gs to use, eg. -q
(It's strongly recommended that you always use the "-q", "-dNOPAUSE" and "-dBATCH" options because otherwise unexpected behaviour will occur) For a more detailled description of the settings consult the GhostScript documentation please. Does this make sense at all? Maybe ;-) You should know, how printing in MacOS X works. Applications have basically two ways to create output that will be postprocessed by printer drivers: - PostScript (as we know it from former MacOS releases) - PDF (the "standard" way in MacOS X) As PDF is the basic technology for the Quartz display engine, most apps simply create printer output by using Quartz. The result is a PDF file (a mixture between PDF 1.2 and 1.3) that can be opened directly by any any PDF 1.3 aware viewer or renderer. When printing through CUPS these PDF files will be converted to PostScript when the specific printer queue has been assigned a PPD file (as it happens always when you use the PrintCenter for adding new printers). Search for a line with "cgpdftops" at the top of such PS files, to be sure how it has been created. Those applications that produce still PostScript output directly (mostly from the desktop publishing sector), will write "pictwpstops" instead in the "%%Creator: " comment. As you see, normally you will convert PDFs from PDF to PostScript (invoked by a CUPS filter) and then after leaving the spooling system back to PDF by a postprocessing mechanism. Doesn't makes always sense, except you're using applications that produce PostScript... Thomas Kaiser, 2003/03/15 |
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.05 seconds |
|