Integrating Print Distributor and Adobe Acrobat
Note: If you are using version 4.0 or later then this process isn't necessary, you can use the Distiller action.
In this article I want to explore how you can configure Print Distributor to work with Adobe Acrobat Distiller to create PDF documents on a server.
It is important to note that Acrobat is licensed according to the number of users, the mechanism we are going to use here does not remove this requirement.
To setup this configuration you will need to install the current version of Print Distributor as well as a full copy of Adobe Acrobat, a trial version is available for download from Adobe's web site. Adobe Reader isn't enough.
The first stage of the setup is to install a PostScript printer driver, Adobe have a generic PostScript driver for free download from their web site.
Once you have the generic PostScript driver installed we need to create a new virtual printer in the Print Distributor manager application, select a name for your printer and select the generic PostScript driver. Don't use the Distiller driver as it won't work.
We are going to create three actions which will in turn write out a PostScript file, convert that file to PDF and finally clean up some of the mess Distiller leaves behind. So start by adding a Write File action and entering a path to write out a .PS file, in this case we will write to C:\Archive\?UN?\?SN?.ps so each user gets their own folder of PDF files.
Now we will add an action to call Distiller from the command line with the parameters to convert the PostScript file to PDF format. Add a Run Program action and click on the browse button to find the acrodist.exe file in the Acrobat installation folder.
We also need to change the command line parameters to tell Distiller where to find the PostScript file and where to put the PDF. In this case add the options /N /Q /O "C:\Archive\?UN?\?SN?.PDF" "C:\Archive\?UN?\?SN?.PS" You will need to modify this line according to where you wrote the original file in the Write File action however you should keep both files in the same folder as Print Disrtributor will take care of folder creation which Distiller wouldn't.
The timeout is how long Print Distiller should wait for Distiller before continuing, 300 seconds should be fine unless you have a particularly slow server or extremely large files.
Finally we need a Script action to clean up the .PS file and a log file which Distiller creates, add a Script action and paste in this code:
' Clean up files after distiller
Dim FSO, Path
Path = "C:\Archive\" & UserName & "\" & SerialNumber
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.DeleteFile Path & ".ps"
FSO.DeleteFile Path & ".log"
Click on Finish and we should be ready to go, run a test and get your PDF files!
If you have problems you probably need to go through a step at a time, start by checking the .PS file is getting written where you expect, make sure Distiller is getting called (look in the process list in task manager) and finally that the script runs. Use the Log tool in Print Distributor to see any error messages.