Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to customize default printer settings?

Status
Not open for further replies.

RNTH

Programmer
Jul 27, 2005
19
IN
Hi all,

Can we specify the default printing settings of a printer using PCL commands?

For example, I would like to make my printer's default settings as,

Font - Letter gothic 17 chars/inch and 8 lines/inch.
Margin - 2 columns left(&a2L) and 2 lines top(&l2E).
Orientation - Landscape

My requirement is, if I am not specifying anything in my program, the printer should take these settings, and if I am giving some commands explicitly, they should over ride these defaults. Could anyone of you please help me to achieve this?

Thanks in advance,
RNTH.
 
I would think the easiest way would be to set the defaults
with the printers LCD or whatever method it uses.
Secondarily, always use the font/size that you want when
printing. That is, always program it in.
 
These commands depend on the font availability in the printer and the emulation of PCL, but should help you a little in working out what to do to get what you want. Hope these commands help.

e$=chr$(27$) ' <esc>

'Letter Gothic
e$;"(8U";e$;"s0p???h0s0b4102T"; ' ??? is pitch size

' Landscape Orientation
e$;"E";e$;"&l1O"; ' reset/landscape

'Set top margin (change 0 to set new margin)
e$;"&l0E"; ' set top margin to 0

' Feed from manual tray
lprint e$;"&l2H";

' Set different page sizes
lprint e$;"&l3A";

' set top offset to move page down
e$;"&l200Z";

' Number of duplicate copies of page to print
lprint e$;"&l1X";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top