1#!/bin/sh
2#
3# Canon BJC-240 Setup script
4#
5# Settings are:
6# Epson LQ emulation, A4, Code Page 866, 66 lines, Roman font, Smoothing,
7# HQ mode, no CR translation, power off in 10min, auto power on
8#
9
10printf "\033[K\00200\037" | tr 0 "\0"
11
12cat << EOF1
13BJLSTART
14ControlMode=BJ
15Font=Roman
16PageLength=12
17CodePage=866
18AutoLF=Off
19TextScaleMode=On
20AutoCR=Off
21CharacterSet=Set2
22AGM=Off
23BJLEND
24EOF1
25
26printf "\033[K\00200\037" | tr 0 "\0"
27
28cat << EOF2
29BJLSTART
30ControlMode=LQ
31Font=Roman
32PageLength=12
33CodePage=866
34AutoLF=Off
35TextScaleMode=On
36CharacterSet=Graphics
37International=USA
38BJLEND
39EOF2
40
41printf "\033[K\00200\037" | tr 0 "\0"
42
43cat << EOF3
44BJLSTART
45@SetControlMode=LQ
46BJLEND
47EOF3
48
49printf "\033[K\00200\037" | tr 0 "\0"
50
51cat << EOF4
52BJLSTART
53ControlMode=Common
54PrintMode=HQ
55Reduction=Off
56Smoothing=On
57PaperSelect=A4
58I/D-Buffer=Input
59AutoPowerOff=10
60AutoPowerOn=Enable
61BJLEND
62EOF4
63
64exec /usr/libexec/lpr/ru/koi2alt $*
65