Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Enable hidden PDF workflow menu in 10.2.4 Print dialogs System
See this article at Apple for more info about enabling a new PDF workflow feature in the Print dialogs. Most info below is straight from above source - I can not take credit for it - but I thought it was a such a nice feature it needed to be listed here. To enable the new feature, create a directory named "PDF Services" in one of thse locations:
 /Library/PDF Services
 ~/Library/PDF Services
 /Network/Library/PDF Services
Then place items in the directory as actions to act on PDFs. You can use these actions:
  • a folder or an alias to a folder
  • an application or an alias to an application
  • a UNIX tool or an alias to a UNIX tool
  • an AppleScript file or an alias to an AppleScript file
[robg adds: I haven't had a chance to play around with this yet, but it looks like a very useful feature, especially for people who do the same thing to PDFs on a repetitive basis.]
    •    
  • Currently 3.00 / 5
  You rated: 2 / 5 (5 votes cast)
 
[27,670 views]  

Enable hidden PDF workflow menu in 10.2.4 Print dialogs | 56 comments | Create New Account
Click here to return to the 'Enable hidden PDF workflow menu in 10.2.4 Print dialogs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Enable hidden PDF workflow menu in 10.2.4 Print dialogs
Authored by: edalzell on Feb 18, '03 11:17:43AM

It looks (according to my research and some comments on Apple's Discussion boards) that in order to get for the folder in /Library to work, you *MUST* at least have an empty PDF Services folder in ~/Library.



[ Reply to This | # ]
Not impressed!
Authored by: frogmella on Feb 18, '03 11:43:18AM

I tried their example for making an email attachment, but it just crashes whichever application I was printing from!



[ Reply to This | # ]
Not impressed!
Authored by: bluehz on Feb 18, '03 11:47:29AM

Unfortunately - Apple has doen its usual "lets release a great technology and offer no support or docs for it" routine. The PDF crowd is REALLY excited about this though and many are furiously whipping up AS for use. Be on the lookout...



[ Reply to This | # ]
Not impressed!
Authored by: monickels on Feb 18, '03 12:02:39PM

Frogmella, where do you see these scripts being discussed? I'd like to see what others are doing before I duplicate their efforts...

---
<a href=http://www.worldnewyork.org>World New York</a>



[ Reply to This | # ]
Not impressed!
Authored by: Mr. X on Feb 18, '03 12:43:33PM

worked fine for me. Make sure you check the script (in script editor: click on the "check syntax") for typos. If you copy/paste from the HTML page, you might get a few formatting problems (I did :) like missing spaces, etc...



[ Reply to This | # ]
use alias of email program instead
Authored by: mclbruce on Feb 18, '03 04:50:23PM

There is no need to use the example script. Juat make an alias of your email program and put that in the PDF Services folder. You can name the alias whatever you want. This works for Entourage as well as Mail.app.



[ Reply to This | # ]
use alias of email program instead [not necessarily]
Authored by: richard_k_smith on Feb 18, '03 11:41:48PM
It is probably worth it to cut and paste the applescripts from the Apple Web site, and to correct the spacing errors that are somehow introduced int eh process, since you get the side benefit of having the new email message window pop up on your screen, as opposed to sitting in the background (although some may see that as a feature).

By the way, does anyone know how to have the "To:" field selected in the window? Sometimes it is (for example if you just drag a file to the Mail icon in the dock) but other times it isn't (for example if you ask Safari to email a selection using the services menu item).

If you're frustrated with the code that apple has posted and can't figure out how to get the spaces to work where you want them to, paste this into the Script Editor's "new script" window, and save as "Send via Mail" or something in the ~/Library/PDF Services folder:

on open these_items
	tell application "Mail"
		set the new_message to (make new outgoing message with properties {visible:true})
		tell the new_message
			tell content
				repeat with i from 1 to the count of these_items
					set this_file to item i of these_items
					make new attachment with properties {file name:this_file} at before the first character
				end repeat
			end tell
		end tell
	end tell
end open


[ Reply to This | # ]
Am impressed! File naming
Authored by: MtnBiker on Feb 20, '03 03:06:38AM

I'm impressed.

Is there a way to control the file naming. I want the attachment to have a descriptive name or the name of the file from which it was printed.

My most important use (at the moment, since I've just discovered this) is to convert a Word document for mailing a club newsletter. I have been printing to PDF and then attaching, but it's too easy to lose track of exactly which version one is sending out.

TIA

---
Hermosa Beach, CA USA



[ Reply to This | # ]
REVISED! File naming for Entourage
Authored by: MtnBiker on Feb 20, '03 03:09:30AM

Oops, I should have read the original script, it has this option.

But I really need it for Entourage, so can someone rewrite this for Entourage.

TIA

I couldn't find a way to revise my posting.

---
Hermosa Beach, CA USA



[ Reply to This | # ]
REVISED AGAIN! File naming for Entourage
Authored by: MtnBiker on Feb 20, '03 03:28:30AM

I'm afraid I have a mental block against AS
Below is the script for Mail-how to change for Entourage. I looked at both dictionaries, but don't see where the stuff for Mail comes from:
tell application "Mail"
set the new_message to
(make new outgoing message with properties
{visible:true, content:" "})
tell the new_message
tell content
make new attachment with properties
{file name:target_file} at
before the first character
end tell
end tell
end tell
-------
My previous posting were too hastily posted. It's way past time to get to bed. Thanks for any help

---
Hermosa Beach, CA USA



[ Reply to This | # ]
REVISED AGAIN! File naming for Entourage
Authored by: ewelch on Feb 21, '03 11:12:12PM

Entourage? That looks like the mail script. ;-)

---
--
Eric

Zen master to hotdog vendor. \"Make me one with everything.\"



[ Reply to This | # ]
REVISED AGAIN! File naming for Entourage
Authored by: swamiswami on Mar 07, '03 03:17:29PM
I couldn't get the script above to work in Entourage. Here's a script that seems to work for me:

on open these_items
	tell application "Finder"
		(*this part is to rename the PrintJob.pdf file*)
		repeat with aFile in these_items
			set a to the name of aFile
			display dialog "Enter file name for attachment" default answer a
			set the name of aFile to the text returned of result
		end repeat
	end tell
	
	
	tell application "Microsoft Entourage"
		set the new_message to (make new outgoing message with properties {attachment:{file:these_items}})
		open new_message
	end tell
end open


A few notes:
  • For some reason the dialog to rename the file doesn't come to the front automatically
  • Neither does the completed email message (although it is ready to go when you switch to Entourage)
  • I don't know why the repeat loop is needed since the print job should be a single file

Hope this helps someone.

-->Steve

[ Reply to This | # ]
Shell Script with a slightly better file name
Authored by: googoo on Feb 20, '03 10:17:17AM

Here is a shell script I wrote to send the PDF via Mail.app with a less cryptic filename (attachment.pdf). The script creates a copy of the PDF file with the new name and uses osascript to tell Mail.app to create a new message with the attachment. I bet that there is a better way to do this, though. (Maybe someone will post it here!)

-Mark

#!/bin/sh
aname=`dirname "$3"`/attachment.pdf
#set aname=/tmp/attachment.pdf
cp "$3" ${aname}

osascript << EOF
tell application "Mail"
set the new_message to (make new outgoing message with properties {visible:true})
tell the new_message
tell content
set theItem to (POSIX file "${aname}") as file
make new attachment with properties {file name:theItem} at before the first character
end tell
end tell
activate
end tell
EOF

rm ${aname}



[ Reply to This | # ]
Shell Script with a slightly better file name
Authored by: googoo on Feb 20, '03 10:25:10AM

It looks like I forgot to remove a line that I commented testing out the script posted above. You can omit the following line in the script posted above.

#set aname=/tmp/attachment.pdf

Or you can leave it in. It does nothing because it is a comment. Sorry for any confusion.

-Mark



[ Reply to This | # ]
Shell Script with a slightly better file name
Authored by: Thomas Kaiser on Mar 20, '03 05:20:07PM
Why not using the document title? The PDF Services provide you with
almost all the CUPS options, when working in the shell, so it's an easy
one.

I wrote a small CUPS backend to directly save into PS or PDF files and
use the CUPS options to redefine them into environment variables.
Maybe it's worth a look:

    http://user s.phg-online.de/tk/MOSXS/postscriptfile.gz

Regards,

Thomas

[ Reply to This | # ]
Am impressed! File naming IT WORKS!!
Authored by: acromac on Apr 25, '03 07:11:32AM

initial apple script work fine and lets you enter a file name for
the PDF you send via email.
The problem seem to be in apple script editor (may be a bug?)
when there is no blank line at the end of the script!
1 cut and past apple script source to the editor
2 add a blank line at the end
3 chek the script
4 save it as compiled at the right place (as indicated in apple
directives)
that's all folks

a man who switch recently



[ Reply to This | # ]
Cannot just use /Network/Library/PDF Services
Authored by: jolinwarren on Feb 18, '03 11:48:39AM
Just a note. The Apple document states that simply having the folder:

/Network/Library/PDF Services

will NOT enable the PDF Workflow menu. However, if you have the empty folder:

~/Library/PDF Services

then the PDF Workflow menu will appear, and anything in /Network/Library/PDF Services will be in the menu.

All in all, a great addition to the Mac OS's PDF cababilities!

Cheers,
Jolin

[ Reply to This | # ]
Cannot just use /Network/Library/PDF Services
Authored by: bbh on Feb 18, '03 12:06:23PM

I AM impressed. Simple enough. To start just copy the Apple email script from the link provided in the original hint. No big deal to put a "PDF Services" folder in the universal as well as the user Library. I added an alias to my saved PDFs folder in my documents folder. Whenever I pay for something online, I simply save the receipt page as a PDF. Now I can "one stop" save it instead of going through the normal two or more step navigation to my proper folder. Slick.



[ Reply to This | # ]
Enable hidden PDF workflow menu in 10.2.4 Print dialogs
Authored by: erikzred on Feb 18, '03 12:01:31PM

It would have been nice if they gave the example scripts for "Purpose PDf for Screen" and "Purpose PDF for Web". I find the Make PDF feature to typically make the files too big this looked like a feature that might be able to correct that. Anyone have any ideas for that script?

Erik



[ Reply to This | # ]
re: purpose PDF files for...
Authored by: mclbruce on Feb 18, '03 04:47:39PM

There are a few third party applications out there that will adjust settings in PDF files. I've seen discussions where people make an alias of one of these apps and put it in the PDF services folder.

If you do a search for PDF on versiontracker.com, you should find something that will work. On the other hand, if you wait two weeks and do a search on versiontracker, you will probably find something that does exactly what you want! :-)



[ Reply to This | # ]
re: purpose PDF files for...
Authored by: immoreel on Feb 19, '03 03:57:23AM

There's a script wich compresses your PDF's using PDF-shrink.

I found it at www.pdfplanet.com



[ Reply to This | # ]
re: purpose PDF files for...
Authored by: bluehz on Feb 19, '03 07:48:49AM

Just put an alias of PDF Shrink in your PDF Services dir. Then you just send PDFs directly to PDF SHrink. Look closeley though - if you aren't careful you'll lose teh PDF in teh /tmp dir.



[ Reply to This | # ]
Enable hidden PDF workflow menu in 10.2.4 Print dialogs
Authored by: RZambrana on Mar 20, '03 08:52:19PM
While I'm checking out Stone Studio's PStill to avoid going to Classic for PDF's, I wanted to see what I already owned that could do the job. Adobe says "Because the AdobePS printer driver doesn't offer native support for Mac OS X, you cannot use Adobe Acrobat Distiller in Mac OS X Native mode.", but if you need optimized PDF's, "Use Acrobat Distiller 5.x in Mac OS X Classic mode to create PDF 1.4 files" when Print Center can write PostScript anyway, makes NO sense.
It's not a perfect workaround, and not as many options are available as in Distiller, but it's all X Native... and I realize not everyone has Illustator...

What you'll need:
Mac OS X 10.2 Adobe Illustrator 10

1. Do the whole create a folder, "PDF Services" in /Library thing.
(I put aliases of this folder in my /users/user/library also, just to be safe...)

2. Drop an alias of Adobe Illustrator 10 into /Library/PDF Services.

3. Open the document you want an optimized PDF of, and go to your print window. Choose Illustrator 10 out of the list and Illustrator will automatically open with your document as a PDF.

4. Once open in Illustrator, you can change the document size if you didn't save to PDF with the correct page size, then "Save as...", choose PDF and you will have Optimization options, Formatting and Compression settings.

Not quite as many options as Distiller and you can't save option sets, but enough to get the job done without leaving X. I've looked all through the Illustrator Prefs and Package contents, but cant seem to find where you can add or modify Illustrator PDF Presets. When and if I do, I'll post it.

[ Reply to This | # ]
Using illustrator to open/save PDFs not recommended even by Adobe itself
Authored by: Thomas Kaiser on Mar 21, '03 02:55:30AM
Just for the records. Illustrator is not a PDF editor. Read what Dov Isaacs
from Adobe wrote on the pdfzone.com mailing list:

    FYI, Adobe Illustrator is NOT, repeat NOT, a general-purpose
    PDF file editor. When you "edit" a page of a PDF file with
    Illustrator, Illustrator in fact converts the contents to its own
    internal format (which contrary to urban legend is NOT PDF!).
    This conversion can be very lossy. The only PDF files that
    Illustrator can fully successfully "open" are single-page PDF
    files "saved" from Illustrator itself with the retain editability
    option selected. Otherwise, Illustrator can and does lose
    certain PDF objects, convert text encodings, convert
    colorspaces, etc.
    When you save such an edited page, Illustrator effectively
    deletes the old page, and adds a new page in its place.
    This has several ramifications: (1) The space used by the
    old page may not be reclaimed and (2) the generated PDF
    does not share any objects or definitions with content from
    other pages within the same PDF file, even if it did so prior
    to the edit.

Regards,

Thomas

[ Reply to This | # ]
More info....
Authored by: onyx2 on Feb 18, '03 07:03:29PM

I agree with erikzred though - there needs to be a OS X native script that can do "Purpose PDf for Screen" and "Purpose PDF for Web". The PDFs OS X make are HUGE!

Using a third party app (i.e. PDFShrink) to shrink them shouldn't be an option - especially when they cost $100+!!! - it should be native and built into OS X as an option.

mclbruce - do you know something we don't know??!! :)

Go here for a little more info:

http://developer.apple.com/techpubs/macosx/CoreTechnologies/graphics/Printing/PDF_Workflow/pdfwf_intro/index.html



[ Reply to This | # ]
other 3rd party apps
Authored by: mclbruce on Feb 18, '03 10:42:29PM

I see PDF Press, PDFCompress, and PDFshrink on version tracker. They are all in the $20 to $35 range. There is another app there that will convert PDF to JPEG. Throw an alias of that in the PDF Services folder and you could end up with a JPEG instead of a PDF.

I suspect that all of the people working on these various compression utilities will modify them for use in the PDF Services folder.



[ Reply to This | # ]
More info.... (PStill)
Authored by: Stone_Design on Feb 19, '03 09:36:32AM
PStill has been in development for over 10 years - at $69, with free upgrades for life, it does way more than "shrink" PDF:
  • convert any PS, EPS, and other conforming PostScript to PDF
  • watched folders for server-style work flow
  • repurpose & redistill PDF
  • combine any number of PDFs, PS's, EPS or images into one document
  • instantly make huge tiled posters
  • preference sets and much, much more!

Also - we let you download the app, and try it at full strength for 30 days!



[ Reply to This | # ]
More info.... (PStill)
Authored by: mikerose on Feb 21, '03 06:16:18AM

PStill is a great buy, especially if you compare to the full Acrobat
package (with, at 5.0.5, no Carbonized distilling functionality). Works
very very well, much less to worry about than setting up Ghostscript --
recommended.

(If you take the time to get Ghostscript working, it does the job as well.)



[ Reply to This | # ]
More info.... (PStill)
Authored by: bluehz on Feb 22, '03 10:09:48AM

I have tried every version of PStill ever released - and never once have I produced a usable PDF. And I am familiar with teh process - have been dealing with PDF's for well over 10 years now. Just not reliable if you ask me...



[ Reply to This | # ]
More info.... (PStill)
Authored by: david-bo on Feb 22, '03 05:34:01PM
Yeah right you have.

Acrobat has not been around for ten years yet.

http://forum.planetpdf.com/archive/67100.htm

[ Reply to This | # ]

View PDF via Safari
Authored by: ricell on Feb 18, '03 09:57:03PM
Check out the Browse local PDF's in Safari hint. Then:

  • Create an alais to Safari in the ~/Library/PDF Services directory.
  • Rename it 'View PDF via Safari'.
  • Now you can print preview through Safari (fast) rather than Preview (slow).

    [ Reply to This | # ]
  • Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: Arkham on Feb 18, '03 10:34:40PM

    Works very well with Cocoa eFax.



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: ssevenup on Feb 18, '03 11:39:34PM

    http://www.stone.com/PStill/PStill.html

    $69.00 at the moment, it will "distill" postscript and "re-distill" PDF's. It supports watched folders like Acrobat Distiller, only it's Cocoa. Aliasing the watched folder works very nicely in PDF Services. Multiple watched folders can provide a lot of flexibility in workflow. Andrew Stone's zealous support of OSX and his customer's needs alone make it worth a look.

    --MM

    ---
    Mark Moorcroft
    ELORET Corp. - NASA/Ames RC
    Sys. Admin.



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: jamunson on Feb 19, '03 08:14:42AM

    I followed all the steps..
    Put folder PDF Services in my library-made alias of mail app-put it in named it "send PDF via Mail."When I click on that option all I get is error while printing message.I dont have a printed hooked up to my Mac.Is that the problem?
    Jerry

    ---
    Jerry



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: mithras on Feb 19, '03 09:40:37AM

    Yes, that's the problem.

    Just make a dummy IP printer to activate the printing subsystem.

    ---
    --
    <a href="http://mithras.homeunix.net/downloads">my free OS X applications and scripts</a>



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: rgray on Feb 20, '03 02:54:11PM

    I must have the same problem - I'm rarely actually connected to a
    printer. So, how does one create a 'dummy IP printer'?



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: jamunson on Feb 21, '03 03:56:10AM

    How do you make a dummie IP printer?
    Jerry- and thanks for t he tip..

    ---
    Jerry



    [ Reply to This | # ]
    Not Working for Me
    Authored by: readparse on Feb 19, '03 12:42:11PM

    First of all, being a unix guy, I don't think in terms of aliases, but rather symlinks. I finally realized that a symlink wasn't going to do the trick, but an alias does. At least as far as launching an Application. OK, fair enough. I think a symlink oughta work, but no big deal.

    I would REALLY like to get a perl or shell script working, but no luck so far. And believe me, I've tried just about everything. I first tried just putting the executable script directly in ~/Library/PDF Services and nothing. Then when I realized that only aliases (and not symlinks) to applications worked, I figured maybe I had to use an alias to my script instead of having the script directory in the PDF Services directory (which would seem weird). Regardless, any way that I try it doesn't work.

    By the way, just so you know what I'm doing. In order to verify that the script is running, the only thing that the script does is create a file and put into the file all the arguments that the script got. In any case, the file isn't even being created, which indicates that the script is not running (it's supposed to create it in /var/tmp so permissions aren't an issue). I've tested the script and I know it should be working... it's just not.

    Any ideas?



    [ Reply to This | # ]
    Not Working for Me
    Authored by: Graff on Feb 19, '03 08:36:17PM
      I would REALLY like to get a perl or shell script working, but no luck so far. And believe me, I've tried just about everything.
    Well I thought that maybe you needed to name the script with a .sh extension so that the Finder knows to execute the script, but you don't need to. All you need to do is to make it executable with a "chmod +x filename" and the script will run just fine.

    I made up this little shell script to test this:

    #!/bin/sh
    #
    # Input parameter:
    # $3 - path to the document's location as a temp file

    mv "$3" ~/Desktop/


    This moves the temp file created by the PDF Services to the current user's desktop. Not too useful since using an alias to the desktop works more easily than using a script. The important thing is to remember that the PDF services is creating a temp document, storing it somewhere, and passing the file name and path to the shell as the the third input parameter.

    Go to this Apple documentation page for more info on creating PDF Workflow Options. Particularly interesting is this statement:
    A UNIX tool or tool alias triggers an action by the tool on the PDF file. Tools are passed three parameters:
       • the title of the PDF document
       • a string that specifies the CUPS options for the job
       • the path to the spooled PDF file

    This means that the name will be in the variable $1, the CUPS options will be in $2, and the file path will be in $3. Remember, since the file is in a temp directory you are responsible for cleaning it up, if you need to delete it (that is, your action on it didn't remove it from the temp directory) then just put this statement at the end of your script:

    rm -f "$3"

    [ Reply to This | # ]
    symlinks work for me
    Authored by: kyrrigle on Feb 20, '03 09:55:38AM

    mkdir ~/Library/PDF\ Services
    cd ~/Library/PDF\ Services
    ln -s '/Applications/Acrobat Reader 5.0.app' 'Open With Acrobat.app'
    ln -s ~/Documents 'Save in Documents'

    works like a charm...



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: bluehz on Feb 19, '03 01:17:07PM
    Does anyone here have any experience with the SWFTools and spefically pdf2swf? This converts a PDF to a Flash file. Can come in quite handy. I was attempting to create a PDF service like this:
    #!/bin/sh
    #
    # usage: pdf2swf title options inputfile
    #
    # INPUT PARAMETERS
    # $1 the title of the PDF document
    # $2 a string that specifies the CUPS options for the job
    # #3 the path to the spooled PDF file
    # see http://developer.apple.com/techpubs/macosx/CoreTechnologies/graphics/Printing/PDF_Workflow/pdfw$
    # for more info
    
    /usr/local/bin/pdf2swf "$3" -o "~/Desktop/$1.swf"
    open -a "Macromedia Flash Player 6" "~/Desktop/$1.swf"
    rm "$3"
    but the pdf2swf is failing looking for fonts it wants. If you haven't seen SWFTools - its defintely worth a look. Sveral nice tools including pdf2swf, jpeg2swf, png2swf, wav2pdf, swfcombine, and others. It compiles fine on OS X - although you will probably have to use Fink to install the needed libraries - see the website: http://www.quiss.org/swftools

    [ Reply to This | # ]
    Be careful with 3rd party apps/aliases
    Authored by: jecwobble on Feb 19, '03 01:30:35PM

    onyx2 provided a link to the developer site which contained this caveat about using 3rd party apps:

    "An application or application alias triggers an open event with the spooled PDF file. It is the application's responsibility to delete the file when the user closes the PDF document. Existing applications do not know that the PDF spool file should be deleted and so the PDF file is left in the /tmp directory." (empahsis mine)

    So you will likely end up with PDFs in your /tmp directory that you don't want. It might be best to use a UNIX script or AppleScript to interact with 3rd party apps so that you can remove the spooled PDF when you are done.



    [ Reply to This | # ]
    Be careful with 3rd party apps/aliases
    Authored by: bluehz on Feb 19, '03 09:38:57PM

    You will notice in my script above...

    rm $3

    that should remove the tmp file.



    [ Reply to This | # ]
    arguments to shell scripts
    Authored by: jzsimon on Feb 20, '03 01:52:09PM
    In my shell scripts, I found that using $3 did not give me the file name. Perhaps it's because I use a preset printer setting instead of the standard setting. I get a *very* long $argv, most of which are printer option settings. It is the last argument, "$argv[$#]", that contains the pdf file. Here's the code I use to convert the pdf file to postscript using the pdf2ps (courtesy of fink) command and save the ps file on the desktop:

    #!/bin/tcsh
    set outDir = ~/Desktop/
    set infile = "$argv[$#]"
    set outfile = "$outDir""$1:t:r".ps
    set logfile = "$outDir""$1:t:r".pdf2ps.log
    touch "$logfile"
    echo argv:\n$argv >>& "$logfile"
    \mv -f "$infile" /tmp/pdf2ps-Tmp.pdf >>& "$logfile"
    pdf2ps /tmp/pdf2ps-Tmp.pdf /tmp/pdf2ps-Tmp.ps >>& "$logfile"
    \mv -f /tmp/pdf2ps-Tmp.ps ~/Desktop/"$1:t:r".ps >>& "$logfile"
    \rm -f /tmp/pdf2ps-Tmp.pdf /tmp/pdf2ps-Tmp.ps >>& "$logfile"
    (Note that this code does still has a debugging logfile and does not delete the pdf file as it should.)

    [ Reply to This | # ]

    arguments to shell scripts
    Authored by: bluehz on Feb 20, '03 11:56:48PM

    I was trying the same thing with pdf2ps and or ps2pdf and having no luck - it was balking at the file. Any tips?



    [ Reply to This | # ]
    arguments to shell scripts
    Authored by: jzsimon on Feb 24, '03 09:59:21AM

    Try my script above for using pdf2ps. It works very nicely for me.

    If you have trouble, you can always examine the log file it creates on the Desktop for errors, or problems with which argument (3rd vs. last) contains the file name.

    p.s. Despite my last comment in the code posting, it does correctly remove the temp pdf file.



    [ Reply to This | # ]
    arguments to shell scripts
    Authored by: ssevenup on Feb 26, '03 05:41:23PM

    I get "TERM_PROGRAM: Undefined variable." in the Console log.

    ---
    Mark Moorcroft
    ELORET Corp. - NASA/Ames RC
    Sys. Admin.



    [ Reply to This | # ]
    arguments to shell scripts
    Authored by: jzsimon on Feb 26, '03 05:59:20PM

    That's a different problem. Read this (and comments) to solve that bug:
    http://www.macosxhints.com/article.php?story=20020826003806202



    [ Reply to This | # ]
    arguments to shell scripts
    Authored by: ssevenup on Feb 27, '03 04:17:23PM

    Thanks for the tip, I solved that and now unless I comment out the line that dumps arg#2 into the log, the script pukes with "unknown user ./" or some such after dumping the majority of the CUPs arguments. Otherwise I can produce a .ps file, and even pipe it back through ps2pdf. I am posting a seperate note on that subject. By the way the tips for setting up the tcsh environment worked, but I had a heck of a time forcing the path to include "/usr/local/bin". I actually had to add it with ~/Library/init/tcsh/rc.mine because it wasn't getting picked up as expected?

    ---
    Mark Moorcroft
    ELORET Corp. - NASA/Ames RC
    Sys. Admin.



    [ Reply to This | # ]
    oops: arguments to shell scripts
    Authored by: jzsimon on Feb 25, '03 12:25:55AM

    Oops. $argv[$#] is the same thing as $3 in this case. I didn't realized that $2 was a single argument of many space-separated strings.

    I blame apple for making their documentation hard to find. ;)



    [ Reply to This | # ]
    Enable hidden PDF workflow menu in 10.2.4 Print dialogs
    Authored by: vlipper on Feb 19, '03 04:54:23PM

    Nice to see this feature becoming visble.

    I have one question for those who have tried the email example: do you also get attached "Print jbo.pdf" files? This happens when I try to mail old documents from whatever program. When I do this with new files, they are 'embedded' in the mail message. Any ideas?

    vlipper

    ---
    Communication is coming on strong - j. hendrix



    [ Reply to This | # ]
    Almost works ... except email
    Authored by: Greedo on Mar 19, '03 12:02:14PM

    The following links work for me:

    cd '~/Library/PDF Services'
    ln -s '/Applications/Acrobat Reader 5.0' 'Open with Acrobat'
    ln -s ~/Desktop 'Save to Desktop'
    

    But this doesn't:

    ln -s '/Aplplications/Mail.app' 'Send via Email'
    

    I try printing with that service, and nothing happens. Mail.app doesn't even launch. Any ideas?



    [ Reply to This | # ]
    Almost works ... except email
    Authored by: xeroply on Mar 19, '03 04:14:05PM

    Try using an alias to Mail.app (created with Command-L in the Finder) instead of a soft link (ln...).



    [ Reply to This | # ]
    That worked ... thanks!
    Authored by: Greedo on Mar 24, '03 11:29:19AM

    Seems to have worked. Don't know why that would make a difference though.



    [ Reply to This | # ]
    Alternatives to and Hints for "PDF Services"
    Authored by: Thomas Kaiser on Mar 20, '03 05:49:08PM
    > See this article at Apple for more info about enabling a new PDF
    > workflow feature in the Print dialogs.

    Two things to mention:
    1. Not each and every application can produce PDF on their own.
      Currently there exist some DTP-centric apps that produce (high end)
      PostScript and do not rely on the Quartz PDF routines. With those apps
      both the "Save as PDF" feature and the "PDF Services" accessible via the
      print dialog won't work (ie. Adobe Illustrator)

    2. You can save some time in the print dialog, if you directly print into
      PDF files. All you need is a mechanism that prevents the CUPS filter
      system from converting Quartz' PDF output back to PostScript (either by
      not assigning a PPD or specifying raw output in the PPD - see below) and
      a backend mechanism that is able to handle printer output of type PDF
    I wrote a small CUPS backend for this purpose and enhanced that the
    last days. Have a look at another hint for more details:

    When you want to use the Quartz PDFs in the same way as with "PDF
    Services" you must CUPS stop filtering printjobs of type
    "application/pdf". This can be done in different ways:
    1. Specify "application/pdf application/vnd.cups-raw 0 -"
      in /etc/cups/mime.convs. Note: This is not a good idea as it will
      permanently prevent PDFs from being filtered for use with printers

    2. Do not assign a PPD file to a printer. To do this, you can not use
      PrintCenter as it does not allow to choose "None" (it defaults to a very
      simple generic PPD instead)

    3. Use a PPD that forces the correct filter mechanisms. To prevent PDFs
      from being converted to PostScript, just use

      *cupsFilter: "application/pdf 0 -"

      in the PPD. To support apps that do not produce PDF output directly you
      should also add

      *cupsFilter: "application/pictwps 0 pictwpstops"

      (you can have a look at an example PPD for more details:
      http://users.phg-online.de/tk/MOSXS/postscriptfile-stuff/RAW2PD F.PPD)
    Regards,

    Thomas

    [ Reply to This | # ]
    ...Illustrator PDF's via PDF Services hint
    Authored by: RZambrana on Mar 22, '03 05:24:26PM
    All due respect, but Adobe also claimed Dimensions 3.0 was the industry standard for 3-D. Can't take everything they say as gospel.

    For the record, I probably should have included this in my post...
    I have used this method successfully for 5 ads that went to press with NO issues. This method WILL NOT work for Multi-page PDFs. This IS NOT A PREFERRED METHOD only a workaround, and if you're working with Illustrator 10, Illustrator 10 DOES use true PDF, as you have to select an option to NOT use PDF as clip format in Illustrator and will not retain Illustrator formatting if deselect it in the save options list, but still, it IS NOT the best answer, just a workaround from a print production standpoint.

    After having used PStill by Stone Studios for a few days now, its definitely a better answer to the Distiller dillema in X, and would frankly beat Distiller hands down if it could import existing Distiller .joboption files...

    If I misled or misinformed anybody as to the limited usefulness of the Illustrator workaround, I sincerely apologize.
    -rz

    [ Reply to This | # ]