As part of the series ‘Extendscript of the week’, we are providing an extendscript utility to convert all the graphics in FM/Book “imported by copy” to “imported by reference”. In this process all graphics imported by copy will be created externally and then imported by reference. These externalize graphics will be created in same directory as source file is. Users have to make sure the source directory provides appropriate access.
A report will also be created, displaying a table with entries for processed documents and all the graphics that has been converted for these documents. Graphics entry will be hyperlinked to the graphic in the doc.
- Externalize.jsx: Master script for the utility. Creates menu entry and handles commands, also has some logic for externalization.
- Externalize\ExternalizeUtils.jsx: Utility functions for the process.
- Externalize\iterator.jsx: A simple iterator for the book.
- Externalize\ExternalizeTemplate: Template doc for the report to be generated.
- Externalize\ExternalLibrary.dll: Library for writing graphic files to disk. Used as core java script “External Object” in utility.
- Download the zip file from Externalize Files.
- Unzip the files and copy “Externalize.jsx” and “Externalize” folder in startup folder located at “C:\Program Files\Adobe\AdobeFrameMaker10\startup”. (Or you can simply run the Externalize.jsx manually, just make sure this script and Externalize folder resides in same directory)
If successful, there should be a new menu entry under “File->Utilities->Externalize Graphics“.
- Launch FrameMaker
- Open any document Or book. (you can use sample files from ExternalizeSampleFiles)
- Initiate externalize process from “File->Utilities->Externalize”
- This will start the process and will generate the report in the end with the information listed above.
I hope this utility will be useful for many and will be a nice resource to those who want to dive into magnificent world of ExtendScript.
Vikas Jethnani, Pankaj Aggrawal.
FrameMaker Engineering Team.