The localization team at medical technology company came to us with an interesting automation request. As part of their localization process, all files for a given language and deliverable are provided in multiple ZIP files in a single folder. The ZIPs contain the following:
- FrameMaker book file (optional)
- MIF file(s)
- “variables” file (optional)
- image files
They wanted to automate the assembly and PDF generation of the book rather than needing to put it all together manually. This task involves the following logic:
- Start FrameMaker.
- Open all MIF files and save them as FM binary files.
- If a book file exists, open it (otherwise, just one file is used).
- If a file with “_VRB” in the name exists, import the variable definitions from that file into all FM files in the book.
- Update the book.
- Save the book or single FM file to a PDF (using a pre-defined job options file).
- Exit FrameMaker.
The user workflow should be as follows:
- Copy ZIP files into a folder on the user’s desktop.
- Right-click the folder, and select “GeneratePDF”
We were able to quickly develop a prototype of this process using the AutoFM plugin. This handled the bulk of the work in opening the files in FrameMaker, converting from MIF to FM, importing the variables, updating the book, and generating the PDF.
All that was needed was some type of script or utility to drive the whole process. This entails, unzipping the files into a temporary folder, analyzing the contents, and generating the AutoFM script (a simple XML file that is passed to FrameMaker on startup to perform the specified actions). This could be developed as a compiled EXE utility, or as some type of script. We opted for a Perl script because of the reduced effort in development and because it would be easier to modify in the future. The “right-click” functionality is handled by adding a batch file in the Windows “SendTo” folder.
The Perl script took a couple hours to develop and test, and now the localization team can quickly and reliably generate a PDF from the provided content.
This is just one example of how you could use AutoFM to automate tasks with FrameMaker. The AutoFM process is driven by an XML “script”, but it can perform various tasks on all types of FrameMaker files. It can also run additional scripting within FrameMaker (ExtendScript, FrameScript, FDK client), to perform whatever custom processing is required.