Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Creating Scripts to Enable Non-UNIX Users

Creating Scripts to Enable Non-UNIX Users to Access Acrobat Distiller Server 5.0.5 for UNIX

What’s Covered

Writing the Scripts

Making Folders Accessible to Windows and Mac OS Users

Adobe Acrobat Distiller Server 5.0.5 for UNIX includes watched folder commands that allow users to submit files from other UNIX workstations. However, these commands don’t work if a user wishes to submit files from a computer running Windows or Mac OS. This document can help you write scripts to configure Distiller Server 5.05 for UNIX to allow Windows or Mac OS users to submit files to a watched folder. Note that Adobe Technical Support cannot help you create or troubleshoot scripts, but provides this information as a courtesy to help you begin.

Writing the Scripts

To configure Distiller Server 5.05 for UNIX to allow Windows or Mac OS users to submit files to a watched folder, you need to write one or more shell scripts to do the following tasks:

1. Monitor the watched In folder for PostScript files.

2. Move the files to a working folder.

3. Instruct Distiller Server 5.05 to process the files.

4. Move the finished Adobe PDF files to an Out folder.

You then need to use third-party software to make the In and Out folders accessible to Windows and Mac OS users.

Monitoring the In Folder

The first portion of the script monitors the In folder. It can be run either as a process or as a CRON job that monitors the In folder approximately every minute.

Because UNIX doesn’t lock files while they are being copied, the script may prompt Distiller Server 5.0.5 to begin processing a PostScript file before the system finishes copying it from the source computer. If Distiller begins to process the PostScript file before it is copied, the job will fail. You can work around this problem with either of the following two methods:

— Configure the script that monitors the folder to check the size of the file, wait, and then check the size again. If the size is the same, the file has most likely been copied and can be distilled. This method may not work if the network pauses while copying files–a pause could incorrectly indicate that the file is copied.

— Configure the script that monitors the folder to check for the string “%%EOF” in the last line of the file. This method may not work for PostScript produced by legacy applications, or for files that don’t conform to the Adobe Document Structuring Convention (ADSC).

Moving Files to a Working Folder

After the script copies the PostScript files, it moves the files to a working folder. Moving the files to a working folder ensures that files in the In folder aren’t overwritten and ensures that users cannot access the files while they are distilled.

Note: Be sure to move the file rather than copy it, because moving is an instantaneous process in UNIX. An instantaneous process ensures that files aren’t overwritten and that users can’t access the files while they are distilled.

Instructing Distiller Server to Process Files

At this stage, the script sends commands to Distiller Server 5.0.5 to distill the file. The script can also send information from Distiller Server 5.0.5 to a log file. For information about commands that can be sent to Distiller Server 5.0.5, refer to the Distiller Server 5.0.5 manpage.

Moving Files to an Out Folder

After the PostScript file is distilled, the script moves the new PDF file to the Out folder. The script can delete PostScript and log files if necessary.

After the file is moved to the Out folder, the user can access the new PDF file (and the PostScript file, if it hasn’t been deleted).

Optionally, you can write a script that monitors the Out folder and removes any files that have been in the folder longer than a specified time (for example, two weeks). This script ensures that completed PDF files won’t accumulate in the Out folder.

Making Folders Accessible to Windows and Mac OS Users

After you write the necessary scripts, you must make the In and Out folders available to Windows and Mac OS users. To make the folders available, you need to use third-party software, such as the following:

— For Windows, you can use Samba, which lets you publish UNIX folders on a network, where Windows users can access them as if they were Windows folders. For more information, visit Samba’s Web site at www.samba.org .

— For Mac OS, you can use DAVE, which lets Mac OS users access Windows folders. Mac OS users can then mount Samba volumes. For more information, visit Thursby Software’s site at www.thursby.com/products/dave.html .

Note: Adobe Technical Support doesn’t support third-party software. For assistance, contact the software manufacturer.

Comments