Next: 3.2 Page related Commands Up: 3. The available Commands Previous: 3. The available Commands Index

# 3.1 Document related Commands

CloseDoc()
  Closes the actual Document. Returns true if successful.
GetUnit()
  Returns the Measurement Unit of the Document. Possible Values for Unit are:

> 0 = Typographic Points

> 1 = Millimeters

> 2 = Inches

> 3 = Picas

HaveDoc()
  Returns true if there is a Document open.
NewDoc(size, margins, orientation, firstPageNumber, unit, FacingPages, FirstSideLeft)
  Creates a new Document. The Parameters have the following Meaning:

> size = A Tuple (width, height) describing the Size of the Document.
> margins = A Tuple (Left, Right, Top, Bottom) describing the Margins of the Document.
> orientation = the Page Orientation, 0 means Portrait, 1 is Landscape
> firstPageNumer is the Number of the first Page in the Document used for Pagenumbering
> unit: this Value sets the Measurement Unit of the Document

> > 0 = Typograpic Points
> > 1 = Millimeters
> > 2 = Inches
> > 3 = Picas

> FacingPages: 1 means FacingPages turned on, 0 means FacingPages turned off
> FirstSideLeft: 1 means that the first Page in the Document is a left Page, 0 means a right Page as first Page
> The values for Width, Height and the Margins are expressed in the given unit for the Document.

OpenDoc(``name'')
  Opens the Document ``name''. Returns true if successful.
SaveDoc()
  Saves the Document under its actual Name, returns true if successful.
SaveDocAs(``name'')
  Saves the actual Document under the new Name ``name''. Returns true if successful.
SetInfo(``Author'', ''Info'', ''Description'')
  Sets the Document Information.
SetMargins(lr, rr, tr, br)
  Sets the Printmargins of the Document, Left(lr), Right(rr), Top(tr) and Bottom(br) Margins are given in the actual measurement Unit of the Document.
SetDocType(FacingPages, FirstSideLeft)
  Sets the Type of the Documents, to get Facing Pages set the first Parameter to 1, to switch FacingPages off use 0 instead. If you want to be the first Page a left Side set the second Parameter to 1, for a right Page use 0.
SetUnit(unit)
  Changes the Measurement Unit of the Document. Possible Values for Unit are:

> 0 = Typographic Points

> 1 = Millimeters

> 2 = Inches

> 3 = Picas

Next: 3.2 Page related Commands Up: 3. The available Commands Previous: 3. The available Commands Index