Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Escape! V3.0 - <b>hpconfig()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpConfig()

Configure the laser printer to print with the correct page size, orientation,
and number of copies


Syntax

hpConfig( [<cPageSize> [,<cOrient> [,<nCopies> [,<cPrinter>]]]] )


Parameters

<cPageSize>
The name of the paper size to be loaded in the laser
printer.  Defaults to 'LETTER'.  The following
expressions for <cPagesize> are supported:
"LETTER"        8 1/2' x 11' standard size paper.
"LEGAL"         8 1/2' x 14' paper.
"EXEC"          7 1/4' x 10 1/2' paper.
"A4"            210mm x 297mm paper
"LETENV"        3 7/8' x 7 1/2' Monarch envelope.
"BUSENV"        4 1/8' x 9 1/2' envelope.
"DLENV"         110mm x 220mm International DL envelope.
"C5ENV"         162mm x 229mm International C5 envelope.

<cOrient>
Selects portrait or landscape orientation.  Defaults to
"P".  Values can be:
"P"     Portrait
"L"     Landscape

<nCopies>
The desired number of copies to be printed. <nCopies>
must be a number from 1 to 99.  If <nCopies> is omitted,
Escape! will default the number of copies to 1 (this can
be changed later with hpCopy()).

<cPrinter>
The HP printer model which the application will be
printing to.  Defaults to "II".  Escape! will use this
information in order to determine the optimal way to
perform the desired tasks.  Values can be:
"I"     original LaserJet
"+"     LaserJet +
"500"   LaserJet 500
"IIP"   LaserJet series IIP
"IIP+"  LaserJet series IIP+
"II"    LaserJet series II
"IID"   LaserJet series IID
"IIIP"  LaserJet series IIIP
"III"   LaserJet series III
"IIID"  LaserJet series IIID
"IIISI" LaserJet series IIIsi
"2000"  LaserJet 2000
If the printer you own is not in the above list,  specify
the model which most closely matches your printer
model.


Returns

0
Successful.

-11
Invalid paper size specified.

-17
Incorrect parameter type was passed.

-20
Unsupported printer specified.


Remarks

hpConfig() (as well as hpSetFont()) must be called at the beginning of
your printing applications any time one of the other Escape! library
functions is used.  Besides setting the paper size, orientation and
number of copies, hpConfig() also initializes variables which are critical
in order for the other Escape! library functions to perform properly.


Support By

All HP Laser Printers.


Example

hpPrintOn()
hpConfig('LETTER', 'P', 1, 'II')
.
.          // your printing application
.
hpReset()
hpPrintOff()

See Also: hpSetup() hpSetFont()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson