The DF_ASCIIDATA data structure describes graphical attributes such as margins, font and line spacing to use in converting an ASCII file to a fax image for transmission.
Use of DF_ASCIIDATA is optional. If used, the DF_IOTT data structure must contain a pointer (io_datap) cast as a void * to the location of the specific DF_ASCIIDATA structure. If the pointer is NULL, default ASCII values are used.
7.3.1. DF_ASCIIDATA DefinitionThe DF_ASCIIDATA structure consists of the following fields.
struct df_asciidata {
ushort pagelength; /* Page Length */
ushort pagepad; /* Pad blank scan lines to end of page */
ushort topmargin; /* Top Margin */
ushort botmargin; /* Bottom Margin */
ushort leftmargin; /* Left Margin */
ushort rightmargin; /* Right Margin */
ushort linespace; /* Spacing between ASCII lines */
ushort font; /* Font selection */
ushort tabstops; /* Number of tabstops on a line */
uchar units; /* Units for specifying margins/lengths */
uchar flags; /* Reserved for future use */
};
7.3.2. DF_ASCIIDATA Field DescriptionsFor easier reference, the fields in the DF_ASCIIDATA structure are described in alphabetical order in Table 17. DF_ASCIIDATA Fields.
For additional usage information, see Section 7.3.3. Usage Rules on page 106.
Table 17. DF_ASCIIDATA Fields
Field |
Description |
|
Default: 2 (corresponds to 0.2 inches) Bottom margin for ASCII text in units. See units field (default for units is 1/10 inch units). Valid values are:
| |
Reserved for future use. | |
|
Default: DF_FONT_0 The font used in rendering the ASCII document. See Appendix F for ASCII character set supported. Valid values are: | |
| |
|
When using Windows font handles, the font specified in the font field overrides FC_FONT0 set in fx_setparm( ). For more information on Windows font handles, see Section 6.6. Using Windows Font Handles on page 92. | |
|
Default: 3 (corresponds to 0.3 inches) Left margin for ASCII text in units. See units field (default for units is 1/10 inch units). Valid values are:
| |
|
Default: DF_SINGLESPACE Linespace can be used to set one of the following: The line space between ASCII text. The font height determines the line spacing for each row. OR
| |
|
Valid values for the line space between ASCII text:
| |
linespace (cont.) |
Valid values for the number of lines per inch:
If DF_8LPI is specified for font DF_FONT_0, the font is too large to fit within the 8 lpi requirement. |
|
Default: 110 (corresponds to 11 inches) Page length for ASCII text in units. See units field (default for units is 1/10 inch units). To allow embedded formfeed characters in the ASCII data to control the paging, set the value to exceed the longest page of ASCII data. Valid values are:
| |
|
Default: DF_PAD Pad last page with blank lines (default) or do not pad with blank lines. All pages received are the same length as specified in pagelength. Valid values are:
| |
|
Default: 3 (corresponds to 0.3 inches) Right margin for ASCII text in units. See units field (default for units is 1/10 inch units). Valid values are:
| |
|
Default: 8 The number of tab stops per line equally spaced based on the total page width. Any tab stops set outside right and left margins are not usable. Valid values: _0 | |
|
Default: 2 (corresponds to 0.2 inches) Top margin for ASCII text in units. See units field (default for units is 1/10 inch units). Valid values are:
| |
|
Default: DF_UNITS_IN10 The decimal values specified in the margin fields (top, bottom, left and right) and the pagelength field of the DF_ASCIIDATA structure are based on the value in this field. For further detail, see Maximum Values for Margins in Section 7.3.3. Usage Rules on page 106. Valid values are:
|
7.3.3. Usage RulesThe following rules apply when you use the DF_ASCIIDATA structure.
ApplicabilityThe values specified in the DF_ASCIIDATA structure apply to the DF_IOTT entry it is associated with, unless the values are overridden by escape sequences from a Dialogic ASCII to Fax command set (see Appendix F).
Using Escape Sequences from Dialogic ASCII to Fax Command SetThe ASCII file may contain embedded escape sequences from a Dialogic ASCII to Fax Command Set (see Appendix F). These escape sequences specify graphical attributes within the ASCII file and override the values specified in the DF_ASCIIDATA structure.
Maximum Values for MarginsThe units field determines the unit of measurement for the top, bottom, left and right margin fields in the DF_ASCIIDATA structure.
The maximum decimal value that can be specified for the margin fields is listed in Table 18. Maximum Values for Margins for each of the supported units:
Table 18. Maximum Values for Margins
Units |
Top |
Bottom |
Left |
Right |
DF_UNITS_IN10 (0.1 inch units) |
52 |
52 |
25 |
25 |
DF_UNITS_MM (mm) |
132 |
132 |
64 |
64 |
DF_PELS (coarse scan lines) |
512 |
512 |
- |
- |
DF_PELS (pixels) |
- |
- |
512 |
512 |
Page Size of Converted ASCII DocumentThe conversion of the ASCII text to a fax image takes place at the time of transmission. Line wrapping occurs if the line of ASCII text is longer than the negotiated width of the fax data.
The ASCII data is separated into pages based on the following:
For more information on specifying fonts for ASCII to fax, see Chapter 6. Specifying Fonts in ASCII to Fax Conversion.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation