On an older SCO-Unix system we have, there is a wonderful program called laserlp, which sends files to the terminal (terminal emulator's) attached VT102 printer and fits even wide-column reports into a portrait-printed page on HP printers. I Googled for this utility, and cannot find its origins, so I am thinking it came with SCO.
I have a linux-equivalent program that will send files to the attached VT100 printer
void ptr_on()
{
printf("%c[5i",27);
}
However, my attempts to turn the alter the internal codes in the HP printer have failed.
void ptr_on()
{
char esc_buf[6] = {0};
esc_buf[0] = (char ) 40;
esc_buf[1] = (char ) 115;
esc_buf[2] = (char ) 49;
esc_buf[3] = (char ) 50;
esc_buf[4] = (char ) 72;
printf("%c[5i", 27);
printf("%c%s", 27, esc_buf);
}
Has anyone written a utility that will pass print jobs to the VT102 printer and sent internal esc codes to an HP printer, and would you be willing to share your knowledge?
tnx
cmn
P.S. Here is a link to the codes I used:
http://www.dragon-it.co.uk/links/hp_pcl_codes.htm