Remote printing: good but how to change font size?

Hello QNXers,

Following QNX guidelines about TCP/IP printing I can now, under 6.1,
print to a LAN-connected Canon printer. Next, I would like to change
the font size if not the font itself. Whether a text file (.txt) or a
piece of code (.c) and using a command something like:

lpr -Plpt1 filename.txt

our Canon printer/fax/copier (running lpd) always gives me a fairly
big (12 pt?) Courier output.

When using NEdit (which I like very much) I can modify the screen font
but for printer changes I think I need to tweak an lpr argument
("-1234 font"??) or do something with an input filter
(/etc/printers/pcl.cfg ??).

Here’s my current functionally-OK printcap:

lpt1|canon|Big fat printer/copier/fax:
:lp=:
:rm=iR400:
:rp=print:
:mx#0:
:sd=/usr/spool/output/lpt1:
:lf=/usr/spool/errors:

The knowledge base article
http://qdn.qnx.com/support/bok/solution.qnx?10134 discusses altering a
printer config file for use with remote printer (in the context of
ncftpput) but what has that to do with requesting 10-pt Courier
instead of 12 pt?

Directions to Unix-oriented print tutorials would be appreciated.

Thanks,

Bob Bottemiller
Stein.DSI/Redmond, WA USA

Hi Bob,

I have spoken to one of the developers and he passed on the following info:

The default mode of a Canon printer is emulation of the
Epson LQ-2550 printer. You can select several typefaces and
change the pitch (horizontal characters per inch) by embedding
control codes in the text. For example to change the pitch
from the default 10 cpi to the more condensed 12 cpi put
the following hexadecimal codes at the beginning of your file:
0x12, 0x1B, 0x4D

If this works for your printer you could write an lpd style
filter to do it automatically.

The second part of the question relates to Knowledge base article
QNX 10134. This article describes how to print without using lpd,
using the spooler program built in to QNX 6.1. This allows you to
print graphical output directly from photon programs such as Voyager.
For instance you could use ped as your editor and print directly in
many fonts, sizes and (if you have a colour printer) colours.

The reason why you can do more this way is that the OS sends only
dots to the printer, instead of sending character codes and asking
the printer to create characters. To test whether this would work
for his printer, the user could proceed as follows:

  • slay the spooler: slay spooler
  • run the spooler: spooler -d/dev/par1 -cbjc.cfg
  • print a page from voyager but request the print to go to a file.
  • invoke the bjc print filter: phs-to-bjc printxx.phs > myfile.bjc
  • use ncftpput to send the resulting file to the network printer.


    Hope this helps
    Regards
    Brenda


    Bob Bottemiller <bob.bottemiller@fmcti.com> wrote:

Hello QNXers,

Following QNX guidelines about TCP/IP printing I can now, under 6.1,
print to a LAN-connected Canon printer. Next, I would like to change
the font size if not the font itself. Whether a text file (.txt) or a
piece of code (.c) and using a command something like:

lpr -Plpt1 filename.txt

our Canon printer/fax/copier (running lpd) always gives me a fairly
big (12 pt?) Courier output.

When using NEdit (which I like very much) I can modify the screen font
but for printer changes I think I need to tweak an lpr argument
("-1234 font"??) or do something with an input filter
(/etc/printers/pcl.cfg ??).

Here’s my current functionally-OK printcap:

lpt1|canon|Big fat printer/copier/fax:
:lp=:
:rm=iR400:
:rp=print:
:mx#0:
:sd=/usr/spool/output/lpt1:
:lf=/usr/spool/errors:

The knowledge base article
http://qdn.qnx.com/support/bok/solution.qnx?10134 > discusses altering a
printer config file for use with remote printer (in the context of
ncftpput) but what has that to do with requesting 10-pt Courier
instead of 12 pt?

Directions to Unix-oriented print tutorials would be appreciated.

Thanks,

Bob Bottemiller
Stein.DSI/Redmond, WA USA

Brenda,

Thanks a lot for the detailed response. I was able to use the Canon
printer’s setup instructions to change the default character pitch to
12 cpi. But I like your developer’s suggestion of embedded control
codes for maximum flexibility.
I hope to soon experiment with your second suggestion. I notice
/etc/printers has pcl.cfg and ps.cfg files in addition to bjc.cfg The
Canon responds to PCL format as well as plain text so there is hope
for nifty graphics output – though only B&W.

Thanks again…

On 27 Aug 2001 19:15:00 GMT, Gui Group <gui@qnx.com> wrote:

Hi Bob,

I have spoken to one of the developers and he passed on the following info:

The default mode of a Canon printer is emulation of the
Epson LQ-2550 printer. You can select several typefaces and
change the pitch (horizontal characters per inch) by embedding
control codes in the text. For example to change the pitch
from the default 10 cpi to the more condensed 12 cpi put
the following hexadecimal codes at the beginning of your file:
0x12, 0x1B, 0x4D

If this works for your printer you could write an lpd style
filter to do it automatically.

The second part of the question relates to Knowledge base article
QNX 10134. This article describes how to print without using lpd,
using the spooler program built in to QNX 6.1. This allows you to
print graphical output directly from photon programs such as Voyager.
For instance you could use ped as your editor and print directly in
many fonts, sizes and (if you have a colour printer) colours.

The reason why you can do more this way is that the OS sends only
dots to the printer, instead of sending character codes and asking
the printer to create characters. To test whether this would work
for his printer, the user could proceed as follows:

  • slay the spooler: slay spooler
  • run the spooler: spooler -d/dev/par1 -cbjc.cfg
  • print a page from voyager but request the print to go to a file.
  • invoke the bjc print filter: phs-to-bjc printxx.phs > myfile.bjc
  • use ncftpput to send the resulting file to the network printer.


    Hope this helps
    Regards
    Brenda


    Bob Bottemiller <> bob.bottemiller@fmcti.com> > wrote:
    Hello QNXers,

Following QNX guidelines about TCP/IP printing I can now, under 6.1,
print to a LAN-connected Canon printer. Next, I would like to change
the font size if not the font itself. Whether a text file (.txt) or a
piece of code (.c) and using a command something like:

lpr -Plpt1 filename.txt

our Canon printer/fax/copier (running lpd) always gives me a fairly
big (12 pt?) Courier output.

When using NEdit (which I like very much) I can modify the screen font
but for printer changes I think I need to tweak an lpr argument
("-1234 font"??) or do something with an input filter
(/etc/printers/pcl.cfg ??).

Here’s my current functionally-OK printcap:

lpt1|canon|Big fat printer/copier/fax:
:lp=:
:rm=iR400:
:rp=print:
:mx#0:
:sd=/usr/spool/output/lpt1:
:lf=/usr/spool/errors:

The knowledge base article
http://qdn.qnx.com/support/bok/solution.qnx?10134 > discusses altering a
printer config file for use with remote printer (in the context of
ncftpput) but what has that to do with requesting 10-pt Courier
instead of 12 pt?

Directions to Unix-oriented print tutorials would be appreciated.

Thanks,

Bob Bottemiller
Stein.DSI/Redmond, WA USA

Bob Bottemiller
Stein.DSI/Redmond, WA USA