Back to "OpenOCR".
Author: Artyom Bojenov.
Written: 16.09.99
(C) Cognitive Tech
Translated from Russian to English
by monday2000
monday2000 [at] yandex [dot] ru
25.09.09
The code SS_SHEET_DESCR - the file header.
This is the most first file byte. It must start with a structure:
struct sheet_disk_descr
{
Word8 code; //=0x0A
Int8 quant_fragm;
Word16 sheet_numb;
Word16 descr_lth;
Word8 byte_flag;
Word16 resolution;
Word16 incline;
Word16 version;
Int8 tabl[11];
};
where
quant_fragm =1 - the number of the fragments on the page. At least 1 fragment must be
ALWAYS present.
sheet_numb - the page number in the batch
descr_lth - the length of the page descriptor, including the following fragment
descriptors, e.g. sizeof(sheet_disk_descr)+sizeof(fragm_disk_descr)
resolution - DPI of the TIFF.
resolutionX - the x-resolution of the TIFF in dpi. Must coincide with resolutionX
in EDEXT_TIFF_DESC
incline - page incline. Calculated with a formula: incline=(xideal-xreal)/yreal*2048=(yreal-yideal)/xreal*2048.
version - the format version = 2000
tabl[11] - reserved.
Later comes the fictive fragment descriptor that starts from the code SS_FRAGMENT.
The code SS_FRAGMENT - the new fragment descriptor.
!!!!Note that BEYOND the header the code SS_FRAGMENT means COMPLETELY ANOTHER THING!!! (see below) and is not used in the current version.
!!!Also note that in the current version this structure is not used. E.g. one fictive fragment is created for the compatibility, and the real fragments data is stored with SS_TEXT_REF.
The srtructure contains the fragments information. The fragment's number corresponds to this structure position in the file.
struct fragm_disk_descr
{
Word8 code; //=0x0B
Word16 row; // coordinates of left upper
Word16 col; // angle of fragment's frame
Word16 height; // height of fragment
Word16 w_width; // Q.w_width of fragment
Int8 type;
Word8 kegl; // kegl for following fragm
Word8 font; // font ~~~~~~~~~~~~~~~~~~
Word8 language; /* language for fragment*/
Word8 type_underl; // type specifications of font
}; // for additional information
// look at underline
All the fields are filled with 0.
Next comes the extended tag with the file version descriptor: EDEXT_VERSION
Next comes the extended tag with the font table descriptor: EDEXT_FONTS
Next comes the extended tag with the color table descriptor: EDEXT_COLORS (not implemented
yet) - and will not be! (6.02.01)
Next comes the extended tag with the style table descriptor: EDEXT_STYLES (not implemented
yet)
Next comes the extended tag with the page sizes descriptor: EDEXT_BORDERS
Next comes the extended tag with the original TIFF descriptor: EDEXT_TIFF_DESC
IF THE TEXT CONTAIN PICTURES next comes the extended tag with the images table descriptor:
EDEXT_PICS. (The images that can be found in the text).
Next comes the file structure descriptor
SS_TEXT_REF - the text descriptor
(SS_REMARK)
struct text_ref
{
Word8 code;
Word8 type;
Word16 object;
};
code = 0x01
In the current version the field type describes what is in the object field and it does not coincide with the previous versions. The block is used as an alternative to the old text-formatting system and is more flexible. The list of the possible type values - Appendix 4.
Next goes the information about the possible values of the fileds type and object:
It is used as an alternative to SS_FRAGMENT from the header. The blocks with the values type=SSR_FRAG_... must be found only in the file header. All the information contained between the structures with type=SSR_FRAG_TYPE is considered to refer to the same fragment. The data must be ordered in accordance with the sequence of the appearance of the lines with the attribute SSR_LINE_FN in the file body. The "fragment" in the new version is meant as the paragraph. Along with the paragraph a fragment actually contains the information how it (the paragraph) is divided into parts, sections and columns. The fragments describing such a division have the bit TP_BRACKET set in type.
E.g. you should write these blocks into the file according to the following algorithm:
while(the current fragment < the total
fragments number) { SSR_FRAG_TYPE, if(the fragment type == LEFT/RIGHT/CENTER_ALIIGN) EDEXT_PARAGRAPH EDEXT_TABINFO(not implemented) EDEXT_PARABORDERS(not implemented) EDEXT_PARABULLET(not implemented) if(the fragment type == TAB_BEG) // { // SSR_FRAG_PNUM, // for(i=0;i<the number of columns;i++) // { // SSR_FRAG_COLXW with x coordinate of the i-th column, // SSR_FRAG_COLXW with the width of the i-th column // }, // } if(the fragment type == MCOL_BEG) { EDEXT_SECTION SSR_FRAG_PNUM } the current fragment++, } SSR_FRAG_END, SSR_SHEET_TYPE |
Now more details:
SSR_FRAG_TYPE - the fragment type. The possible types - in Appendix 5. The
decriptions will be.
object - the actual type
TP_ONE_LINE 0x0001
TP_LEFT_ALLIGN 0x0002
TP_RIGHT_ALLIGN 0x0004
TP_CENTER 0x0008
TP_POS_INDENT 0x0010
TP_NEG_INDENT 0x0020
TP_BULLET 0x0040
TP_POESY 0x0080
TP_LN_SPACE 0x0100
TP_NOT_RECOG 0x0200
TP_BORDER 0x0400
TP_BRACKET 0x8000
TP_MCOL_BEG (TP_BRACKET|0x1000) - the beginning of the multycolumn section
TP_NEW_COL (TP_BRACKET|0x2000) - the beginning of the new column inside the multycolumn
section
TP_MCOL_END (TP_BRACKET|0x3000) - the end of the multycolumn section
TP_TAB_BEG (TP_BRACKET|0x4000)
TP_NEW_ROW (TP_BRACKET|0x5000)
TP_DEL (TP_NOT_RECOG|TP_BORDER)
TP_FICT_FR_FLAGS (TP_BORDER|TP_BRACKET)
FICT_FR_FLAGS - the fragments that have object&FICT_FR_FLAGS!=0 as fictive, e.g. they are not present in the file body as SS_FRAGMENT, but serve only to indicate the text-formatting.
Each part begins with the extended tag EDEXT_SECTION descrining the part parameters. Next goes the fragment of the type TP_MCOL_BEG. Next (for the compatibility - I hope) goes the fragment of the type SSR_FRAG_PNUM. The part is ended with the fragment of the type TP_MCOL_END. If a part is a multy-column one, than every new column begins with the tag TP_NEW_COL.
Each frame begins with the fragment of the type TP_FRAME_BEG and next goes the the extended tag EDEXT_FRAME describing the frame parameters. The frame is ended with the fragment of the type TP_FRAME_END.
Each table begins with the fragment of the type TP_NEW_TAB_BEG. Next comes TP_NEW_ROW_BEG. Immediately after it goes the extended tag EDEXT_TABLE_ROW descrining a table row. The same pair of tags comes in the beginning of each table row. Each cell in the row is followed with the fragment of the type TP_NEW_CELL_BEG, the last cell in the row is followed again with TP_NEW_CELL_BEG and TP_NEW_ROW_BEG. The table is ended with the fragment of the type TP_NEW_TAB_END.
Every common fragment (e.g. the paragraph) has the type determining its alignment (TP_LEFT_ALLIGN, TP_RIGHT_ALLIGN, TP_LEFT_ALLIGN&TP_RIGHT_ALLIGN, TP_CENTER).
Next goes the extended tag EDEXT_PARAGRAPH describing all the other paragraph parameters. Next may come the extended tag EDEXT_PARAGRAPH_TBL describing the tab positions in the paragraph.
The detailed tags description:
TP_ONE_LINE
TP_POS_INDENT
TP_NEG_INDENT
TP_BULLET - is not used
TP_POESY
TP_LN_SPACE
TP_NOT_RECOG
TP_BORDER
The following types signify the beginning of a paragraph:
TP_LEFT_ALLIGN - the left side alignment
TP_RIGHT_ALLIGN - the right side alignment
TP_LEFT_ALLIGN&TP_RIGHT_ALLIGN - the width alignment
TP_CENTER - the center alignment
SSR_FRAG_PNUM - if the type of the fragment is TAB_BEG or MCOL_BEG than object is the number (correspondingly) of the cells/columns.
SSR_FRAG_COLXW - the horizontal position of the table columns. The structures must be paired; in the first object - x-coordinate, in the second object - the width. Such structures must be located in the block which has the TAB_BEG type.
SSR_FRAG_END - ends up the fragment descriptors. object - the number of the written fragments.
Also type can take the following values:
SSR_SHEET_TYPE and then object - 0 or 1 depending on ExistSheets
All the other types are not used (except for the "series" about the line - see in the file body description).
Next comes the file itself.
SS_TEXT_REF - text descriptor
(SS_REMARK)
At the current moment the series consists of the single tag SSR_LINE_FN :
SSR_LINE_FN - object: the current number of the fragment to which a line belongs (that is the fragment is described in the header with this number counting also the fictive blocks. The fragment's number in this tag must have the type L/R/C_ALIGN - see the file header). The tag signifies the beginning of a new line. This tag must be present before every line. The lines come in the number ascending order (e.g. first all the lines of the 1 fragment, next - the 2-nd and so on (taking into consideration that the 1-st and 2-nd fragments are not fictive)).
The code SS_BITMAP_REF - the mapping information.
The structure contains the mapping of a char that FOLLOWS it (the structure).
If no any symbol is found between such 2 structures (only such a symbol that may be described with this structure) (such situation should not really happen) than the content of the first structure is ignored. Conversely if the first structure is followed by more than one such a symbol, than the structure information is applied to all of them (symbols).
struct bit_map_ref
{
Word8 code; // == SS_BITMAP_REF
Word8 pos;
Word16 row; // Reference box
Word16 col;
Word16 width;
Word16 height;
};
row,col - the coordinates of the upper left object corner,
width,height - width and height.
All the distances are measured in pixels on the original TIFF.
The code SS_LANGUAGE - the recognition language
struct EdTagLanguage
{
Word8 code; // 0x0f
Word8 language;
};
language - the language code (see Appendix 2).
The code SS_EXTENTION - the beginning of the extended block
This tag was added to extend the ed format and to bring more flexibility to it. It is followed with a substantial structure.
struct edExtention
{
Word8 code; /* always 0x1C */
Word16 Ecode; /* New extention code */
Word16 length; /* Length in bytes */
};
Ecode - contains one of the extended codes (see below) describing the substantial
structure.
!!!!If the leftmost bit Ecode =1, than the field length has the length
DWORD!!!!!!
length - the size of this structure _INCLUDING_ the structure size edExtention.
The code SS_LINE_BEG - new line
Can be found immediately after a line (just before the descriptor of the next one). It means that the ended line must be separated from the next line (e.g. it is equivalent to the symbol of the hard line break).
struct line_beg
{
Word8 code; //0x0D
Word8 height;
Word16 base_line; // displacement for current
}; // line to upper frame of fragment
height - the default height of the symbols in a line. It is used to determine the
height of the symbol "the new paragraph" if the paragraph is empty.
base_line - 0 - separate the line, 1 - do not separate the line.
The code SS_FONT_KEGL - the information about the font
The information about the font of a symbol (or any other similar object like HalfSpace see below) that FOLLOWS it.
For this code applies all that applies for the CC_BITMAPREF
struct font_kegl //
{ //
Word8 code; // 4 - bold
Word8 new_kegl; // 8 - light
Word16 new_font; // 16 - italic
};
// 32 - straight
// 64 - underlined
code = 0x02
kegl - new size of type
font - the number of the font from the font table described in the header
effects - The possible variants are listed in a column, combinations are possible
SS_TABUL - the tab symbol
Inserts the tab symbol into the current line after the current symbol
struct tabul
{
Word8 code;
//0x08
Word8 numb_in_tab_tabul; // number of position in
}; // table of tabulation
numb_in_tab_tabul - not used
SS_SHIFT - the shift
struct shift
{
Word8 code; //0x04
Word8 kegl;
Word16 clearance; // value of lift or descent
}; // lift positive
// descent negative
kegl - the type size
clearance - the shift (the value of the raise or the lowering of the base string, the
raise is expressed as a positive value, the lowering - as negative).
SS_RETR_LEVEL - Restore the level
struct retrieve_level
{
Word8 code; //0x05
Word8 kegl;
};
kegl - the new size of type
The other tags apparently are not used.
If a tag is not described above and has the value more or equal to 0x20 (space code) than
it is not a tag, but it is a code of a recognized symbol.
A symbol is considered to belong to the last line met.
!!! The very first symbol on a page must be preceded with a block describing the line beginning (SS_FRAGMENT or SS_LINE_BEG)!!! If such a block is absent, than the symbol should be ignored(?).
A symbol is implemented as an array of pairs: <alternate polygraphic symbol> - <its probability>. The symbol and the probability occupy by 1 byte each. The zero in the lowest probability bit serves as the end of the array. The symbol with the biggest probability (among all the others in the array) is placed first (before user's correction).
Now same thing but in my words. A file contain not more than 8(?) different recognized variants of a given symbol, e.g. not more than 8 consecutive structures.
struct letter
{
Word8 bType; // ASCII code. >= ' '.
Word8 bAttrib;
};
bType - the recognized letter
bAttrib - the authenticity of the recogniton
If the field bAttrib contains 1 in the lowest bit (e.g. bAttrib&1==1), than it is not the last alternative - you should read one more such a structure. Otherwise it is the last one, then goes the new block. If we make (bAttrib & 254), than we will get the authenticity of the recogniton of the corresponding letter. Looks like it's most reasonable to take the variant with the maximum authenticity (among the others).
(see SS_EXTENTION)
Every block from this group is actually a structure beginning with edExtention that
contains the information about what is stored here. The field edExtention.Ecode
may take one of the following values (divided to logical groups):
0x0000 - 0x00FF special code
0x0100 - 0x01FF table description
0x0200 - 0x02FF picture description
0x0300 - 0x03ff text formatting description
0x0400 - 0xEFFF Your code please...
0xF000 - 0xFFFF temporary code for debugging ( ! Not used in release version !)
#define ITS_EDEXT_SPECIAL(a) (a>=0x0000 && a<0x0100)
#define ITS_EDEXT_TABLE(a) (a>=0x0100 && a<0x0200)
#define ITS_EDEXT_PICTURE(a) (a>=0x0200 && a<0x0300)
#define ITS_EDEXT_TEXT(a) (a>=0x0300 && a<0x0400)
These macros will help to work with the extension code.
ITS_EDEXT_SPECIAL(Ecode) the codes in this range are reserved for future usage.
ITS_EDEXT_TABLE(Ecode) the codes in this range describe the tables.
ITS_EDEXT_PICTURE(Ecode) the codes in this range describe the images.
ITS_EDEXT_TEXT(Ecode) the codes in this range describe the text formatting.
The codes 0x0400 - 0xEFFF you may use the way you want. Tell us what range are you going to use to avoid the possible range intersections.
The codes 0xF000 - 0xFFFF are reserved for the debugging purposes. Do not use them in the release versions.
Here is the description of the concrete values:
EDEXT_VERSION - the version
EDEXT_TABLE_START - the table descriptor
It precedes the table of the fonts. In ed file all the fonts are chosen by the number corresponding to the number set in the fonts table. The fonts table consists of the set of the consecutive fontDiscr structures.
struct fontDiscr
{
WORD size;
BYTE fontNumber;
BYTE fontPitchAndFamily;
BYTE fontCharset;
}
size - the size of the structure - is necessary, if the structure should be modified in the future. So to read the next structure you must shift to the size bytes from the beginning of the current structure.
fontNumber - the number of the font that denotes the font inside the file.
fontPitchAndFamily - the width and the family of a font. The lowest 4 bits signify the width of the font and may take the following values:
DEFAULT_PITCH
FIXED_PITCH - the monospaced font
VARIABLE_PITCH - the font with the variable width, the biggest 4 bits is a family.
FF_DECORATIVE Novelty fonts. Old English is an example.
FF_DONTCARE Don't care or don't know.
FF_MODERN Fonts with constant stroke width, with or without serifs.
Pica, Elite, and Courier NewR are examples.
FF_ROMAN Fonts with variable stroke width and with serifs. MSR Serif is
an example.
FF_SCRIPT Fonts designed to look like handwriting. Script and Cursive
are examples.
FF_SWISS Fonts with variable stroke width and without serifs. MS Sans
Serif is an example.
the constants are defined in wingdi.h, they are used in the CreateFont call.
fontCharset - the set of the symbols in a font
ANSI_CHARSET
BALTIC_CHARSET
CHINESEBIG5_CHARSET
DEFAULT_CHARSET
EASTEUROPE_CHARSET
GB2312_CHARSET
GREEK_CHARSET
HANGUL_CHARSET
MAC_CHARSET
OEM_CHARSET
RUSSIAN_CHARSET
SHIFTJIS_CHARSET
SYMBOL_CHARSET
TURKISH_CHARSET
the constants are defined in wingdi.h, they are used in the CreateFont call.
EDEXT_BORDERS - the paper size descriptor. It describes the paper sizes in the text editor
struct pageDescr
{
DWORD paperw;
DWORD paperh;
DWORD margl;
DWORD margr;
DWORD margt;
DWORD margb;
BYTE resizeToFit;
BYTE recogLang;
}
paperw - Paper width in twips (the default is 12,240).
paperh - Paper height in twips (the default is 15,840).
margl - Left margin in twips (the default is 1800).
margr - Right margin in twips (the default is 1800).
margt - Top margin in twips (the default is 1440).
margb - Bottom margin in twips (the default is 1440).
resizeToFit - 1, if the vrtical page size is to be
resized to fit the file on the page,- 0 - the size of the page is fixed.
EDEXT_TIFF_DESC - the descriptor of the original image precedes the descriptor of the original image (a typo??? - remark by the interpreter)
struct originalImageDesc
{
WORD resolutionX;
WORD resolutionY;
WORD inclune;
WORD pageNum;
DWORD width;
DWORD height;
BYTE unrecogSymbol;
}
resolutionX
resolutionY - the resolution in dpi
inclune - the page inclination; is calculated with the formula
incline=(xideal-xreal)/yreal*2048=(yreal-yideal)/xreal*2048 (simply to say the tangent of
the page inclination*2048)
pageNum - the number of the page in a file (for the multypaged tiffs)
width
height - the sizes of the image in pixels
unrecogSymbol - a letter denoting the unrecognized symbol ('~')
EDEXT_PICS - the descriptor of the pictures found in the text
It precedes the tables of images. All the images used in the ed file are chosen by the number that corresponds the number set in the table of images. The table of images consists of a set of the consecutive pictDiscr structures.
typedef struct pictEntry
{
WORD pictNumber;
EDSIZE pictSize;
EDSIZE pictGoal;
BYTE pictAlign;
BYTE type;
DWORD len;
void* data;
}PICTENTRY;
pictNumber - the number of the picture as it will be known
inside of the file
pictSize - the size of the image in pixels
pictGoal - the desired picture screen size in twips
pictAlign - the alignment of the text following the picture:
ALIGN_BOT // align picture bottom to base line
ALIGN_MIDDLE // center picture vertically to baseline
ALIGN_TOP // align picture top to base line
type - the picture type: 1 - DIB
len - the length of the picture in bytes
data - the ponter to the picture
EDEXT_SECTION - the description of the part parameters
!!WARNING!!! The structure may miss some last members. The actually present
members are determined by the length field of the ED_EXTENTION structure that
must not necessarily coincide sizeof(edExtention)+sizeof(paraParams). In future
also this structure may be extended to include any additional fields.
struct sectParams1
{
DWORD topMargin;
DWORD bottomMargin;
DWORD leftMargin;
DWORD rightMargin;
BYTE columns;
BYTE numSnakeCols;
DWORD colInterval;
};
topMargin;
bottomMargin; - the indentation from the paper edge in twips
leftMargin;
rightMargin;
columns - the number of the columns in the part equal to the number of the following
columns
numSnakeCols - the number of the columns that the text will be
actually fit into. May be different from the number of the created columns.
colInterval - the interval between the columns, if all the columns have the same width; 0,
if the columns have different width. If the column is just one - ignored.
struct sectParams2
{
BYTE sectionBreak;
DWORD width;
DWORD height;
BYTE orientation;
DWORD headerY;
DWORD footerY;
BYTE lineBetCol;
};
sectionBreak - the option of the part break
0 - the part begins on the current page
1 - the part begins on the next page
width
height - the sizes of the page in twips. The width - is always the size from left to the
right independently from orientation
orientation - the page orientation: 0 - book (portrait), 1 - album (landscape)
headerY - Header is N twips from the top of the page (the default is 720). The colontitles
position
footerY - Footer is N twips from the bottom of the page (the default is 720).
lineBetCol - draw the line between columns
EDEXT_PARAGRAPH - the paragraph properties
!!WARNING!!! The structure may miss some last members. The actually present members are determined by the length field of the ED_EXTENTION structure that must not necessarily coincide sizeof(edExtention)+sizeof(paraParams). In future also this structure may be extended to include any additional fields.
struct paraParams
{
DWORD firstIndent;
DWORD leftIndent;
DWORD rightIndent;
BYTE alignment;
WORD userNum;
WORD color;
WORD shading;
DWORD spaceBefore;
DWORD spaceAfter;
DWORD spaceBetweenLines;
BYTE spcBtwLnsMult;
BYTE keep;
BYTE leftBrdrType; //added 28.03.00
DWORD leftBrdrWidth; //added 28.03.00
BYTE rightBrdrType; //added 28.03.00
DWORD rightBrdrWidth; //added 28.03.00
BYTE topBrdrType; //added 28.03.00
DWORD topBrdrWidth; //added 28.03.00
BYTE bottomBrdrType; //added 28.03.00
DWORD bottomBrdrWidth; //added 28.03.00
BYTE brdrBtw; //added 28.03.00
}
firstIndent - the first line indentation
leftIndent - the left indentation (all in twips)
rightIndent - the right indentation
alignment - the alignment. The values are TP_LEFT_ALLIGN, TP_RIGHT_ALLIGN, TP_CENTER,
TP_LEFT_ALLIGN&TP_RIGHT_ALLIGN(see the fragments descriptors in the very beginning)
userNum - the user-assigned fragment number where the paragraph was at the fragmentation
color - the number of the current paragraph color from the colorTable
shading - the shading of the paragraph in hundredths of a percent (50%=5000) 100% - all
the background has the same color, 5% - the background is white with the rare color spots
spaceBefore - the indentation before the paragraph
spaceAfter - the indentation after the paragraph
spaceBetweenLines - the distance between the lines
If 0 is used, the line spacing is automatically determined by the tallest character in the
line; if N is a positive value, this size is used only if it is taller than
the tallest character (otherwise, the tallest character is used); if N is a negative
value, the absolute value of N is used, even if it is shorter than the tallest character.
spcBtwLnsMult - Line spacing multiple. Indicates that the current line spacing is a
multiple of "Single" line spacing.
Åñëè òàì 0 - "At Least" or "Exactly" line
spacing.
Åñëè òàì 1 - Multiple line spacing, relative to
"Single."
In other words - if here is 0, then the inter-line character is measured in twips set in spaceBetweenLines,
if here is 1 - than the interval is measured in times - this is the ratio
spaceBetweenLines : 240 (for example, the double ratio is 480)
keep - 0th bit - if not 1 - do not break the paragraph (carry over to the next page)
1th bit - if 1 - do not tear (away) from the next paragraph (e.g. the last line of the
given paragraph remains always on the same page as the preceding paragraph).
leftBrdrType - the information about the paragraph borders.
leftBrdrWidth ...BrdrType - the type of the corresponding border:
rightBrdrType 0 - no border, 1 - the single-width border etc seeED_BRDR_...
rightBrdrWidth ...BrdrWidth - the width of the pen in twips (to draw the
border).
topBrdrType Must not exceed 75.
topBrdrWidth
bottomBrdrType
bottomBrdrWidth
brdrBtw - whether to draw or nor the separate frames around the paragraphs with the same borders
EDEXT_FRAME - the frame parameters
struct frameParam
{
BYTE position;
DWORD posx;
DWORD posy;
DWORD absw;
DWORD absh;
DWORD borderSpace;
DWORD dxfrtextx;
DWORD dxfrtexty;
BYTE flag; //Added 6.04.00
}
position - the frame position on the screen. The lowest 4 bits - the y-position:
0 - relative to the upper page edge
1 - relative to the top page edge
2 - relative to the upper top page edge of the next common paragraph. The leftmost 4 bits
is the x-position:
0 - relative to the left page edge
1 - îrelative to the left page border
posx -
posy - the frame position (in twips) relative to what is set in position
absw - the frame width in twips
absh - the height in twips, if positive - than it is the minimal height, if negative -
than precise,
if 0 - than the height is aligned strictly to the content
N is the height of the frame in twips. A positive number indicates the minimum height of
the frame and a negative number indicates the exact height of the frame. A value of zero
indicates that the height of the frame adjusts to the contents of the frame. This is the
default for frames where no height is given.
borderSpace - Space in twips between borders and the paragraph
dxfrtextx - is the horizontal distance in twips from text on both sides of the frame.
dxfrtexty - is the vertical distance in twips from text on both sides of the frame.
flag - If it has the value ED_DROPCAP, than the frame is the drop cap
EDEXT_TABLE_ROW - the parameters of the table line
struct rowParam
{
DWORD left;
DWORD rowHeight;
BYTE leftBrdrType;
DWORD leftBrdrWidth;
BYTE rightBrdrType;
DWORD rightBrdrWidth;
BYTE topBrdrType;
DWORD topBrdrWidth;
BYTE bottomBrdrType;
DWORD bottomBrdrWidth;
DWORD gaph;
BYTE position;
BYTE header;
};
left - Position of the leftmost edge of the table with respect to the left edge of its
column. E.g. it is the distance in twips from the edge of the column to the most left
table cell. If position!=TP_LEFT_ALLIGN - ignored.
rowHeight - the height of the line in twips: 0 - fit to the content height, >0
- if minimal,<0 - if precise.
E.g. the height of a table row in twips. When 0, the height is sufficient for all the text
in the line; when positive, the height is guaranteed to be at least the specified height;
when negative, the absolute value of the height is used, regardless of the height of the
text in the line.
leftBrdrType - the information about cell borders in the line.
leftBrdrWidth ...BrdrType - the type of the corresponding border:
rightBrdrType 0 - no border, 1 - the border of the single width etc see
ED_BRDR_...
rightBrdrWidth ...BrdrWidth - the thickness of the pen in twips (to draw
the border).
topBrdrType Must not exceed 75.
topBrdrWidth
bottomBrdrType
bottomBrdrWidth
gaph - Half the space between the cells of a
table row in twips.
position - Left-justifies, Right-justifies or Centers a table row
with respect to its containing column.
Values:
TP_LEFT_ALLIGN - the left edge alignment
TP_RIGHT_ALLIGN - the right edge alignment
TP_CENTER - the center alignment
header - if the line is located in the table header. The header is shown on every new page
where the table extends. E.g. table row header. This row should appear at the top of every
page the current table appears on.
EDEXT_TABLE_CELL - the table cell parameters
struct cellParam
{
DWORD cellX;
BYTE merging;
BYTE vertTextAlign;
BYTE leftBrdrType;
DWORD leftBrdrWidth;
BYTE rightBrdrType;
DWORD rightBrdrWidth;
BYTE topBrdrType;
DWORD topBrdrWidth;
BYTE bottomBrdrType;
DWORD bottomBrdrWidth;
EDBOX layout;
WORD shading;
WORD color;
BYTE flag; //Added 12.05.00
};
flag - If there was set ED_TDIR_UP or ED_TDIR_DOWN, than the text is placed
correspondingly vertically up or down
EDEXT_CHAR - the symbol parameters
struct charParams
{
DWORD fontNumber;
DWORD foregroundColor; //was word_foregr+word_backgr
changed 6.02.01
DWORD backgroundColor; //Added 6.02.01
};