Tips For Success

Having the best tools for document imaging is only half of the equation. Our Tech Tips are designed to provide you with valuable information to help succeed by achieving faster results with RasterMaster SDKs or FlexSnap viewers. New time-saving tips are added monthly - you can receive them through Imaging News or our Tech Tips RSS feed.

Tech Tip: Setting ASCII Attributes

Snowbound Software’s RasterMaster Windows Imaging SDK includes the ability to import an ASCII file and set attributes such as font and point size.
RasterMaster auto-detects the type of file being imported by reading the header. For ASCII files, RasterMaster detects one of the ASCII characters in the first 10 bytes of the file. You can do this by setting the following function:

IMGLOW_set_auto_detect(38)

The most significant bit in each of the first 10 bytes cannot equal one, and the first 0x7F cannot equal any of the first 10 bytes of the ASCII file. Byte value (0x7F) should not be detected.

You can use the following functions to set ASCII attributes:

IMGLOW_get_ascii_attributes()

IMGLOW_set_ascii_attributes()

IMG_import_ascii()

The following shows some typical attributes:

asciiCharsPerLine=40;

asciiPointSize=24;

asciixdpi=200;

asciidpi=200;

Below is the structure for defining Snowbound ASCII attributes:

Syntax

typedef struct tagASCIITEXTATTR

{

INT         asciiFlags;        /* determines which fields to use */

INT         asciiXDpi;         /* horizontal dots per inch */

INT         asciiYDpi;         /* vertical dots per inch */

IMG_RECT    asciiMargin;       /* margins (1/1000 inches) */

INT         asciiTabStop;      /* # of chars between tab stops   */

INT         asciiPageWidth;    /* width of page (1/1000 inches) */

INT         asciiPageHeight;   /* height of page (1/1000 inches)*/

INT         asciiPointSize;    /* point size of the font */

INT         asciiCharsPerLine; /* number of characters per line */

INT         asciiLinesPerPage; /* number of lines per page*/

INT         asciiWeight;       /* normal = 0, bold = 1    */

INT         asciiItalic;       /* normal = 0, italic = 1  */

char        asciiTypeFace[32]; /* name of the font to use */

} ASCIITEXTATTR, FAR *LPASCIITEXTATTR;