Create PDF Output to Specific Directories
It is simple to create multiple output paths for PDF files. In this example, you want to store purchase orders (POs) in a different directory for each vendor ID. The set up is in two parts: Defining the variable that includes the output path and setting up the output.
Define the variable
In the eFORMz Composer, define a variable that includes the relative or absolute path and file name for the PDF file.
- Create the variables you need to create the PDF path and file name. This example uses the variables VendorNumber and PONumber, which are created from the data file.
- Create the variable that contains the path and file name by right clicking the form > Add variable > By position.
- Name the variable POFilename and click OK.
- Right click the variable POFilename > Add function > Set Value to specify a value. For example, you can use the Set Value and Concatenate functions to set the variable to have the following values. For example create the file path and name, C:\archive\POs\V001234\PO5678, with the following operations:
eDIRECT adds the file extension, .pdf, later. Two slashes are used so the program knows it is a literal value. The following image of the Variables window shows the variables involved in the operation:
Set up the output
- Open your project in the eFORMz Composer.
- Click the eDIRECT (or eDIRECT PLUS) tab at the bottom of the Project window.
- Right click in the Project window > Add Output > Print.
- Right click Print > Add job > To File.
- Select PDF and click the File tab.
- Click Variable and select the variable POFilename that includes the file name and path.
- Click Use default extention. This adds the .pdf extension to the file. Click OK.
- Right click the Content: (PDF) step > Add form and select the form to include in the PDF output. Add additional forms if your PDF is composed of multiple forms.
- Save your changes.
- Test your output by clicking Run > Process with eDIRECT (or eDIRECT PLUS).
Deactive the standard subdirectories file path
Select Add Output Process > Process w/eDirectPlus. From there, select Change > Disable standard subdirectories inside the Director Toolkit.