Salesforce

Printer Settings (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Printers Settings (Magic xpa 2.x)

The Magic xpa Printer repository lists the installation's available printing devices and their attributes. Each entry in the repository is a logical Magic xpa printer. Only references to logical printers are allowed within a Magic xpa project. The entries in the Printer repository comprise the Printer list used for directing I/O devices (operating system text files) to a printing device. When output operations to Printer Media are performed at runtime, Magic xpa consults the Printer repository for the physical printer attributes.

In the Printer repository you can direct the output to local or remote printers.

Printer repository information is contained in the [MAGIC_PRINTERS] section of the Magic.ini file.

The Printer repository includes the following columns:

Column

Description

#

The printer identifier (#) used in the project. Magic xpa sets this column automatically.

Name

The Logical Printer's name. This is the name that will appear in the Printer list selection window. The printer name is the data string registered in the Magic xpa program as the printer identifier. The printer name specified here is searched for at runtime when the Magic xpa program tries to resolve the logical printer name to get the actual printer data.

The physical printer that will receive all the output directed to the current logical printer. You can specify either a local or a remote printers. The Queue setting is a string value. Magic xpa parses this string and extracts valid information. If no valid printer information is found, the logical printer will default to the operating system's default printer (for example, LPT1). Select Edit/Wide (F6) if you need to specify a longer name.

Commands File

The location and operating system name of the file that contains the printer control codes that will be used to resolve the logical Magic xpa Print Attributes.

The Printer Commands file contains both labels and printer control codes. The Magic xpa Print Attributes are built using these labels. When a Magic xpa form is printed, the logical Print Attributes are translated according to the information found in the printer's commands file. Printer Commands files of different printers may contain the same labels. The same program may output different results when the Printer Commands file is different.

The Printer Commands file lists the actual printer control codes (escape sequences) for each print style.

For example:

  • Portrait orientation=0x1b,0x26,0x6c,0x30,0x4f

  • Landscape orientation=0x1b,0x26,0x6c,0x31,0x4f

  • 12 lines per inch=0x1b,0x26,0x6c,0x31,0x32,0x44

  • 24 lines per inch=0x1b,0x26,0x6c,0x32,0x34,0x44

Each entry is either of the form: style-name=start-sequence:end-sequence or style-name=start-sequence

where style-name is a user-defined style name that appears in the Printer Commands file, start-sequence is a printer control (escape sequence) string that is to be sent to the printer at the beginning of a text section that is to appear in the given print style, and end-sequence is the escape sequence string that is to be sent to the printer at the end of such a text section. The start-sequence and end-sequence must be separated by a colon.

The second form is for printer commands that do not require a terminating sequence, such as a restart command.

Two sample Printer Commands files are supplied with Magic in the support folder. These are:

  • LJ3.ATR for an HP Laserjet printer

  • EPSON.ATR for an Epson printer and compatible

If you want to modify the Printer Commands file, use a text editor.

Translation File

The location and operating system name of a file containing a conversion table for converting Magic xpa's internal character codes to the physical printer's codes. The translation file has 256 entries, one per ASCII character code, which is the internal Magic xpa character set. Each entry specifies the string substitute of the character that will be sent to the printer. The printer strings may contain single or multi-character codes. You may also include control codes in these strings.

See also Printing OEM/ANSI Characters

The page size Magic xpa uses while printing to the printer. This page size does not have to be identical to the physical printer's page size. Usually the Lines setting specifies a value which is less than the number of lines per page of the physical printer. The Lines setting value is used for Magic xpa's internal accounting while Magic xpa keeps track of printer output. After sending a number of lines equal to the value of the Lines setting, Magic xpa will send a form feed signal to the printer. The Lines setting is used as the default for the current printer and may be overridden by the Rows setting in the particular I/O device used for a Form Output operation.

Reference
Attachment 
Attachment