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

Click here to return to the 'Ability to choose output file name and more' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Ability to choose output file name and more
Authored by: Sveto on Jan 19, '10 08:17:45AM

Thank you very much Krioni. That is exactly what I was requesting. I have only 1 question. I was unable to understand where the temporary uncompressed file was located and if it was deleted after the compression. Did I miss something?

[ Reply to This | # ]
Ability to choose output file name and more
Authored by: Krioni on Jan 19, '10 10:26:39AM

Mac OS X creates the temp file itself in a temp directory that gets cleaned out automatically after a while. When you choose "Preview" from the print dialog, it's the temp file that is opened by Interestingly enough, Apple made the usual command-click-on-window-title-to-see-file-path trick NOT work when you do this in However, if you toss an alias to Skim (or some other PDF reader) in your PDF Services folder, and send the PDF there instead of, you'll be able to command-click the window titlebar to see where it creates the temp file.

That meant I didn't have to clean up the temp file, since it is handled in the Mac OS X approved manner. In your original hint, you may have been able to do the same thing. I think $1 is the path to the temp file, so perhaps you could have just operated on it instead of using cat and a redirect to send it to your temp location. Of course, you'd then need to "mv" the output file (and perhaps remove the "-o" that gets tacked into the file name) to your desired destination.


[ Reply to This | # ]