Cover Page Reference
The FaxMan Jr. server supports both its own cover page format and also the Microsoft Fax Coverpage format. Using the Microsoft Fax Coverpage Editor which shipped with Windows 95, it is possible to create graphically rich coverpages that can be used with FaxMan Jr.. Now that FaxMan Jr. includes this support we would recommend that developers use these coverpages instead of the FaxMan Jr. formatted files.
Note: to acquire the Microsoft Fax Editor from the Win98 installation CD, see the following DTI Knowledgebase article
http://www.data-tech.com/content/kbarticle.aspx?ID=82
The FaxMan Jr. coverpage form is documented in this appendix if you choose to use it instead of the MS Fax format.
The FaxMan Jr. coverpage format isnt too difficult to create, as youll see if youre familiar with files at all, you shouldnt have any trouble.
The cover page file format is a simple binary format consisting of one or more variable length records representing objects such as fonts, text, lines, rectangles and Bitmaps. These files can be created from any language that supports writing binary files. When using C or C++ to create cover pages be sure to open/create the file in binary mode so that CR/LF translation will be disabled.
The current cover page format has no header structure and begins with the first object in the file. Future releases will probably include a header.
Object Types
Font
The Font object defines a font to be used for subsequent Text output. This record must be output before any Text records.
The structure is:
SHORT nOpCode; Always set to 0x02 for Font Object
SHORT nRecLen; Set to size of entire structure
char szFontName[20]; Name of Windows Typeface
SHORT nSize; Size in TWIPS (1/1440")
WORD bBold; True if Bold
WORD bItalic; True if Italic
WORD bUnderline; True if Underlined
COLORREF rgbColor; Color of Font
Text
The Text object defines the placement, formatting and text to be printed. Multiple text objects may be used.
SHORT nOpCode; Always set to 0x05 for Text Object
SHORT nX2; X coordinate of bottom right corner of Bounding box
SHORT nY2; Y coordinate of bottom right corner of Bounding Box
COLORREF rgbColor; This is not used.
SHORT nFlags; Flags which specify text formatting. Same flags as DrawText.
Char text[1] Random length text data.
nFlags specifies an array of flags that determine how to draw the text. This parameter can be a combination of the following values:
Value Meaning
DT_BOTTOM (0x08) Specifies bottom-aligned text. This value must be combined with DT_SINGLELINE.
DT_CENTER (0x01) Centers text horizontally.
DT_EXPANDTABS (0x40) Expands tab characters. The default number of characters per tab is eight.
DT_LEFT (0x00) Left-aligns text.
DT_NOPREFIX (0x800) Turns off processing of prefix characters. Normally, DrawText interprets the mnemonic & as a directive to underscore the character that follows, and the mnemonic && as a directive to print a single &. By specifying DT_NOPREFIX, this processing is turned off.
DT_RIGHT (0x02) Right-aligns text.
DT_SINGLELINE (0x20) Specifies single line only. Carriage returns and linefeeds do not break the line.
DT_TOP (0x00) Specifies top-aligned text (single line only).
DT_VCENTER (0x04) Specifies vertically centered text (single line only).
DT_WORDBREAK (0x10) Specifies word breaking. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lprc parameter. A carriage returnlinefeed sequence will also break the line.
Note that the DT_CALCRECT, DT_EXTERNALLEADING, DT_INTERNAL, DT_NOCLIP, and DT_NOPREFIX values cannot be used with the DT_TABSTOP value.
Line
The line object causes a line of the specified size and color to be drawn.
SHORT nOpCode; Always set to 0x04 for Line Object
SHORT nRecLen; Set to size of entire structure
SHORT nX1; X coordinate of starting point
SHORT nY1; Y coordinate of starting point
SHORT nX2; X coordinate of end point
SHORT nY2; Y coordinate of end point
SHORT nWidth; Width of line in TWIPS
SHORT nStyle; Style of Line, same as PENSTYLE in CreatePen
COLORREF rgbColor; Color of line
Rectangle
Draws a rectangle at the specified location. The rectangle can be filled or hollow.
SHORT nOpCode; Always set to 0x03 for Rectangle Object
SHORT nRecLen; Set to size of entire structure
SHORT nX1; X coordinate of Upper Left corner of rectangle
SHORT nY1; Y coordinate of Upper Left corner of rectangle
SHORT nX2; X coordinate of bottom right corner of rectangle
SHORT nY2; Y coordinate of bottom right corner of rectangle
COLORREF rgbColor; Color of rectangle
WORD bFilled; True if filled
COLORREF rgbFillColor; Fill Color
SHORT nPenWidth; Width of Pen in TWIPS
SHORT nPenStyle; Style of Line, same as PENSTYLE in CreatePen
Bitmap
Adds a bitmap to the page. Currently this bitmap must be in FaxMan Jr. FMF format, Black & white, and 1728 pixels wide. The vertical resolution should be 200 DPI. Currently only 1 bitmap may be placed per page and the bitmap will be placed at the top of the page as the X1,Y1,X2,Y2 coordinates are ignored.
SHORT nOpCode; Always set to 0x01 for Bitmap Object
SHORT nRecLen; Set to size of entire structure
SHORT nX1;
SHORT nY1;
SHORT nX2;
SHORT nY2;
char filename[1]; Name of FMF file (Without path information)