Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 339 additions & 0 deletions cjet/COPYING

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions cjet/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Thu Feb 22 12:37:46 1996 Michael <mike@marune>

* cjet version 0.8.9, 22.02.1996
* symbol.h, symbol.c: new PCL symbol sets: Desktop, MCText, VenturaUS,
Ventura International, Ventura Math, PSText, PSMath. (Questionable
usefulness :))
symbol set handling fixups: allow selection of characters from
more graphic sets to fill in missing characters. Characters in control
code positions (not all, of course) are forceprinted as characters.

Fri Jan 26 14:30:03 1996 Michael <mike@marune>

* cjet version 0.8.8
* symbol.c: translate()
* fonts.c: ignore selection of nonexistent download fonts instead of
terminating abruptly
* misc.c: PrintControlChar()
* fixed(?) a download font problem: force printing of characters in control
code areas; CaPSL can't always make up its little mind and loses some
download characters on the first page; they started to appear somewhere
in the middle of the page or else on the next page.

* cjet version 0.8.7, 17.01.1996

* pjl.c: new file: parse and ignore PJL sequences

* fonts.c: removed (obsolete?) PCL font descriptor warning

* function.c: added ESC &u # D (Set Units per Inch (PCL5e), added
appropriate parsing structure in parse.c

* added ESC % # X Universal language exit (no-op)

Mon May 15 19:35:05 1995 mike <mike@marune>

* cjet version 0.8.6 doc fix

* cjet version 0.8.5

* raster.c: fixed mode 3 decompression; garbage was left in the
decompression buffer.

30 changes: 30 additions & 0 deletions cjet/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
CJET - HP Laserjet Emulation for Canon CaPSL (level III+) laser printers
Copyright (c) 1996 Michael Huijsmans mgh@sbox.tu-graz.ac.at
--------------------------------------------------------------------------

Compilation & "installation":

0. Makefiles:

- `Makefile' is for any UNIX system. Executable is `cjet'.

- `make.dj' is for MSDOS and djgpp. Resulting program name is `cjetx.exe'.

- `make.bcc' and `cjets.rsp' are for use with Borland C++ 3.1. Resulting
program name is `cjets.exe'.


1. Edit the appropriate Makefile for your system (CC etc.)
Defaults are for gcc.

2. Edit "config.h" to #define your printer paper cassette size and default
symbol set. Defaults are European A4 paper and Roman-8.

3. type `make -f <appropriate Makefile>' for DOS or just `make' for UNIX

4. Copy the executable to somewhere in your PATH.





36 changes: 36 additions & 0 deletions cjet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Makefile for CJet - LaserJet Emulation for CaPSL printers
# Copyright (C) 1996 Michael Huijsmans mgh@sbox.tu-graz.ac.at
#
# Makefile for UNIX systems
#

# compiler, compiler and linker options
CC = gcc
OPT = -O2 -Wall
LINKOPT = -s

# you should not need to change anything below

SHELL = /bin/sh

EXECNAME = cjet

CFLAGS = $(OPT)
LDFLAGS = $(LINKOPT)

OBJ = main.o parse.o function.o raster.o fonts.o misc.o symbol.o\
page.o pjl.o macro.o io.o


cjet: $(OBJ)
$(CC) $(LDFLAGS) -o $(EXECNAME) $(OBJ)

clean:
rm -f *.o $(EXECNAME)


$(OBJ): pcl.h cjet.h capsl.h
symbol.o: symbol.h



160 changes: 160 additions & 0 deletions cjet/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
CJET - HP Laserjet Emulation for Canon CaPSL (level III+) laser printers
Copyright (c) 1996 Michael Huijsmans

email: mgh@sbox.tu-graz.ac.at

--------------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should also have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
--------------------------------------------------------------------------
Contents of this file:

0. What is Cjet?
1. Supported machines
2. Usage
3. Features
4. Notes & Bugs

See file INSTALL for compilation instructions.

See file TODO for missing features


0. What is it?
--------------

CJET filters printer data from stdin to stdout, converting HP PCL
(Printer Command Language) escape sequences and data structures,
e.g. font headers, to their CaPSL equivalents. CaPSL is short for
`Canon Printing Systems Language'. Whereas PCL is a de-facto
world-wide standard as a laser and inkjet printer control language (if
you can call a bunch of escape sequences a `language'), CaPSL is
limited to Canon laser printers. Newer laser printers from Canon come
with PCL emulation, so CaPSL may well be facing extinction.



1. Supported machines:
----------------------

The program itself should compile on any UNIX or UNIX-like system.
It even compiles under MS-DOS. (BC 3.1 and DJGPP).

A Canon laser printer with CaPSL level III is required.


2. Current usage:
-----------------

cjet [options] <PCL-input >CaPSL-output

Current options:
----------------

-f set CaPSL paint mode to 'full'. Default is 'partial'.
Full paint mode requires at least 1.5MB printer memory.
Not very useful right now.

-p ignore paper size commands. Useful for printing files
formatted for paper size X on printers with paper size Y.

-q quiet mode. Suppresses all warning messages

-x X shift output on paper by X dots horizontally. Positive values
of X shift to the right; negative values to the left.
Dots are 1/300 in.

-y Y shift output on paper by Y dots vertically. Positive values
of Y shift downwards; negative values shift upwards.


3. Features:
------------

Cjet currently `emulates' a LaserJet II and supports some PCL features
found on later LaserJet models like the LaserJet IIp, IIIp, 4l. Not all
PCL commands are supported or fully functional; see the Missing / TODO
file TODO. The emulation is fairly complete; I emphasized the font
download and raster graphics stuff in favor of the plain text stuff
because I needed a TeX DVI driver ASAP. Among other things, Cjet
supports the following:

- PCL Laserjet download fonts: auto-rotating and old-style landscape
types

- PCL 5 raster compression modes 1, 2 and 3

- Roman-8, ISO Latin 1, Windows, PC-8, PC-850, PC-8D/N, and various other
symbol sets for text - mode printing

- PJL sequences for newer LaserJet models are parsed and ignored (dvilj4l)


Cjet was "tested" with:

- PCL output from dvilj, dvilj2p, dvilj4l: TeX DVI drivers for various
LaserJet models: LJII / LJIIp / LJ4l

- PCL output from misc. software, e.g. the ljet3 driver in GhostScript
version 3.12, the LJIIIP driver in Windoze 3.1 (Note: see TODO on this)



4. Notes:
---------

PJL (Printer job language) sequences (in output from dvilj4l) are now ignored.

I mainly use `cjet' under Linux to convert PCL output from dvilj2p, a
TeX DVI driver for various flavours of LaserJet printers. It seems to work
(I can read what the Canon prints), at least for the 128-character fonts.
The newer 256-character fonts shouldn't pose any problems, except for the
fact that then only 16 download fonts are possible. This leads to
unpredictable results when more fonts get downloaded.
A workaround for this of course is to split the printing job into
smaller chunks.
I also prefer using GhostScript with the ljet3 driver and cjet instead
of the lbp8 driver because the lbp8 output gets shifted down and to
the right for some reason; with cjet I can shift it right back...
Caution: PCL mode 3 compressed raster data usually produces HUGE
amounts of CaPSL raster data, as CaPSL level III does not support any
compression.

My printer is a Canon LBP-8 III+ with 1.5Mb memory. `Cjet' should(?)
also work for other Canon printers with less memory (LBP-4, LBP-4U),
except for full-page raster graphics, but I couldn't test this.
Anyway, enough paper was wasted already...

The printers must support CaPSL level III or higher.


Bugs:
-----
Version 0.8.9:
A quasi-bug involving missing download characters in control code positions
has been fixed.
Selection of nonexistent download fonts (dvilj) is now ignored.


----
Email bug reports, suggestions, remarks etc. to me at:

mgh@sbox.tu-graz.ac.at

However, I can't promise prompt reaction, as I *really* have other
things to do...




37 changes: 37 additions & 0 deletions cjet/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Missing / TODO:

- The character table for Ventura Math is probably not correct

- rearrange PCL font downloads in the middle of pages so that CaPSL doesn't
eject the page in panic

- better page stuff handling ( sizes and such )

- PCL 5 text attribute stuff - ESC (s # S

- Macro and overlay stuff

- HPGL support (some time)

- some sort of init file to set cassette paper size, default font, font
catridges etc.

What won't work :

- some PCL files (e.g. at least one file created by the Ljet3p driver
in Windoze 3.1) download single characters in the middle of the page;
CaPSL will eject the current page at that point

- Newer LaserJet models have more internal scalable fonts, the selection
of which will be at best ignored.

- Reverse portrait / reverse landscape printing - ESC &l # O and ESC &a # P

- Some lesser known or obsolete symbol sets or sets supplied with external
cartridges (which ones are obsolete ?) will not print correctly.

- download symbol sets - ESC*c # R, ESC*c # S, ESC (t or (f # W (?)
(neither PCL nor CaPSL manuals available)

- PCL 5 transparency mode pattern stuff (Is it useful ? Does anybody use it ?)

Loading