This Mover Tip will demonstrate how you can automate the export of Enterprise Layouts along with linked objects while maintaining those links. It uses the Indesign "Package" feature.
This Tip does require InDesign Server. (This Process has not been tested on InDesign Server CC. If you encounter any problems with CC please post to this thread.)
The Process requires 3 Tasks:
... and my Process Folder in my Base Path looks like:
Here are the required Tasks:
1. Enterprise Query: Use a query that selects the appropriate Layouts and save the results to a file... I used a folder called "QueryResults" and named the file "results".
So this gives you an xml file that contains some basic metadata for each of the selected Layouts.... including the ID and the Name.
2. XSL Transform: Set the source folder to the same "QueryResults" folder used in Step 1 and the destination to a folder I called "QueryTabDelimited"... using this "QueryToList.xsl" transformation file.
This Transformation takes the xml file created in Step 1 and converts it into a simple text file.... which includes the IDs and Names of each of the selected Layouts. That resulting file will still have an xml extension even though it is just plain text. You can rename it if you like but it is not required.
Alternatively you can use the "EnterprisePackageToFolders.jsx" script instead. This version will construct a Brand/Issue/Category folder structure and place the Layout Package in the appropriate subfolder.
So Mover will now instruct InDesign Server to run this script passing it the name of the file that we created in Step 2. The script in turn opens that file, reads the list of IDs and names, opens each one and using InDesign's "packageForPrint" function exports the Layout along with the proper links.
You will need to edit 4 variables in the script file for your particular situation. They include a path where to save the exported Layouts & links, along with your Enterprise server and login information. You will see all 4 near the top of the file.
Important notice: This example and code is provided for reference only. It is provided "AS IS," without warranties of any kind. Feel free to use it as a basis to create your own implementation. Do not contact WoodWing Support with questions and issues about this sample. Please post questions and remarks to this thread.
Please sign in to leave a comment.