Setting a numeric value in the printer

pset()

Set a numeric value in the printer


SYNTAX

pset(seqno, value)

Set a numeric value in the printer. These are defined in Section 10 (Numeric value sequences) of the printer parameter file.

The include file <printer.h> contains mnemonic manifest constants which may be used to replace the sequence number. The value may be any expression which evaluates to an integer.

The available print values are as follows:

Manifest constant

Meaning

PV_LINES_PER_INCH

Lines per inch

PV_VMI

Vertical motion index

PV_HMI

Horizontal motion index

PV_PAGE_LENGTH

Page length

PV_TOP_MARGIN

Top margin

PV_TEXT_LENGTH

Text length

PV_LEFT_MARGIN

Left margin

PV_RIGHT_MARGIN

Right margin

PV_VERT_POSN_ROW

Vertical position (rows)

PV_VERT_POSN_DOT

Vertical position (dots)

PV_VERT_POSN_DCP

Vertical position (decipoints)

PV_HORZ_POSN_COL

Horizontal position (columns)

PV_HORZ_POSN_DOT

Horizontal position (dots)

PV_HORZ_POSN_DCP

Horizontal position (decipoints)

PV_CHARS_PER_INCH

Characters per inch

PV_FONT_HEIGHT

Font height (points)

PV_FONT_WEIGHT

Font weight

PV_NO_OF_COPIES

Number of copies

PV_DEGREES_ROTATION

Degrees of rotation

PV_LEFT_OFFSET_REGN

Left offset registration

PV_TOP_OFFSET_REGN

Top offset registration

PV_UNIT_OF_MEASURE

Unit of measure (units/inch)

So, the commands:

print pset(PV_FONT_WEIGHT,3)

print pset(17,3)

are identical.


Windows print mode

The pset function is is intended mainly for use with direct print mode. In Windows print mode, it sends a sequence using the Windows API function Escape(). This bypasses the Windows mechanism and sends the sequence directly to the device driver. In most cases this feature is useless, because it is out of sequence with the page being buffered by Windows. This is a limitation of Windows, not of Sculptor.

Possible uses for pset in Windows print mode are:

1

To initialise a feature in the printer that is not supported by Windows. It would be necessary to do this before printing started.

2

To cause an action on the printer that does not affect the printed page, e.g. sounding a bell to alert the operator.

Print mode is set in the General Information section of the printer parameter file.


NOTES

  • It is normally appropriate to terminate a print command which involves only calls to pset(), psc(), pstext() and puc() (functions which produce no actual printed output) with a semicolon, as otherwise a new line is thrown.


EXAMPLE

print pset(PV_LINES_PER_INCH,7);
print pset(PV_NO_OF_COPIES, tmp.Copies);

RELATED TOPICS

Reports

Report functions

psc()

puc()

pstext()