Moonshine2: The art of Scripting to make your own Distillery
Moonshine: This name is a slight play on the theme of "the distiller" -- arguably the engine of Acrobat since version 1.0. The piece of magic that converts reverse-polish-notation, stack-based Postscript to PDF -- Moonshine just seemed like a logical extension of the name.
Support for PDF across Adobe applications is extensive. Saving out of Illustrator, InDesign through to rendering PDF into bitmaps in Photoshop: PDF is a well-supported exchange format between Adobe applications.
Rather than using Actions, which are step-by-step automation of serial processes, scripts provide a deeper level of control and conditionality; branching if a condition occurs. New in Photoshop CS is the ability to create user-interface elements to further customize the executed actions.
Installing the Script:
The Moonshine2.zip file has two contents:
Install this file into the folder "Scripts" inside the "Presets" wherever Photoshop CS is installed on your Mac or PC.
After restarting Photoshop, this script will appear under the "File > Scripts..." menu. Keyboard shortcuts (Edit > Keyboard Shortcuts) can be assigned to scripts, integrating them into the Photoshop application.
This script can "live" anywhere on your PC; its function is to launch the script from the Windows shell environment. Please note the line underneath the text in all-caps: you may need to set the path to the script accurately.
Launching and Using Moonshine2
Select Moonshine2 from the File > Scripts menu.
The first dialog asks for the source folder/directory. This is where the "watched" folders reside.
Watched Folders, sometimes known as Hot Folders, is a feature added to Distiller in version 3 and only found in the Professional versions of Acrobat 6 and 7. By monitoring a particular folder, the Distiller starts the PDF generation process once a Postscript file or Encapsulated Postscript File is dropped into the "in". Once processed, the completed PDF (and the processed Postscript file) is placed into an "out" folder. For more information, read "Watching Folders" in Applying Custom Distiller Settings
The second dialog asks questions as to the:
- dots-per-inch (DPI) of the JPEGs Moonshine2 will create. For web-based images, a resolution of 72 DPI (the default) is OK.
- width of JPEGs: the width in pixels is the scale the PDFs will be rasterized to when opened by Moonshine2. PDF, as a scalable format, can be small or as large as you need.
- quality of the saved JPEG: this slider permits the selection of the saved JPEG. The higher the number, the greater the file size and the quality.
- Once these values are chosen, Moonshine2 looks in the "In" folder for PDFs
- Opens them at the width and resolution as requested
- Saves the resulting JPEGs, with the same file name but different file extension, into the :"Out" folder
- Moves the PDF into the "done" folder
When launched from the MoonshineStart.vbs script, the path is set depending on where the script is installed on your computer. Default values are passed into the Moonshine2.js from variables as defined at the top of the VBscript file.
Next: Inside Moonshine2 (page 2 of 2)