Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to compress letters in clipper printer output when printing to a inkjet printer?

69 views
Skip to first unread message

LEXP

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
My problem is how can I print 132 col. reports in clipper 5.2 to an inkjet
printer which doesn't allow page orientation or font compression from front
panel.

The usual CHR things do not work.

Please help.

Tejpal Mehta
Ahmedabad, India
tejpa...@iname.com

Mike Warren

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
Some Cannon bubble jets have a dip switch you can set to emulate the
Epson command set. This might do it.

Mike

David G. Holm

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
You'll need to find a compressed font and then determine the printer command
to select that font. For example, for some HP DeskJet printers, the
following will work:

PUBLIC gcCompFont
gcCompFont := CHR(27)+"(s0P"+CHR(27)+"(s15H"+CHR(27)+"(s3T"
--
David G. Holm, Managing Member
Joint Software Development L.L.C
3134 Niles Rd Suite D
St Joseph MI 49085
(616)556-9600 Fax: 556-9950

Guido Coenen

unread,
Jul 26, 1999, 3:00:00 AM7/26/99
to
Hi Tejpal,

it depends if you have a GDI printer (most cheap printers are) or an
"intelligent" printer.

GDI printers don't print characters but only graphic; the whole
conversion between what your program sends and what your printer
prints is done by the printer driver. Most cheap printers are GDI
printers; which means, there is no chance of changing fonts from
Clipper because you cannot access the (Windows) printer driver from
Clipper.

If you have an intelligent printer, the printer itself has a special
command language; this is normally "PPDS" and/or "PCL5" mode. If you
have an intelligent printer (= expensive printers or very old
printers) you have to check the manual for the correct command code.
Send this code to the printer.
If the manual doesn't contain any command codes, in most cases you
have a GDI printer which can only be accessed via its Windows driver.

Another argument to jump away from Clipper to a Windows development
tool...

Good luck,
Guido.

Dave Holden

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
I would say that there is a more compelling argument to not buy cheap crap
Windoze printers or ever recommend them to a client, no matter how stingy
the client is. There was a rash of "WinModems" and "DSP modems" that
followed this same retarded design philosophy a while back. Thank goodness
that's over with. I think they are only available as prizes in boxes of
breakfast cereal now ...

Dave Holden
Holden Consulting, Abbotsford, BC, Canada


Guido Coenen <guido....@d.kamp.net> wrote in message
news:379cd89f...@news.kamp.net...

Sandeep Rao R

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
There is PRINTER.DBF at phil's site. Just Download it. contains all
required codes for handling various printers.

awhit...@my-deja.com

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
In article <7ni8et$sf4$1...@news.vsnl.net.in>,

"LEXP" <t...@lalanexp.com> wrote:
> My problem is how can I print 132 col. reports in clipper 5.2 to an
inkjet
> printer which doesn't allow page orientation or font compression from
front
> panel.
>
> The usual CHR things do not work.

What chr() codes are you using? Does the inkjet response to normal hp
lj codes? If so, have you tried to set the font to 16.66:
esc &k2S


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

osca...@zaz.com.br

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to
What printer???


LEXP wrote:

> My problem is how can I print 132 col. reports in clipper 5.2 to an inkjet
> printer which doesn't allow page orientation or font compression from front
> panel.
>
> The usual CHR things do not work.
>

Peter Lawrance

unread,
Jul 29, 1999, 3:00:00 AM7/29/99
to

Dave Holden wrote in message ...

>I would say that there is a more compelling argument to not buy cheap crap
>Windoze printers or ever recommend them to a client, no matter how
stingy...

Windoze - is that the popular OS from Microsludge?

Peter Lawrance


Guido Coenen

unread,
Jul 29, 1999, 3:00:00 AM7/29/99
to
Hi Dave,

I think we have to differ here between business use and private use.

As for myself, I see no argument against a cheap Windows printer for
my personal use at home. I for myself use an Epson GDI printer at
home.

In business, you should buy a printer with built-in printer language
just because you have to be sure the printer works with every program
you use (especially old-fashioned DOS programs). At work, we use
(intelligent) Lexmark Optra E series.

If you don't use DOS programs at work, the only argument against GDI
printers could be if you don't use windows - but how many PCs don't
run Windows at work??? (I don't speak of Macs here).

As a formerly dedicated Amiga user who shifted at the end of the 1980s
to PCs (and DOS), I never understood why there had to be a special
driver for each printer in each single DOS program. Amigas used
general printer drivers right from the start in 1984 or so.

Bye,
Guido.

On Tue, 27 Jul 1999 00:32:56 GMT, "Dave Holden"
<dho...@deadkenny.northern-lights.bc.ca> wrote:

>I would say that there is a more compelling argument to not buy cheap crap

all...@my-deja.com

unread,
Aug 12, 1999, 3:00:00 AM8/12/99
to
In article <7ni8et$sf4$1...@news.vsnl.net.in>,

I'm running into the same problem using three different COBOL
compilers. I've come to the conclusion that I have to design my own
font set to simulate the 10, 12, and 16 cpi print modes of the old dot
matrix printers. I'm doing this because there seems to be no
facilities, even at the windows API level, to print using a printers
native font set.

If you find a solution any time soon, please let me know.

Thanks
Allen Mconnell
all...@cdg-hargray.com

Damir (DMS)

unread,
Aug 12, 1999, 3:00:00 AM8/12/99
to
> "LEXP" <t...@lalanexp.com> wrote:
> > My problem is how can I print 132 col. reports in clipper 5.2 to an
> inkjet
> > printer which doesn't allow page orientation or font compression from
> front
> > panel.
> >
> > The usual CHR things do not work.

#define c12cpi CHR(27)+"M"
#define c15cpi CHR(27)+"g"
#define c17cpi CHR(15)
#define c10cpi CHR(18)

......source

PrintCode(c17cpi)

......source


FUNCTION PrintCode ( cCntrCode )
LOCAL nRow := PROW()
LOCAL nCol := PCOL()
QQOUT( cCntrCode )
SETPRC( nRow, nCol )
RETURN ( NIL )


Works from my apps with ALL printers (matrix,ink,laser)
Clipper5.2e + Blinker 3.3

Damir

Guido Coenen

unread,
Aug 12, 1999, 3:00:00 AM8/12/99
to
Hi ,

once again: Most printers nowadays don't have a native font set; they
only have a windows driver that uses windows printer fonts (= GDI
printers).

If your printer has a native font set, you can use it with the proper
printer command (CHR$(27)+CHR$(18) and so on) just like you did it
from within DOS. There is no difference between using a non-GDI
printer from Windows or from DOS. It's not a compiler problem, but a
missing hardware feature.

If your printer has no font set, you can't use your printer's font
set.


Good luck,
Guido.

osca...@zaz.com.br

unread,
Aug 13, 1999, 3:00:00 AM8/13/99
to
What printer??


all...@my-deja.com wrote:

> In article <7ni8et$sf4$1...@news.vsnl.net.in>,


> "LEXP" <t...@lalanexp.com> wrote:
> > My problem is how can I print 132 col. reports in clipper 5.2 to an
> inkjet
> > printer which doesn't allow page orientation or font compression from
> front
> > panel.
> >
> > The usual CHR things do not work.
> >

> > Please help.
> >
> > Tejpal Mehta
> > Ahmedabad, India
> > tejpa...@iname.com
>

> I'm running into the same problem using three different COBOL
> compilers. I've come to the conclusion that I have to design my own
> font set to simulate the 10, 12, and 16 cpi print modes of the old dot
> matrix printers. I'm doing this because there seems to be no
> facilities, even at the windows API level, to print using a printers
> native font set.
>

tc_fr...@my-deja.com

unread,
Aug 13, 1999, 3:00:00 AM8/13/99
to
In article <7ni8et$sf4$1...@news.vsnl.net.in>,
"LEXP" <t...@lalanexp.com> wrote:
> My problem is how can I print 132 col. reports in clipper 5.2 to an
inkjet
> printer which doesn't allow page orientation or font compression from
front
> panel.
>
> The usual CHR things do not work.
>
> Please help.
>
> Tejpal Mehta
> Ahmedabad, India
> tejpa...@iname.com
>
>

I use HP inkjets and it works qith the same caracter codo for the laser
printers.
I use the followen commands for the caracters

small_L := 'chr(27)'+'+"(s9.5v16.67h-3b1q6T"'
big_L := 'chr(27)'+'+"(s12v10h1q3T"'
BOLD_L := 'CHR(27)'+'+"(s3B"'
NOBOLD_L := 'CHR(27)'+'+"(s-3B"'
COMP1_L := 'chr(27)'+'+"(s20h12v0s-3b1q6T"'
NCOM2_L := 'chr(27)'+'+"(s12v10h1q3T"'

(s is for begening
xxv is for the vertical size
xxh is for horizontal separation
xxb is for the bolds
1q is for draft quality
2q is for normal quality
3t is for courier
6t is for gothic letter
0s is for upright letter
1s is for italic letter
&l1X is for one copy
&l2X is for 2 copys
&l0o is for portrait
&l1o is for landscape

You can beginin with anyone but only put capital letrrer to the end, is
the only condition for the code, only mins in the midle and cap in the
end. And you can put one, two, three or all comands in a line

This works very fine for my in the deskjets series 600 and 700

0 new messages