The WINDOWS.WPD file is a simple text file, most of which is organized in table format made up of rows and columns. The rows represent Printer Codes, the columns represent the settings assigned to each Code. Each setting must start at an exact column position and contain the exact number of characters (and/or spaces) required by each setting field. Settings may be changed by editing the file using Notepad or any plain text editor.
The WINDOWS.WPD file also supports the following settings which are located at the top of the file, before the table of Printer Code settings:
CPI= Defines the number of characters per inch horizontally on the page (default = 10). More characters per inch results in smaller fonts. If the CPI is changed from the default, it is also be necessary to change the Width setting on the Printer Codes screen of the Keystroke printer driver.
LPI= Defines the number of lines per inch vertically on the page (default = 6). More lines per inch results in less space between lines and more lines on a page. If the LPI is changed from the default, it is also be necessary to change the Length setting on the Printer Codes screen of the Keystroke printer driver.
TopMargin= Defines the number of lines from the top of the page to the top of the printable area (default = 0). The actual size of the margin depends on the LPI setting. Labels and Matrix Reports control their own TopMargin settings and Keystroke adds both settings together to determine the final margin size.
LeftMargin= Defines the number of characters from the left side of the page to the printable area (default = 0). The actual size of the margin depends on the CPI setting.
The table of Printer Codes includes the following setting fields:
Heading - Description - Parameters - Start - Width
Code - # or name for the Printer Code - Any characters - 1 - 4
Font Name - Font the Printer Code uses - A Windows font - 7 - 32
CPI - Characters Per Inch - Integer or decimal - 40 - 9
Size - Font size - Integer or decimal - 50 - 9
Char Set - Character set - Integer (0-255) - 60 - 4
Bold - Turn bold ON/OFF - 1=ON,0=OFF - 65 - 4
Italic - Turn italic ON/OFF - 1=ON,0=OFF - 70 - 4
Undrline - Turn underline ON/OFF - 1=ON,0=OFF - 75 - 4
Strk Thru - Turn strike through ON/OFF - 1=ON,0=OFF - 80 - 4
Color - Color of text(Color printers only) - Integer (0-15) - 85 - 4
WINDOWS.WPD File Details:
When editing the WINDOWS.WPD file, it may help to think of the file as a grid, where each line contains a specific number of spaces. To edit a setting, change the text in the appropriate row and column(s). For example, the Code field starts at position 1, and must make up exactly 4 spaces. If the text in this field is only 3 characters, an additional space must be added to make the field fill up 4 spaces. The next field, Font Name, begins at position 7, so there must also be 2 spaces between these fields (otherwise it would start at position 5). Any combination of available settings may be applied to any of the Printer Codes. It is important that spacing in this file be exact. Do not use the [Tab] key to line up the columns. If an edited line results in incorrect spacing, Keystroke ignores the line.
The Code setting defines the number or name of a particular Printer Code. The Code field starts at position 1 and is limited to 4 characters. The first Code is named Def, for Default. All of the codes that follow are in numbered pairs (i.e., 1+, 1-). The plus (+) Code turns a setting ON; the minus (-) Code turns it OFF. The absolute maximum number of Code entries is 15+/-. Keystroke ignores any entries past this limit.
The Font Name setting defines the font that the Printer Code will use. The default font is Courier New. Font Name must be a name that the Windows operating system will recognize as a font name (i.e., it must be a currently installed font). The Font Name field starts at position 7 and is limited to 32 characters (the maximum length for a standard Windows font name). If the Font Name is blank, Keystroke continues to use the current font. Changing fonts may also automatically change the Character Set, resulting in unwanted text characters appearing instead of lines and other graphics characters. To restore line drawing and graphics characters, the OFF setting should set both the Font Name and The Character Set back to the default values of Courier New and 255 respectively.
CPI and Size
The CPI and Font Size settings both control the font size. If both columns contain an entry, Keystroke uses the CPI setting, and ignores any setting the Size field. If the CPI field is blank, Keystroke uses the Size setting. If both the CPI and Size fields are blank, Keystroke continues to use the current font size setting.
CPI stands for Characters Per Inch and controls the font size by setting the number of characters (or spaces) in a horizontal inch of text. The CPI setting can be either an integer or a decimal value. The CPI field starts at position 40 and is limited to 9 characters.
The Size setting controls the font size if the CPI column is blank. The Size setting can be either an integer or decimal value and represents the font size (height) in Points, which is the standard by which most Windows applications typically determine font size. The Size field starts at position 50 and is limited 9 characters.
The Character Set determines which extended characters a font will use. Extended characters are those that don't usually appear on the keyboard and are entered by using the [Alt] key plus the character code in most Windows fonts. Extended characters are those that are commonly used in other languages or for other specialized purposes. Special printing formats, such as barcodes, may also require a different character set.
Some fonts also include a set of extended characters which non-Windows applications traditionally use to draw lines, boxes, and dark or shaded areas (Character Set 255). Keystroke still uses Character Set 255 to support older installation where some invoice and purchase order forms may still be using such line draw characters. Therefore, this setting should be left at 255 in order for line drawing and other extended characters to appear properly. The only potential circumstance that would require changing this setting would be if a barcode font requires a different character set.
The Character Set can be an integer from 0 to 255, representing the number of the character set that Keystroke uses. The Character Set field starts at position 60 and is limited to 4 characters.
Note: Changing the Font Name setting may automatically change the Character Set setting as well. As part of the Code to turn a Font Name OFF (and restore the default font settings), it is recommended to also reset the Char Set to 255.
The Bold setting turns the printer's Bold command ON or OFF. The Bold setting may contain either 1 or 0 (where 1=ON and 0=OFF). The Bold field starts at position 65 and is limited to 4 characters.
The Italic setting turns the printer's Italic setting ON or OFF. The Italic column may contain either 1 or 0 (where 1=ON and 0=OFF). The Italic field starts at position 70 and is limited to 4 characters.
The Underline setting turns the printer's Underline command ON or OFF. The Undrline column may contain either 1 or 0 (where 1=ON and 0=OFF). The Undrline field starts at position 75 and is limited to 4 characters.
The Strikethrough setting turns the printer's Strikethrough command ON or OFF. The Strk Thru column may contain either 1 or 0 (where 1=ON and 0=OFF). The Strk Thru field starts at position 80 and is limited to 4 characters.
The Color setting controls the color of the printed output from a color printer. The Color column may contain a integer from 0 through 15, each representing a specific color as indicated below. The Color field starts at position 85 and is limited to 4 characters.
7-Gray - 25%
8-Gray - 50%
Configuration Manager Contents