FrameMaker Server 10 – More on Usage

FrameMakerFrameMaker ServerProductsTechComm


In the earlier 2 posts on FM Server 10 – Kapil and Harish had covered FM Server overview and Command line capability. My post covers 3 areas mainly –

  1. Usage of Extendscript with FM Server 10,
  2. significance of Post-publish command
  3. and QuickSets in FM Server 10.

Here we go:

How to use ExtendScript with FM Server?

Prepublish is the name given to the option of executing an extendscript as soon as FM Server opens files for publishing. To use this option one needs to needs to checkmark the “Run Pre-Publish Script” & locate the .jsx from a local/network path.

Once a script-path is provided and a task saved, this is the sequence of script execution:

  1. FM Server task window launches
  2. FM launches
  3. Source files are opened
  4. Prepublish script executes
  5. Publishing action takes place
  6. FM closes
  7. FM Server task window closes & logs are updated.


Lets say the created task publishes a PDF and in the same task we wish to perform this pre-publishing action: “Exclude (Generated) Files from the output PDF.”

We essentially will perform these steps in our pre-publish script (script attached):

  1. Find the id of the open book:
  2. mainbook = app.FirstOpenBook;
  3. Traverse all the components and find if it is a generated file:
  4. if(bookComp.BookComponentIsGeneratable)
  5. (optional) Do intermediate actions like SaveMIF on the book to check if the action was performed.

Here, FM Server 10 provides the capability to find the id of the book opened in invisible mode and make changes to it!


One more example of usage in FM Server could be “Produce multiple PDF outputs on the basis of Conditional tags”. Here we have a scenario in which the source book has several conditional tags applied. When the FM Server task containing the script executes then on the basis of those tags script would generate several PDF outputs.  Script is Available at FM10 installation -> $FMHOME\Samples\ScriptsAndU­tilities & also attached in the blog link too.

In FM Server 10, pre-publishing is much more than pre-publishing ‘only’ – one may extend pre-publish feature to cover everything via scripting that FM Server doesn’t provide ready-to-use for you i.e. it makes FM Server extensible!


How to use the Post-publish command functionality?

Post-Publish is the name given to a clean-up command that we might wish to execute towards the end of publishing. These tasks could be anything from deleting the backup files, moving the outputs to another location or launching another application. All these could be done via a single MS DOS command line statement. If one wish to perform multiple actions he could infact give the path for a .bat file that would get executed on task completion.

QuickSets Usage:

PDF QuickSets:

There are various PDF Settings that one would want to assign to FM Server task. These settings need not be set each times instead users can save these settings as QuickSets.


RH QuickSets:

These are similar to the PDF quicksets. FM Server 10 can produce eight RH outputs other than PDF. Though one may provide a RH Project Template for any of these outputs but when producing JavaHelp/OracleHelp/AIR outputs providing a RH Project template (containing SSL information for the respective help) is mandatory.  In a RH quick set, we can define 4 properties namely:

  • RH Template – The .xpj or .mpj file of the saved RH project containing respective SSL settings
  • ISF File – File that specifies the mapping of formatting of FM file when imported into RH
  • Master Page File – The RH Master Page to be used for the output Help
  • DitaVal file – When working with Ditamaps, one can apply a DitaVal filter onto the RH output via this file.


And these QuickSets could be used like this in the drop-down on task window thus saving time for a user:

We hope these enhancements to FM Server would make it powerful, flexible and easy to use. Do try the product and let us know your feedback/queries!

– Amit Agarwal (FrameMaker Engineering)

FrameMaker, FrameMaker Server, Products, TechComm

Posted on 04-05-2011

Join the discussion