Previous | Contents | Index |
The TEXT_TO_PS channel is the first of three channels which together perform the outbound functions of PMDF-FAX. This is the first PMDF channel which an e-mail message encounters on its way to becoming a FAX transmission. The TEXT_TO_PS channel converts, using the callable PMDF PS utility, a message body into a PostScript program for printing the message body on a PostScript device. The output of the TEXT_TO_PS channel is usually queued to a PS_TO_G3 channel for further processing. (The PMDF PS utility is described in the OpenVMS Edition of the PMDF User's Guide.)
The PERCENT_BANG channel option may be used to control the interpretation of message body parts that begin with the two characters "%!". By default, message parts beginning with this sequence will be interpreted as PostScript and passed on without conversion to the PS_TO_G3 channel. Also, any body part with a Content-Type: of application/PostScript will be passed without conversion to the PS_TO_G3 channel.
With the X-PS-qualifiers: header line, various aspects of the formatting of the e-mail message may be controlled (e.g., font style, font size, margins, etc.). See also the description of the PS_QUALIFIERS channel option which allows channel level control over formatting options.
Using the file inclusion and PostScript inclusion flags, either external text or graphics (PostScript), may be automatically merged into the message being sent. To send nothing but PostScript, either ensure that the message begins with a "%!" or send the PostScript directly to the PS_TO_G3 channel.
The conversion channel, described in Section 6.2, may be used to convert input formats other than text or PostScript to text or PostScript. See Section 37.2.2 for further details.
The master_debug
and slave_debug
channel
keywords are ignored by the TEXT_TO_PS channel.
37.2.15.1 Message Formatting
With one exception, an e-mail message sent to the TEXT_TO_PS channel is
formatted using the defaults of the PS utility documented in the
OpenVMS Edition of the PMDF User's Guide. The single deviation from the
defaults is the placement of the left margin: the left margin is placed
1/2 inch (36 points) from the left edge of the FAX sheet instead of the
default 1 inch (72 points) normally used by the PS utility. In effect,
the TEXT_TO_PS channel merely takes the body of an e-mail message,
passes it through the PS utility using the command
$ PMDF PS/LEFT_MARGIN=36 message_body |
The TEXT_TO_PS channel does not wrap message lines. Consequently, portions of lines which run past the right edge of a page will not appear on the transmitted FAX page. |
When the X-PS-qualifiers: header line is present, its content is interpreted as a list of PS command qualifiers and is passed to the PS utility as such when the message body is processed. The content of that header line will override any qualifiers requested with the PS_QUALIFIERS option. Only legal PS command qualifiers may appear in this header line; see the PS utility documentation for a list of legal qualifiers. When the X-PS-qualifiers: header line is present, the TEXT_TO_PS channel does not set the left margin to 1/2 inch (36 points) but rather leaves it at the PS utility's default position of 1 inch (72 points). As an example, given the X-PS-qualifiers: header line
X-PS-qualifiers: /LEFT_MARGIN=36/LANDSCAPE/COLUMNS=2/LINES=50/CALCULATE |
OpenVMS users of PMDF MAIL, PMDF SEND, VMS MAIL, and DECwindows MAIL may control the contents of the X-PS-qualifiers: header line with the PMDF_X_PS_QUALIFIERS logical; its translation value at the time the e-mail message is generated is used to form the contents of that header line. By using system, group, or process logical names the behavior of the TEXT_TO_PS channel may be controlled on a system, group, or process-wide basis.
OpenVMS users may use the PS utility's /MAIL qualifier to properly set the PMDF_X_PS_QUALIFIERS process logical. Setting the logical this way ensures that only legal qualifiers are placed in the X-PS-qualifiers: header line. See the PS utility documentation in the OpenVMS Edition of the PMDF User's Guide.
37.2.15.2 Merging Text and Graphics
Special commands may be embedded in messages to instruct the PMDF PS
utility to either include the contents of a file or to insert
PostScript commands into the PostScript output of the PS utility. (See
the PS utility documentation in the OpenVMS Edition of the
PMDF User's Guide for the format of these commands.) These two features
may be independently enabled or disabled for each TEXT_TO_PS channel.
When a disabled command appears in a message, the command is removed
from the message and ignored; no error or warnings are issued by the
channel.
If the file inclusion feature is enabled, users must ensure that any file to be included is world readable. OpenVMS users can simply ensure that the file be readable by the account and UIC specified by the system logicals PMDF_USER_USERNAME and PMDF_USER_UIC. The TEXT_TO_PS channel runs with no privileges, under that account and UIC. Typically, this means that files to be included must, via an access control list (ACL), grant access to the rightslist identifier PMDF_USER_READ which is held by the PMDF_USER account.
37.2.15.3 Option Files
Option files are used to set run-time options on a per channel basis.
Option files are stored in the PMDF table directory and have names of
the form x_option
, where x
is the name of the TEXT_TO_PS channel to which the option file applies.
It is not necessary that every or any TEXT_TO_PS channel have an option
file; i.e., option files are not required for TEXT_TO_PS
channels but merely used to alter default actions taken by such
channels.
Option files consist of several lines. Each line contains the setting for one option. An option setting has the form:
option=value |
value
may be either a string or an integer,
depending on the option's requirements. If the option accepts an
integer value, value
, a base may be specified
using notation of the form b%v
, where
b
is the base expressed in base 10 and
v
is the actual value expressed in base
b
.
Comment lines are allowed. Any line that begins with an exclamation point, !, is considered to be a comment and is ignored. Blank lines are also ignored in any option file.
The available options are:
INCLUDE (0 or 1)
This option is used to control whether or not e-mail messages may use the file inclusion capability of the PS utility. With special text strings, the PS utility may be instructed to import text from other files. When the TEXT_TO_PS channel runs with privileges, this presents a security problem. (By default, the TEXT_TO_PS channel runs with no privileges under the username and UIC specified by the logicals PMDF_USER_USERNAME and PMDF_USER_UIC, and the TEXT_TO_PS channel can only read files which are world readable or, with an access control list (ACL), grant access to the rightslist identifier PMDF_USER_READ which is held by the PMDF_USER account.) This option has the default value 1 which allows users to import files into their messages provided, of course, that the TEXT_TO_PS channel has read access to the specified files. To disallow such file inclusion, specify INCLUDE=0 in the option file.INSERT (0 or 1)
This option is used to control whether e-mail messages may use the PostScript command inclusion capability of the PS utility. With special text strings, the PS utility may be instructed to insert user supplied PostScript commands into its output. This capability is ordinarily used to include graphics in a message; however, it is also a means by which users may submit PostScript files to the PS_TO_G3 channel. (Some sites may wish to prevent users from submitting PostScript files to the PS_TO_G3 channel.) This option has the default value 1 which allows users to insert PostScript commands into their messages. To disallow such insertions, specify INSERT=0 in the option file.PERCENT_BANG (0 or 1)
By default, any message part beginning with the two character sequence "%!" will be interpreted as PostScript and passed without interpretation to the PS_TO_G3 channel. This behavior may be disabled by specifying PERCENT_BANG=0 in an option file. The default behavior corresponds to PERCENT_BANG=1.PRINT_HEADERS (0 --- 4)
In addition to multi-part messages, MIME messages can contain imbedded messages with their own message headers. The PRINT_HEADERS option controls what happens to these headers. The default value of 0 causes all internal message headers to be discarded. A value of 1 causes a single instance of the second and subsequent sets of message headers to be appended to any associated text part in the message. The effect is to prefix the first text part of any imbedded message with its associated headers. Each set of headers is only attached once even though the message headers may apply to more than one part. A value of 2 attaches the appropriate headers to each part the headers apply to; this may duplicate each set of headers more than once. A value of 3 causes a single instance of the all message headers to appear; this includes the initial set of headers on the message. A value of 4 causes multiple instances to be attached to the appropriate parts. This will have the effect of attaching a set of headers to every text part of the message. This option only applies to text parts of the message; it has no effect on non-text parts that are not converted by the channel.PS_QUALIFIERS (text string <= 252 characters long)
Specifies PMDF PS utility command qualifiers to use instead of the default /LEFT_MARGIN=36. For example,
will result in 1/4 inch margins and a font size of 11 points. If a user has requested specific qualifiers with an X-PS-Qualifiers: header line, then those qualifiers will instead be used.
PS_QUALIFIERS=/LEFT_MARGIN=18/TOP_MARGIN=18/BOTTOM_MARGIN=18/SIZE=11
Previous | Next | Contents | Index |