Search Locate Previous Next Contents

Introducing the Viewer

The Viewer allows you or a user to display each page of a NewLeaf document on-line, and then to print it or save it to file. You can move easily between pages, magnify or reduce the size of the page image, and copy the currently displayed page to the clipboard. Although the document can be manipulated in a variety of ways, all of these procedures (magnifying, exporting as a PostScript file, etc.) use a copy and the original document is unchanged.

Any viewer settings you change are saved in the Windows Registry, by default under the key ‘Software\Causeway\NewLeaf\Viewer’ within HKEY_CURRENT_USER. You can use PostScrp.SetRegPath to set your own registry path, so that the settings will be specific to your own application. If you set this path to null, no settings will be saved to or loaded from the registry.

The Viewer is itself an application with a fixed-size form. Probably you will make a simple cover function, such as View, with the same calling syntax. The Viewer is invoked directly as follows:

PostScrp.View doc

where doc is a simple text vector containing either a NewLeaf document description as returned by leaf.Close, or the full path and name of a file containing such a text vector. Where doc is a four-page document, you see:


Invoked monadically, the Viewer initially displays the first page of the document. If the Viewer is invoked with a left argument consisting of a positive integer scalar:

5 PostScrp.View doc

it displays that page of the document first.

The Viewer has four main components:

  1. Tool Bar
  2. Document Area
  3. Status Bar
  4. Popup Menu

These are described in the following sections. Note that all text items in the viewer (including tooltips, pop-up menus and dialogue boxes) are translatable using external phrasebook files.

See also ...
Translating the Viewer Text


Continue to: The Viewer Toolbar
© Copyright Causeway Graphical Systems Ltd 2001