Extendscript of the Week: Create a upgraded copy of Book



As part of the series ‘Extendscript of the week’, we are providing an extendscript to Create a upgraded copy of Book that upgrades a legacy book and its components to latest FrameMaker version. This will show how to use FrameMaker ESTK to traverse a hierarchical book and perform operations on the components.

Download the zip file from BookUpgrade and unzip the content to local disk.

About the Script

  • It contains 3 scripts, BookUpgrade.jsx which is the caller function to handle the workflow, BookIterator.jsx which is used to iterate over the book components and BookUpgradeUtils.jsx that has utility functions (Open and Save) used in the automation
  • The script works on FM/MIF, nested books and its components as well as on the hierarchical components (Folders templates)
  • Any XML file, dita or map which is a part of the book is left untouched
  • The script traverses through the book, opens the book component file silently, saves it and then closes it. A backup of all the files will be created at the same location as the book files

Steps to use the Script?

  • Launch FrameMaker
  • Open any legacy book (or use the file Sample.book from the samples provided here: BookUpgradeSampleFiles)
  • With focus on book, run the script BookUpgrade.jsx
  • An alert will come, asking for your confirmation. If you click Cancel, the operation will be aborted
  • If you wish to continue by pressing OK, the script will run and convert all the chapters, including the Book itself, to FM10 version

Hope this simple automation will help to reduce your manual efforts and provide further insights into Extendscript usage.

Anchal Arora

FrameMaker Engineering Team

(Resources: BookUpgradeScript , BookUpgradeSampleFiles)


Posted on 10-12-2011


  • By Bjørn Smalbro - 10:23 AM on December 8, 2011   Reply

    I am looking for someone to help me do some further developments on this script. I’d like to be able to point it at a folder containing multiple fm files – both book files and single fm files – and run the conversion. It will take too much time running each book file and I am not sure whether all single fm files are used in book files. Can you point me to some developer ?

  • […] (Dies ist eine gekürzte Fassung des Adobe-Beitrags »Create a upgraded copy of Book«) […]