INTEGRAL DSL Reference Guide
Jump directly to:
::my.integral Table Members
- LoadDoc(doc_root, doc_fname)
- MakeDoc(doc_info_arr, doc, auxcmd = "")
- MakeMyDoc(doc_root, doc_fname, fontmap = null, auxcmd = "")
← Back to INTEGRAL DSL Reference Guide
Escape Character
The caret character (^) can be used as the escape character so that any byte value can be encoded. The caret character must be followed by precisely two more ASCII characters that represent two hexadecimal digits. Thus, each of these characters must be either a digit ('0' - '9') or a letter in the 'a' - 'f' (or 'A' - 'F') range. These two digits make up a single hexadecimal value in the 0 - 255 range, which is the encoded byte value. For example, the sequence ^4B encodes the byte value 75 (or ASCII character 'K'), while the sequence ^2C encodes the byte value 44 (or ASCII character ',').
If one of the characters that follow the caret is not a hexadecimal digit, the entire escape sequence is considered invalid (as soon as the first bad digit is encountered) and the normal processing of the text file resumes.
INTEGRAL Document Units
All INTEGRAL object coordinates, page sizes and many INTEGRAL property values are expressed in logical units called document units (or doc units). Document units are device and resolution independent units used to specify lengths (distances) in INTEGRAL documents. To convert INTEGRAL document units to other commonly used units of length, use the following relation:
- 1 doc unit = 0.12 points = 0.04233333 mm = 0.001666666 inches
Therefore:
- 1 point = 8.33333 doc units
- 1 mm = 23.622 doc units
- 1 inch = 600 doc units
For example, the standard Letter (US) page size (which measures 8.5 x 11 inches or 612 x 792 points) would be 5100 x 6600 doc units.
Current Working Directory
In most situations, when your program attempts to access a file or directory using an INTEGRAL DSL function that was supplied a relative path, this path will be interpreted as being relative to the current working directory. Basically, the current working directory is a directory to which your program's relative paths refer.
As soon as your program starts, the current working directory is initialized as follows:
- For INTEGRAL Server, this is the website's root directory as specified by the WEBSITE_PATH configuration keyword. Depending on your site's configuration, this directory can be set using an absolute path or a path that is relative to INTEGRAL Application Server's working directory.
- For INTEGRAL Desktop, this is the directory in which the executed INTEGRAL program file resides. In this situation expect the current working directory to have a path that is relative to INTEGRAL Application Server's working directory.
Note that during your program's execution the current working directory can change. This is true for both INTEGRAL Server and INTEGRAL Desktop. The change of your program's current working directory can be triggered by calling the ::my.execute function. Also, at any point in time, your program can call the ::my.app.GetWorkingDir function to obtain the path of its current working directory.