Sunday, October 9, 2011

Document Architecture

To create ExtendScript scripts that  manipulate the content of FrameMaker documents, you need to know the parts that make up a FrameMaker document and how they inter-relate.

If you are familiar with FrameMaker from an end-user perspective, you already know something about how the FDK, and ExtendScript access the content within FrameMaker documents. To write a script, however, you have to stop thinking about how an end user might accomplish a task and think instead about how a program might access an object that it wants to inspect or change.

Here are some things you need to know before getting started with scripting:
  • FrameMaker edits documents. Groups of documents can be aggregated into books. 
  • Documents can be structured or unstructured. (Structure in FrameMaker is really just an overlay on an unstructured FrameMaker document. More about that later.)
  • The name FrameMaker is a reference to the idea of a frame as a container for document content. All content is a FrameMaker document is ultimately part of  some frame.
  • Frames  can contain flows. Flows can be thought of as the containers for rivers of text. Such text can span page boundaries.
  • Frames can be anchored or unanchored. Anchored frames are tied to a position in text. Unanchored frames are placed in a specific coordinate position on a page.
  • Frames contain graphic objects and other frames. These can be the circles, rectangles, and other shapes you might draw with the built-in graphics tools. Graphics also can be anchored and unanchored text frames (containers for sequences of paragraphs that can themselves contain text), text lines (such as the callout text you might use in an image), insets (imported graphics), groups of graphic objects (created using the Group tool), equations created with the Equation Editor.
    Why do you need to know what objects exists and how they inter-relate? Very simply, to work with these objects using the ExtendScript Tool Kit (ESTK), you need to locate them first. Once you have "hold" of an object, you can learn about its characteristics (properties) and change them as desired.That is the key to the usefulness of the ESTK.

      No comments:

      Post a Comment