File: IFHP-Reference.html

package info (click to toggle)
ifhp 3.5.20-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,424 kB
  • sloc: ansic: 15,055; sh: 12,037; perl: 1,461; makefile: 643; sed: 16
file content (10372 lines) | stat: -rw-r--r-- 360,881 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>IFHP Reference Manual</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.7">
  </head>

  <body class="BOOK" bgcolor="#FFFFFF" text="#000000" link=
  "#0000FF" vlink="#840084" alink="#0000FF">
    <div class="BOOK">
      <a name="AEN1"></a>
<table><tr valign=top>
<td>
<a href="http://www.lprng.com">
<img align=left SRC="LPRng.jpg" ALT="LPRngLogo" height=60>
</a>
</td>
<td></td>
<td>
<a href="http://www.lprng.com">
<img align=left SRC="LPRngT-L.jpg" ALT="ifhp" height=75>
</a>
</td>
<td>
<a href="http://www.lprng.com">
<img align=left SRC="ifhp-S.jpg" ALT="ifhp" height=60>
</a>
</td>
</tr></table>

      <div class="TITLEPAGE">
        <h1 class="TITLE"><a name="AEN2">IFHP Reference
        Manual</a></h1>

        <h2 class="SUBTITLE">5 Oct 2004 (For ifhp-3.5.20)</h2>

        <h3 class="AUTHOR"><a name="AEN5"></a>Patrick A Powell</h3>

        <div class="AFFILIATION">
          <div class="ADDRESS">
            <p class="ADDRESS"><code class="EMAIL">&lt;<a href=
            "mailto:papowell@astart.com">papowell@astart.com</a>&gt;</code><br>

            AStArt&nbsp;Technologies&nbsp;addr<br>
            6741&nbsp;Convoy&nbsp;Court,<br>
            San&nbsp;Diego,&nbsp;CA&nbsp;92111<br>
            Phone&nbsp;858-874-6543<br>
            Fax&nbsp;858-751-2435</p>
          </div>
        </div>

        <p class="COPYRIGHT">Copyright &copy; 2002 Patrick
        Powell</p>

        <div>
          <div class="ABSTRACT">
            <a name="AEN21"></a>

            <p>The <b class="APPLICATION">ifhp</b> program is an
            enhanced, extended, highly configurable, and portable
            implementation of a print filter for use with the <b
            class="APPLICATION">LPRng</b> Print spooler package.
            <var class="LITERAL"><b class=
            "APPLICATION">ifhp</b></var> supports network, serial,
            and parallel printers, does page accounting and job
            recovery, and allows an extremely high level of
            configuration and tuning. <var class="LITERAL"><b
            class="APPLICATION">ifhp</b></var> gets its flexibility
            by using a configuration file to set its operational
            characteristics. The configuration file can contain
            multiple separate printer configurations and the
            configuration selection is done by a very simple
            command line option. The filter supports text,
            PostScript, PCL, and PJL printers, and can be
            configured to handle a wide range of printer quirks and
            mis-implementations.</p>
          </div>
        </div>

        <div class="LEGALNOTICE">
          <a name="AEN18"></a>

          <div class="IMPORTANT">
            <blockquote class="IMPORTANT">
              <p><b>Important:</b> THIS DOCUMENTATION AND THE
              DESCRIBED SOFTWARE IS PROVIDED BY THE AUTHORS "AS IS"
              AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
              NOT LIMITED TO, THE IMPLIED WARRANTIES OF
              MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
              ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE
              LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
              EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
              NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
              SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
              INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
              LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
              TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
              ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF
              ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
            </blockquote>
          </div>
        </div>
        <hr>
      </div>

      <div class="TOC">
        <dl>
          <dt><b>Table of Contents</b></dt>

          <dt><a href="#AEN29">Preface</a></dt>

          <dd>
            <dl>
              <dt>1. <a href="#AEN31">Introduction</a></dt>

              <dt>2. <a href="#AEN38">Acknowledgements</a></dt>

              <dt>3. <a href="#AEN43">Shell Prompts</a></dt>

              <dt>4. <a href="#AEN62">Typographic
              Conventions</a></dt>

              <dt>5. <a href="#AEN111">Notes, warnings, and
              examples</a></dt>
            </dl>
          </dd>

          <dt>1. <a href="#AEN120">Introduction</a></dt>

          <dd>
            <dl>
              <dt>1.1. <a href="#AEN153">Copyright and
              Disclaimer</a></dt>

              <dt>1.2. <a href="#AEN161">Commercial
              Support</a></dt>

              <dt>1.3. <a href="#AEN167">Web Site</a></dt>

              <dt>1.4. <a href="#SECFTP">FTP Sites</a></dt>

              <dt>1.5. <a href="#AEN207">Mailing List</a></dt>

              <dt>1.6. <a href="#AEN214">PGP Public Key</a></dt>
            </dl>
          </dd>

          <dt>2. <a href="#AEN221">Software Installation and
          Configuration</a></dt>

          <dd>
            <dl>
              <dt>2.1. <a href="#AEN235">Additional Recommended
              Software</a></dt>

              <dt>2.2. <a href="#AEN305">Installation</a></dt>

              <dt>2.3. <a href="#MODELSELECTION">Printer Models
              Supported</a></dt>
            </dl>
          </dd>

          <dt>3. <a href="#AEN1670">Recommended -Z options for
          Users</a></dt>

          <dd>
            <dl>
              <dt>3.1. <a href="#AEN1675">Input Tray
              Selection</a></dt>

              <dt>3.2. <a href="#AEN1694">Output Bin
              Selection</a></dt>

              <dt>3.3. <a href="#AEN1712">Media Size (Paper)
              Selection</a></dt>

              <dt>3.4. <a href="#AEN1734">Media Type
              Selection</a></dt>

              <dt>3.5. <a href="#AEN1746">Duplex and
              Simplex</a></dt>

              <dt>3.6. <a href="#AEN1776">Copies</a></dt>
            </dl>
          </dd>

          <dt>4. <a href="#AEN1787">Printer Capabilities,
          Configurations, and Printcaps</a></dt>

          <dd>
            <dl>
              <dt>4.1. <a href="#AEN1791">Printer
              Configurations</a></dt>

              <dt>4.2. <a href="#NETWORKPROTOCOLS">Network
              Communication Protocols</a></dt>

              <dt>4.3. <a href="#RFC1179PC">RFC1179 (BSD or TCP/IP)
              Job Transfer Printcap Entry</a></dt>

              <dt>4.4. <a href="#SOCKETPC">Socket Protocol (TCP/IP)
              Operation Printcap Entry</a></dt>

              <dt>4.5. <a href="#APPSOCKETPC">Appsocket Protocol
              (TCP/IP) Operation</a></dt>

              <dt>4.6. <a href="#SNMP">Using SNMP For Status
              Information</a></dt>

              <dt>4.7. <a href="#AEN2062">Common Print Server Boxes
              Configuration Information</a></dt>

              <dt>4.8. <a href="#AEN2222">Timeout Problems Sending
              A Job</a></dt>

              <dt>4.9. <a href="#RWTIMEOUT">Printers With Lockup
              Problems</a></dt>

              <dt>4.10. <a href="#AEN2246">PS, PCL, PJL Printer
              with TPC/IP Network Interface</a></dt>

              <dt>4.11. <a href="#AEN2266">PS, PCL, PJL Printer
              with Parallel Port Connection</a></dt>

              <dt>4.12. <a href="#AEN2279">PS, PCL, PJL Printer
              with Serial Port</a></dt>

              <dt>4.13. <a href="#PSONLY">PostScript Only
              Printer</a></dt>

              <dt>4.14. <a href="#AEN2320">GhostScript</a></dt>

              <dt>4.15. <a href="#PHASER">Tektronics Phaser, QMS,
              and Appsocket Protocol</a></dt>
            </dl>
          </dd>

          <dt>5. <a href="#OPTIONS">Options and Arguments</a></dt>

          <dd>
            <dl>
              <dt>5.1. <a href="#AEN2359">Command Line
              Options</a></dt>

              <dt>5.2. <a href="#CONFIG">General Configuration
              Options - config, trace, debug</a></dt>

              <dt>5.3. <a href="#STATUSFILE">Status
              Messages</a></dt>

              <dt>5.4. <a href="#STATUS">Printer Status Available -
              status</a></dt>

              <dt>5.5. <a href="#AEN2507">Monitoring Options -
              sync, waitend, pagecount</a></dt>

              <dt>5.6. <a href="#AEN2542">User -Z Option
              Support</a></dt>

              <dt>5.7. <a href="#AEN2673">Adding User
              Options</a></dt>

              <dt>5.8. <a href="#AEN2688">Initialization and Setup
              Control</a></dt>
            </dl>
          </dd>

          <dt>6. <a href="#AEN2718">Configuration File</a></dt>

          <dd>
            <dl>
              <dt>6.1. <a href="#AEN2723">Configuration File
              Entries</a></dt>

              <dt>6.2. <a href="#AEN2731">Comments</a></dt>

              <dt>6.3. <a href="#AEN2737">Option Setting</a></dt>

              <dt>6.4. <a href="#AEN2761">Option Use</a></dt>

              <dt>6.5. <a href="#AEN2766">List Expansion</a></dt>

              <dt>6.6. <a href="#STRINGESCAPE">String Escape
              Sequences</a></dt>

              <dt>6.7. <a href="#AEN2888">Language Context and
              Value Expansion</a></dt>

              <dd>
                <dl>
                  <dt>6.7.1. <a href="#AEN2895">PJL
                  Language</a></dt>

                  <dt>6.7.2. <a href="#AEN2930">PCL
                  Language</a></dt>

                  <dt>6.7.3. <a href="#AEN2945">PostScript
                  Language</a></dt>
                </dl>
              </dd>

              <dt>6.8. <a href="#AEN2957">Printer Entries</a></dt>

              <dt>6.9. <a href="#AEN2975">Include Facility</a></dt>

              <dt>6.10. <a href="#AEN2979">tc Entry Inclusion
              Facility</a></dt>
            </dl>
          </dd>

          <dt>7. <a href="#DETAILS">Filter Operation
          Details</a></dt>

          <dd>
            <dl>
              <dt>7.1. <a href="#AEN2997">Filter
              Pseudo-Code</a></dt>

              <dt>7.2. <a href="#SETUP">Options, Initialization and
              Setup</a></dt>

              <dt>7.3. <a href="#LANGUAGES">Languages Supported-
              pjl, pcl, ps, and text</a></dt>

              <dd>
                <dl>
                  <dt>7.3.1. <a href="#PJL-JOB">pjl_job
                  FLAG</a></dt>

                  <dt>7.3.2. <a href="#PJL-ENTER">pjl_enter
                  FLAG</a></dt>

                  <dt>7.3.3. <a href=
                  "#REMOVE-PJL-AT-START">remove_pjl_at_start
                  FLAG</a></dt>

                  <dt>7.3.4. <a href="#NULLPAD">nullpad
                  STRING</a></dt>

                  <dt>7.3.5. <a href="#PJL-CONSOLE">pjl_console
                  FLAG</a></dt>

                  <dt>7.3.6. <a href="#REMOVE-CTRL">remove_ctrl
                  STRING</a></dt>

                  <dt>7.3.7. <a href="#TBCP">tbcp FLAG</a></dt>
                </dl>
              </dd>

              <dt>7.4. <a href="#SYNCPAGE">Synchronization and
              Pagecounts</a></dt>

              <dt>7.5. <a href="#PJLINIT">PJL
              Initialization</a></dt>

              <dt>7.6. <a href="#FILECONVERSION">File Conversion
              Support</a></dt>

              <dd>
                <dl>
                  <dt>7.6.1. <a href="#FILE-UTIL-PATH">File Type
                  Detection</a></dt>

                  <dt>7.6.2. <a href=
                  "#CONVERSION">Conversion</a></dt>

                  <dt>7.6.3. <a href="#CRLF">LF to CR/LF
                  Conversion</a></dt>

                  <dt>7.6.4. <a href="#AEN3562">Text Treated Like
                  PCL</a></dt>

                  <dt>7.6.5. <a href="#AEN3568">Default to
                  Passthrough</a></dt>
                </dl>
              </dd>

              <dt>7.7. <a href="#GHOSTSCRIPTCONFIG">GhostScript
              Printer</a></dt>

              <dt>7.8. <a href="#LANGUAGEINIT">Language Specific
              Initialization</a></dt>

              <dt>7.9. <a href="#FILETRANSFER">File Transfer and
              Error Status Monitoring</a></dt>

              <dt>7.10. <a href="#WAITEND">End of Job</a></dt>

              <dt>7.11. <a href="#APPSOCKET">Tektronix Phaser, QMS
              and AppSocket Support</a></dt>
            </dl>
          </dd>

          <dt>8. <a href="#AEN3714">Banners and OF Mode
          Operation</a></dt>

          <dd>
            <dl>
              <dt>8.1. <a href="#AEN3734">No Banner</a></dt>

              <dt>8.2. <a href="#AEN3742">Banner Printing and No OF
              Filter</a></dt>

              <dt>8.3. <a href="#AEN3752">Banner Printing With OF
              Filter</a></dt>

              <dt>8.4. <a href="#AEN3766"><b class=
              "APPLICATION">LPRng</b> Options Controlling Banner
              Printing</a></dt>

              <dt>8.5. <a href="#OFOPTIONS">of_options
              option</a></dt>
            </dl>
          </dd>

          <dt>9. <a href="#AEN3797">Font Download Support</a></dt>

          <dd>
            <dl>
              <dt>9.1. <a href="#AEN3803">PCL Font
              Downloading</a></dt>

              <dt>9.2. <a href="#AEN3829">PS Font
              Downloading</a></dt>

              <dt>9.3. <a href="#AEN3839">PJL File
              Downloading</a></dt>
            </dl>
          </dd>

          <dt>10. <a href="#AEN3848">Debugging and Problem
          Solving</a></dt>

          <dt>A. <a href="#IFHPOPTIONS">Index to Options</a></dt>

          <dt>B. <a href="#AEN4236">HP JetDirect Card
          Support</a></dt>

          <dd>
            <dl>
              <dt>B.1. <a href="#AEN4239">MicroSoft JetDirect
              Support</a></dt>

              <dt>B.2. <a href="#AEN4242">TCP/IP Address</a></dt>

              <dt>B.3. <a href="#AEN4247">Web Server
              Configuration</a></dt>

              <dt>B.4. <a href="#AEN4251">Telnet
              Configuration</a></dt>

              <dt>B.5. <a href="#AEN4258">BOOTP
              Information</a></dt>

              <dt>B.6. <a href="#AEN4266">Timeouts</a></dt>
            </dl>
          </dd>
        </dl>
      </div>

      <div class="LOT">
        <dl class="LOT">
          <dt><b>List of Tables</b></dt>

          <dt>2-1. <a href="#AEN310">Configure File Location
          Variables</a></dt>

          <dt>2-2. <a href="#AEN382">Executable and Configuration
          File Locations</a></dt>

          <dt>2-3. <a href="#CONFIGENTRIES"><var class=
          "LITERAL">ifhp.conf</var> Configuration Entries</a></dt>

          <dt>4-1. <a href="#NETWORKPRINTSERVERS">Network Print
          Servers</a></dt>

          <dt>A-1. <a href="#IFHPOPTIONSTABLE"><var class=
          "LITERAL">ifhp.conf</var> - <b class=
          "APPLICATION">ifhp</b> Options</a></dt>
        </dl>
      </div>

      <div class="PREFACE">
        <hr>

        <h1><a name="AEN29"></a>Preface</h1>

        <div class="SECT1">
          <h2 class="SECT1"><a name="AEN31">1.
          Introduction</a></h2>

          <p>The <b class="APPLICATION">ifhp</b> Print Filter is
          the primary print filter for the <b class=
          "APPLICATION">LPRng</b> Print Spooler. This document is
          designed to be the single basic reference for the <b
          class="APPLICATION">ifhp</b> software; the <b class=
          "APPLICATION">LPRng</b> software is distributed
          separately and has additional documentation.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN38">2.
          Acknowledgements</a></h2>

          <p>I would like to thank all of the <b class=
          "APPLICATION">LPRng</b> users who so relentlessly tried
          the incredible number of permutations and combinations of
          printers and software, and whose requests for <span
          class="emphasis"><i class="EMPHASIS">just one more
          feature</i></span> led to the development of the
          software.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN43">3. Shell
          Prompts</a></h2>

          <p>The following table shows the default system prompt
          and superuser prompt. The examples will use this prompt
          to indicate which user you should be running the example
          as.</p>

          <div class="INFORMALTABLE">
            <a name="AEN46"></a>

            <table border="0" frame="void" class="CALSTABLE">
              <col>
              <col>

              <thead>
                <tr>
                  <th>User</th>

                  <th>Prompt</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td>Normal user</td>

                  <td><samp class="PROMPT">%</samp></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">root</var></td>

                  <td><samp class="PROMPT">#</samp></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN62">4. Typographic
          Conventions</a></h2>

          <p>The following table describes the typographic
          conventions used in this book.</p>

          <div class="INFORMALTABLE">
            <a name="AEN65"></a>

            <table border="0" frame="void" class="CALSTABLE">
              <col>
              <col>

              <thead>
                <tr>
                  <th>Meaning</th>

                  <th>Examples</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td>The name of commands, files, and directories.
                  On screen computer output.</td>

                  <td>
                    <p>Edit your <tt class="FILENAME">.login</tt>
                    file.</p>

                    <p>Use <tt class="COMMAND">ls -a</tt> to list
                    all files.</p>
<pre class="SCREEN">
    You have mail.
</pre>
                    <br>
                    <br>
                  </td>
                </tr>

                <tr>
                  <td>What you type, when contrasted with on-screen
                  computer output.</td>

                  <td>
<pre class="SCREEN">
    <samp class="PROMPT">%</samp> <kbd class="USERINPUT">su</kbd>
    Password:
</pre>
                  </td>
                </tr>

                <tr>
                  <td>Manual page references.</td>

                  <td>Use <span class="CITEREFENTRY"><span class=
                  "REFENTRYTITLE">su</span>(1)</span> to change
                  user names.</td>
                </tr>

                <tr>
                  <td>User and group names</td>

                  <td>Only <var class="LITERAL">root</var> can do
                  this.</td>
                </tr>

                <tr>
                  <td>Emphasis</td>

                  <td>You <span class="emphasis"><i class=
                  "EMPHASIS">must</i></span> do this.</td>
                </tr>

                <tr>
                  <td>Command line variables; replace with the real
                  name or variable.</td>

                  <td>To delete a file, type <tt class="COMMAND">rm
                  <tt class="FILENAME"><var class=
                  "REPLACEABLE">filename</var></tt></tt></td>
                </tr>

                <tr>
                  <td>Environment variables</td>

                  <td><var class="ENVAR">$HOME</var> is your home
                  directory.</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN111">5. Notes, warnings,
          and examples</a></h2>

          <p>Within the text appear notes, warnings, and
          examples.</p>

          <div class="NOTE">
            <blockquote class="NOTE">
              <p><b>Note:</b> Notes are represented like this, and
              contain information that you should take note of, as
              it may affect what you do.</p>
            </blockquote>
          </div>

          <div class="WARNING">
            <blockquote class="WARNING">
              <p><b>Warning</b>Warnings are represented like this,
              and contain information warning you about possible
              damage if you do not follow the instructions. This
              damage may be physical, to your hardware or to you,
              or it may be non-physical, such as the inadvertant
              deletion of important files.</p>
            </blockquote>
          </div>

          <div class="INFORMALEXAMPLE">
            <a name="AEN118"></a>

            <p>Examples are represented like this, and typically
            contain examples you should walk through, or show you
            what the results of a particular action should be.</p>
          </div>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN120"></a>Chapter 1. Introduction</h1>

        <p>The <b class="APPLICATION">ifhp</b> print filter is the
        latest in a long evolutionary path of print filters for the
        <b class="APPLICATION">LPRng</b> print spooler system. It
        unifies the low level printer communication facilities and
        provide a common code base for future development.</p>

        <p>This document is the complete set of references and
        installation guide for the <b class="APPLICATION">ifhp</b>
        print filter. It covers compilation, installation, initial
        testing, details of system configuration, and configuration
        options that would be needed by the system administrator.
        Previous releases of <b class="APPLICATION">ifhp</b> had a
        large selection of <acronym class=
        "ACRONYM">README</acronym> files which are now incorporated
        into the IFHP Reference Manual.</p>

        <p><a name="WEBSITE"></a> Information about <b class=
        "APPLICATION">LPRng</b> and <b class="APPLICATION">ifhp</b>
        can be found on the <b class="APPLICATION">LPRng</b> web
        page <a href="http://www.lprng.com" target=
        "_top">http://www.lprng.com</a>.</p>

        <p><a name="MAILLIST"></a> There is mailing list for <b
        class="APPLICATION">ifhp</b> and <b class=
        "APPLICATION">LPRng</b> at <code class="EMAIL">&lt;<a href=
        "mailto:lprng@lprng.com">lprng@lprng.com</a>&gt;</code>. In
        order to reduce the amount of unsolicited <span class=
        "emphasis"><i class="EMPHASIS">spam</i></span> mail posted
        to the list you must subscribe to the list before posting
        to it. To subscribe, send email message to <span class=
        "emphasis"><i class="EMPHASIS"><a href=
        "mailto:lprng-request@lprng.com" target=
        "_top">lprng-request@lprng.com</a></i></span>, with the
        single word <span class="emphasis"><i class=
        "EMPHASIS">subscribe</i></span> in the body.</p>

        <p>Several presentations of <b class=
        "APPLICATION">LPRng</b> and print spooling software have
        been made at the Large Scale Installation Administrator
        (LISA) conferences and are in the <b class=
        "APPLICATION">ifhp</b> distribution and available on web
        sites. The slides for the LISA 97 tutorial on <a href=
        "ftp://ftp.lprng.com/pub/LPRng/LISA97.tgz" target=
        "_top">Printers and Network Print Spooling</a> are the <tt
        class="FILENAME">LISA97.ppt</tt> in the <b class=
        "APPLICATION">LPRng</b> distribution.</p>

        <p>During development of <b class="APPLICATION">ifhp</b>,
        the following documents were invaluable references. For
        Printer Job Language (PJL) related issues see the Printer
        Job Language Technical Reference Manual, Hewlett Packard,
        10th Edition, October 1997. For PCL related issues see the
        PCL 5 Printer Language Technical Reference Manual, First
        Edition, 1992. These manuals are available through the
        Hewlett Packard Developers Program. See <a href=
        "http://www.hp.com/go/devexchange" target=
        "_top">http://www.hp.com/go/devexchange</a> for information
        on how to join.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN153">1.1. Copyright and
          Disclaimer</a></h2>

          <p>Material included in this document from the <b class=
          "APPLICATION">ifhp</b> distribution Copyright Patrick
          Powell 1988-1999, where applicable. The rights to
          distribute this document complete or in part are hereby
          granted for non-commercial purposes. Partial
          reproductions must acknowledge the source. Permission to
          distribute this file together with <b class=
          "APPLICATION">LPRng</b>, <b class="APPLICATION">ifhp</b>
          and `derived works' is explicitly granted.</p>

          <p><span class="emphasis"><i class="EMPHASIS">THE
          MATERIAL IN THIS DOCUMENT IS PROVIDED WITHOUT FEE AND
          AS-IS WITH NO WARRANTY REGARDING FITNESS OF USE FOR ANY
          PURPOSE. THE AUTHOR AND ALL CONTRIBUTORS ARE NOT LIABLE
          FOR ANY DAMAGES, DIRECT OR INDIRECT, RESULTING FROM THE
          USE OF INFORMATION PROVIDED IN THIS
          DOCUMENT.</i></span></p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN161">1.2. Commercial
          Support</a></h2>

          <p><a href="http://www.astart.com" target="_top">AStArt
          Technologies (http://www.astart.com)</a> provides
          commercial support and enhancements for <b class=
          "APPLICATION">LPRng</b>, <b class="APPLICATION">ifhp</b>,
          and other network software. AStArt provides network and
          system consulting services for UNIX and NT systems, as
          well as real time and network software.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN167">1.3. Web Site</a></h2>

          <p>Web Page: <a href="http://www.lprng.com" target=
          "_top">http://www.lprng.com</a></p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="SECFTP">1.4. FTP
          Sites</a></h2>

          <p>Main FTP Site:</p>

          <table border="0">
            <tbody>
              <tr>
                <td><a href="ftp://ftp.lprng.com/pub/LPRng" target=
                "_top">ftp://ftp.lprng.com/pub/LPRng</a> (US)</td>
              </tr>
            </tbody>
          </table>
          <br>
          <br>

          <p>Mirrors:</p>

          <table border="0">
            <tbody>
              <tr>
                <td><a href=
                "ftp://ftp.u-aizu.ac.jp/pub/net/lpr/LPRng" target=
                "_top">ftp://ftp.u-aizu.ac.jp/pub/net/lpr/LPRng</a>
                (JA)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://ftp.cs.columbia.edu/pub/archives/pkg/LPRng"
                target=
                "_top">ftp://ftp.cs.columbia.edu/pub/archives/pkg/LPRng</a>
                (US)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://ftp.cise.ufl.edu/pub/mirrors/LPRng" target=
                "_top">ftp://ftp.cise.ufl.edu/pub/mirrors/LPRng</a>
                (US)</td>
              </tr>

              <tr>
                <td><a href="ftp://ftp.cs.umn.edu/pub/LPRng"
                target="_top">ftp://ftp.cs.umn.edu/pub/LPRng</a>
                (US)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://uiarchive.uiuc.edu/pub/ftp/ftp.lprng.com/pub/LPRng"
                 target=
                "_top">ftp://uiarchive.uiuc.edu/pub/ftp/ftp.lprng.com/pub/LPRng</a>
                (US)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://ftp.sage-au.org.au/pub/printing/spooler/lprng/"
                 target=
                "_top">ftp://ftp.sage-au.org.au/pub/printing/spooler/lprng/</a>
                (AU)</td>
              </tr>

              <tr>
                <td><a href="ftp://mirror.aarnet.edu.au/pub/LPRng/"
                target=
                "_top">ftp://mirror.aarnet.edu.au/pub/LPRng/</a>
                (AU/NZ)</td>
              </tr>

              <tr>
                <td><a href=
                "http://mirror.aarnet.edu.au/pub/LPRng/" target=
                "_top">http://mirror.aarnet.edu.au/pub/LPRng/</a>
                (AU/NZ)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://sunsite.ualberta.ca/pub/Mirror/LPRng"
                target=
                "_top">ftp://sunsite.ualberta.ca/pub/Mirror/LPRng</a>
                (CA)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/LPRng"
                 target=
                "_top">ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/LPRng</a>
                (DE)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://ftp.uni-paderborn.de/pub/unix/printer/LPRng"
                target=
                "_top">ftp://ftp.uni-paderborn.de/pub/unix/printer/LPRng</a>
                (DE)</td>
              </tr>

              <tr>
                <td><a href="ftp://ftp.mono.org/pub/LPRng" target=
                "_top">ftp://ftp.mono.org/pub/LPRng</a> (UK)</td>
              </tr>

              <tr>
                <td><a href="ftp://ftp.iona.com/pub/plp/LPRng"
                target="_top">ftp://ftp.iona.com/pub/plp/LPRng</a>
                (IE)</td>
              </tr>

              <tr>
                <td><a href=
                "ftp://uabgate.uab.ericsson.se/pub/unix/LPRng"
                target=
                "_top">ftp://uabgate.uab.ericsson.se/pub/unix/LPRng</a>
                (SE)</td>
              </tr>
            </tbody>
          </table>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN207">1.5. Mailing
          List</a></h2>

          <p>To join the <b class="APPLICATION">LPRng</b> mailing
          list, please send mail to <a href=
          "mailto: lprng-request@lprng.ie" target=
          "_top">lprng-request@lprng.ie</a> with the only the word
          <span class="emphasis"><i class=
          "EMPHASIS">subscribe</i></span> in the body of the
          message. <a name="FAQREF"></a></p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN214">1.6. PGP Public
          Key</a></h2>

          <p>The <b class="APPLICATION">LPRng</b> and <b class=
          "APPLICATION">ifhp</b> distributions have MD5 checksum
          files which are signed with a PGP public key. Here is the
          key for validating the checksums:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN219"></a>
<pre class="SCREEN">
    Type Bits/KeyID    Date       User ID
    pub  1024/00D95C9D 1997/01/31 Patrick A. Powell &lt;papowell@astart.com&gt;
                                  Patrick A. Powell &lt;papowell@sdsu.edu&gt;
    
    -----BEGIN PGP PUBLIC KEY BLOCK-----
    Version: 2.6.3i
    
    mQCNAzLygTQAAAEEANBW5fPYjN3wSAnP9xWOUc3CvsMUxjip0cN2sY5qrdoJyIhn
    qbAspBopR+tGQfyp5T7C21yfWRRnfXmoJ3FVtgToAsJUYmzoSFY08eDx+rmSqCLe
    rdJjX8aG8jVXpGipEo9U4QsUK+OKzx3/y/OaK4cizoWqKvy1l4lEzDsA2VydAAUT
    tCdQYXRyaWNrIEEuIFBvd2VsbCA8cGFwb3dlbGxAYXN0YXJ0LmNvbT6JAJUDBRA0
    XonoiUTMOwDZXJ0BAQ2cBAC7zU9Fn3sC3x0USJ+3vjhg/qA+Gjb5Fi1dJd4solc4
    vJvtf0UL/1/rGipbR+A0XHpHzJUMP9ZfJzKZjaK/d0ZBNlS3i+JnypypeQiAqo9t
    FV0OyUCwDfWybgAORuAa2V6UJnAhvj/7TpxMmCApolaIb4yFyKunHa8aBxN+17Ro
    rrQlUGF0cmljayBBLiBQb3dlbGwgPHBhcG93ZWxsQHNkc3UuZWR1PokAlQMFEDLy
    gTSJRMw7ANlcnQEBYBYD/0zTeoiDNnI+NjaIei6+6z6oakqO70qFVx0FG3aP3kRH
    WlDhdtFaAuaMRh+RItHfFfcHhw5K7jiJdgKiTgGfj5Vt3OdHYkeeh/sddqgf9YnS
    tpj0u5NfrotPTUw39n6YTgS5/aW0PQfO9dx7jVUcGeod1TGXTe9mIhDMwDJI4J14
    =3Zbp
    -----END PGP PUBLIC KEY BLOCK-----
</pre>
          </div>
          <br>
          <br>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN221"></a>Chapter 2. Software Installation
        and Configuration</h1>

        <p>Before you do an installation please read the following
        instructions. You will need to:</p>

        <ol type="1">
          <li>
            <p>Use GNU Make. You can get it from <a href=
            "http://www.gnu.org/software/software.html" target=
            "_top">http://www.gnu.org/software/software.html</a>.
            Don't even think about trying to use another make
            unless you are a Wizard. And even the Wizards use GNU
            Make.</p>
          </li>

          <li>
            <p>Use an ANSI C compiler. <b class=
            "APPLICATION">ifhp</b> is developed and tested with the
            GNU C compiler. You can get it from <a href=
            "http://www.gnu.org/software/software.html" target=
            "_top">http://www.gnu.org/software/software.html</a>.
            Solaris users should consult the excellent <a href=
            "http://sunfreeware.com" target=
            "_top">http://sunfreeware.com</a> site for binary
            distributions. AIX users can use <a href=
            "http://www.bull.de/pub/" target=
            "_top">http://www.bull.de/pub/</a> or <a href=
            "ftp://ftp.htwk-leipzig.de" target=
            "_top">ftp://ftp.htwk-leipzig.de</a></p>
          </li>
        </ol>
        <br>
        <br>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN235">2.1. Additional
          Recommended Software</a></h2>

          <p>The following software is recommended for use with <b
          class="APPLICATION">ifhp</b>. If your printer does not
          support PostScript, PCL, or text printing directly you
          will need to install GhostScript to convert from
          PostScript to the printer format and use a suitable text
          to PostScript converter.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>Unix File Utility</dt>

              <dd>
                <p><a name="FILEUTIL"></a> The <b class=
                "APPLICATION">ifhp</b> filter will recognize that a
                file is PostScript, PJL, or PCL by examining the
                first couple of bytes of a file and applying a
                simple set of rules. If you require more elaborate
                file type detection then you can configure <b
                class="APPLICATION">ifhp</b> to also use the UNIX
                <span class="emphasis"><i class=
                "EMPHASIS">file</i></span> utility if it is unable
                to determine the file type. See <a href=
                "ftp://ftp.astron.com/pub/file/" target=
                "_top">ftp://ftp.astron.com/pub/file/</a> or <a
                href=
                "ftp://ftp.lprng.com/pub/LPRng/UNIXTOOLS/file/"
                target=
                "_top">ftp://ftp.lprng.com/pub/LPRng/UNIXTOOLS/file/</a>
                to obtain this software.</p>
              </dd>

              <dt><b class="APPLICATION">LPRng</b> Print
              Spooler</dt>

              <dd>
                <p><a href="http://www.lprng.com" target=
                "_top">http://www.lprng.com</a> The <b class=
                "APPLICATION">ifhp</b> filter works best with the
                later versions of this software, and the two are
                developed as an integrated unit.</p>
              </dd>

              <dt>GhostScript</dt>

              <dd>
                <p><a name="GHOSTSCRIPT"></a> <a href=
                "http://www.cs.wisc.edu/~ghost/index.html" target=
                "_top">http://www.cs.wisc.edu/~ghost/index.html</a>
                or <a href="http://www.ghostscript.com/" target=
                "_top">http://www.ghostscript.com</a> If your
                printer does not handle PostScript and you need to
                print PostScript, GhostScript is used to convert
                PostScript to a format usable by the printer.</p>
              </dd>

              <dt>a2ps - Ascii Text To PostScript Converter</dt>

              <dd>
                <p><a name="A2PS"></a> If your printer is a
                PostScript only printer or you wish to have
                enhanced formatting capability for documents, then
                you will need a text to PostScript converter. <a
                href="http://www-inf.enst.fr/~demaille/a2ps/"
                target=
                "_top">http://www-inf.enst.fr/~demaille/a2ps/</a>
                This package does a very good job of text to
                PostScript conversion. It also makes use of the <a
                href="#FILEUTIL">file utility</a> to determine the
                required conversions.</p>
              </dd>

              <dt>enscript - GNU Enscript</dt>

              <dd>
                <p><a name="ENSCRIPT"></a> <a href=
                "http://www.gnu.org" target=
                "_top">http://www.gnu.org/</a> This package is an
                alternative to <var class="LITERAL">a2ps</var>, but
                requires careful handling due to the exit codes it
                produces. Please see <a href="#CONVERSION">Wrappers
                For Programs</a> for details on how to use <var
                class="LITERAL">enscript</var> with <b class=
                "APPLICATION">ifhp</b>.</p>
              </dd>

              <dt>textps</dt>

              <dd>
                <p><a name="TEXTPS"></a> This program is included
                with the <b class="APPLICATION">ifhp</b>
                distribution and is an extremely primitive text to
                PostScript filter. It generates PostScript
                compatible with even the most ancient of PostScript
                printers and is useful where <var class=
                "LITERAL">a2ps</var> and <span class="emphasis"><i
                class="EMPHASIS">enscript</i></span> are just too
                modern. See <a href="http://www.lprng.com" target=
                "_top">http://www.lprng.com</a>.</p>
              </dd>

              <dt>psutils</dt>

              <dd>
                <p><a name="PSUTILS"></a> The <var class=
                "LITERAL">psutils</var> package developed by Angus
                Duggan is available from <a href=
                "ftp://ftp.dcs.ed.ac.uk/pub/ajcd/" target=
                "_top">ftp://ftp.dcs.ed.ac.uk/pub/ajcd/</a>. These
                are a collection of programs for manipulation of
                PostScript files, and include facilities for doing
                page selection, page reversal, n-up printing, and
                watermarking.</p>
              </dd>

              <dt>netcat</dt>

              <dd>
                <p><a name="NETCAT"></a> The <var class=
                "LITERAL">netcat</var> utility is extremely useful
                when trying to send files to a network printer and
                you need to monitor its activity. Developed by
                <code class="EMAIL">&lt;<a href=
                "mailto:hobbit@avian.org">hobbit@avian.org</a>&gt;</code>,
                it is available from <a href=
                "ftp://avian.org/src/hacks/nc110.tgz" target=
                "_top">ftp://avian.org/src/hacks/nc110.tgz</a>.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN305">2.2.
          Installation</a></h2>

          <p>The installation procedure uses the <var class=
          "LITERAL">configure</var> facility to generate Makefiles.
          By convention, these files have the following variables
          that install the <b class="APPLICATION">ifhp</b>
          executables and configuration files in the following
          locations:</p>

          <div class="TABLE">
            <a name="AEN310"></a>

            <p><b>Table 2-1. Configure File Location
            Variables</b></p>

            <table border="1" class="CALSTABLE">
              <col>
              <col>
              <col>
              <col>

              <thead>
                <tr>
                  <th>Configure Variable</th>

                  <th>Default Value</th>

                  <th>Expanded Default Value</th>

                  <th>Override</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td><var class="LITERAL">${prefix}</var></td>

                  <td><var class="LITERAL">/usr/local</var></td>

                  <td><var class="LITERAL">--prefix=PATH</var></td>

                  <td>&nbsp;</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">${exec_prefix}</var></td>

                  <td><var class="LITERAL">${prefix}</var></td>

                  <td><var class="LITERAL">/usr/local</var></td>

                  <td><var class=
                  "LITERAL">--execprefix=PATH</var></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">${bindir}</var></td>

                  <td><var class=
                  "LITERAL">${exec_prefix}/bin</var></td>

                  <td><var class=
                  "LITERAL">/usr/local/bin</var></td>

                  <td><var class="LITERAL">--bindir=PATH</var></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">${sbindir}</var></td>

                  <td><var class=
                  "LITERAL">${exec_prefix}/sbin</var></td>

                  <td><var class=
                  "LITERAL">/usr/local/sbin</var></td>

                  <td><var class=
                  "LITERAL">--sbindir=PATH</var></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">${libexecdir}</var></td>

                  <td><var class=
                  "LITERAL">${exec_prefix}/libexec</var></td>

                  <td><var class=
                  "LITERAL">/usr/local/libexec</var></td>

                  <td><var class=
                  "LITERAL">--libexecdir=PATH</var></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">${sysconfdir}</var></td>

                  <td><var class="LITERAL">${prefix}/etc</var></td>

                  <td><var class=
                  "LITERAL">/usr/local/etc</var></td>

                  <td><var class=
                  "LITERAL">--sysconfdir=PATH</var></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">${mandir}</var></td>

                  <td><var class="LITERAL">${prefix}/man</var></td>

                  <td><var class=
                  "LITERAL">/usr/local/man</var></td>

                  <td><var class="LITERAL">--mandir=PATH</var></td>
                </tr>
              </tbody>
            </table>
          </div>

          <p>The following files are installed as shown below:</p>

          <div class="TABLE">
            <a name="AEN382"></a>

            <p><b>Table 2-2. Executable and Configuration File
            Locations</b></p>

            <table border="1" class="CALSTABLE">
              <col>
              <col>

              <thead>
                <tr>
                  <th>Configure Variable</th>

                  <th>Files</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td><var class=
                  "LITERAL">${libexecdir}/filters</var></td>

                  <td><var class="LITERAL">lpf, ifhp</var></td>
                </tr>

                <tr>
                  <td><var class="LITERAL">${sysconfdir}</var></td>

                  <td><var class="LITERAL">ifhp.conf</var></td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">${mandir}/man[1-9]</var></td>

                  <td><var class="LITERAL">man pages</var></td>
                </tr>
              </tbody>
            </table>
          </div>
          &#13;<br>
          <br>

          <p>The configuration you choose should match that of the
          <b class="APPLICATION">LPRng</b> print spooler. For
          example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN407"></a>
<pre class="SCREEN">
    ./configure --prefix=/usr --sysconfdir=/etc \
      --mandir=/usr/share/man
    
    executables and files in
       /usr/libexec/filters         ifhp
       /etc                         ifhp.conf
       /usr/share/man/man[0-9]      ifhp.man1
</pre>
          </div>
          <br>
          <br>

          <p>First, we untar, configure, compile, and install the
          software:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN410"></a>
<pre class="SCREEN">
    <samp class="PROMPT">h4: {1} %</samp> <kbd class=
"USERINPUT">gunzip -c ifhp-&lt;version&gt;.tgz | tar xvf -</kbd>
    <samp class="PROMPT">h4: {2} %</samp> <kbd class=
"USERINPUT">cd ifhp-&lt;version&gt;</kbd>
    <samp class="PROMPT">h4: {3} %</samp> <kbd class=
"USERINPUT">./configure  [ ... configuration options ]</kbd>
    <samp class="PROMPT">h4: {4} %</samp> <kbd class=
"USERINPUT">make clean all</kbd>
    <samp class="PROMPT">h4: {5} %</samp> <kbd class=
"USERINPUT">su   # you must do the following commands as root</kbd>
    <samp class="PROMPT">h4: {6} #</samp> <kbd class=
"USERINPUT">make install</kbd>
</pre>
          </div>
          <br>
          <br>

          <p>Modify your printcap file to use <b class=
          "APPLICATION">ifhp</b>. Your printcap usually has the
          following format; older version of <b class=
          "APPLICATION">lpd</b> require <span class="emphasis"><i
          class="EMPHASIS">:\</i></span> at the end of each line of
          a printcap entry. The <span class="emphasis"><i class=
          "EMPHASIS">:if</i></span> and <span class="emphasis"><i
          class="EMPHASIS">:of</i></span> filter entries are
          usually the ones of interest.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN430"></a>
<pre class="SCREEN">
    lp:
      :lp=xxxx:sd=xxxx:....
      :if=/usr/local/path_to_old_filters/old_if_filter
      :of=/usr/local/path_to_old_filters/old_of_filter
</pre>
          </div>
          <br>
          <br>

          <p>Your new printcap entry will look like the one below.
          The <acronym class="ACRONYM">MODEL</acronym> information
          is described in the next section.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN434"></a>
<pre class="SCREEN">
    lp:
      :lp=xxxx:sd=xxxx:....
      #  see text for details about the next line
      :ifhp=model=MODEL,status@
      :filter=/usr/local/libexec/filters/ifhp
      # only if you are using accounting or banners
      #:of=/usr/local/libexec/filters/ifhp
</pre>
          </div>
          <br>
          <br>

          <p>Select a suitable printer from the entries in the
          configuration file (<tt class=
          "FILENAME">/usr/local/etc/lpd.conf</tt> or <tt class=
          "FILENAME">/etc/lpd.conf</tt>). These are described in
          more detail in the next section.</p>

          <p>Shut down and restart your print spooler and then send
          a job to the printer. If this works and you do not need
          any further capabilities of <b class=
          "APPLICATION">ifhp</b> such as error reporting or printer
          monitoring, then you are finished.</p>

          <p>If you want to use additional capabilities, then you
          should read the detailed instructions in the next couple
          of sections.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="MODELSELECTION">2.3. Printer
          Models Supported</a></h2>

          <p>There are over 500 different printer models, types and
          configurations supported by <b class=
          "APPLICATION">ifhp</b>. If your printer is not currently
          supported and you have documentation about the printer
          then send mail to the <a href="#MAILLIST"><b class=
          "APPLICATION">LPRng</b> Mailing List</a> and support will
          be added.</p>

          <p>The default printer is an HP LaserJet 4MP, which
          supports PostScript Level 3, PCL5, PJL, and has
          bidirectional communication and a functional
          pagecounter.</p>

          <p>The <tt class="FILENAME">ifhp.conf</tt> configuration
          file contains configuration entries for various models of
          printers. Each entry has a name usually corresponding to
          the model of printer or its basic capabilities. For
          example, the HP LaserJet 4 printer has the <var class=
          "LITERAL">model=hp4</var> configuration entry. The <span
          class="emphasis"><i class="EMPHASIS">default</i></span>
          printer configuration covers a wide range of network
          printers manufactured by Hewlett-Packard, Canon, Epson,
          and others and is for a printer that has a bidirectional
          communications connection that allows it to report status
          information and the following capabilities:</p>

          <ol type="1">
            <li>
              <p>PJL support (<var class="LITERAL">pjl</var>)
              compatible with HP 4 family of printers</p>
            </li>

            <li>
              <p>PostScript (PS) support (<var class=
              "LITERAL">ps</var>).</p>
            </li>

            <li>
              <p>PCL support (<var class="LITERAL">pcl</var>).</p>
            </li>

            <li>
              <p>Text files printed as PCL (<var class=
              "LITERAL">text</var>, <var class=
              "LITERAL">default_language=pcl</var>).</p>
            </li>
          </ol>
          <br>
          <br>

          <p>There is also support for <a href="#PSONLY">PostScript
          only printers</a> (<var class="LITERAL">model=ps</var>),
          <a href="#PHASER">Tektronics Phasers</a> (<var class=
          "LITERAL">model=phaser</var>), <a href="#PHASER">QMS</a>
          (<var class="LITERAL">model=qmsXXX</var>) and others. The
          best way to determine the printers currently supported is
          to examine the <tt class="FILENAME">ifhp.conf</tt> file.
          The following is a sample of the various entries in the
          configuration file.</p>

          <div class="TABLE">
            <a name="CONFIGENTRIES"></a>

            <p><b>Table 2-3. <var class="LITERAL">ifhp.conf</var>
            Configuration Entries</b></p>

            <table border="1" frame="border" rules="all" class=
            "CALSTABLE">
              <col>
              <col>

              <thead>
                <tr>
                  <th>Configuration</th>

                  <th>Printer Supported</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td><var class="LITERAL">default</var></td>

                  <td>Generic Printer based on HP 4M Plus,
                  PostScript, PJL, HPGL2, PCL, status, pagecount
                  support</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">apple</var></td>

                  <td>Generic PostScript printer, text to PS
                  conversion, status, pagecount support</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">postscript</var></td>

                  <td>Generic PostScript printer, text to PS
                  conversion, status, pagecount support</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ps</var></td>

                  <td>Generic PostScript printer, text to PS
                  conversion, status, pagecount support</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pcl</var></td>

                  <td>Generic PCL only printer, no status</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pcl_gs</var></td>

                  <td>HP LaserJet 4 PCL only printer, write only,
                  no status</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpiiisi</var></td>

                  <td>HP LaserJet III (PCL and PostScript
                  Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp3si</var></td>

                  <td>HP LaserJet III (PCL and PostScript
                  Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ljet3</var></td>

                  <td>HP LaserJet III (PCL and PostScript
                  Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">lj3</var></td>

                  <td>HP LaserJet III (PCL and PostScript
                  Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpiiisi.gs</var></td>

                  <td>HP LaserJet III (PCL, PostScript via
                  GhostScript)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp3si.gs</var></td>

                  <td>HP LaserJet III (PCL, PostScript via
                  GhostScript)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ljet3.gs</var></td>

                  <td>HP LaserJet III (PCL, PostScript via
                  GhostScript)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">lj3.gs</var></td>

                  <td>HP LaserJet III (PCL, PostScript via
                  GhostScript)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4m</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4m
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4si</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4si
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4simx</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4simx
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4plus</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4plus
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4mplus</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4mplus
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4v</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4v
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4mv</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4mv
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4p</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4p
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4mp</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4mp
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4pj</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4pj
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpljpro</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet ljpro
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4lc</var></td>

                  <td>HP LaserJet 4 Family, HP LaserJet 4lc
                  (PostScript Interpreter)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4mplus</var></td>

                  <td>HP LaserJet 4MPlus</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5l</var></td>

                  <td>HP LaserJet 5 Family, Hp LaserJet 5l</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp6l</var></td>

                  <td>HP LaserJet 6 Family, Hp LaserJet 6l</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp1100</var></td>

                  <td>HP LaserJet 6 Family, Hp LaserJet 1100</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp1100</var></td>

                  <td>HP LaserJet 1000 Family, Hp LaserJet
                  1100</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4l</var></td>

                  <td>Hp LaserJet 4L, PCL only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4ml</var></td>

                  <td>HP LaserJet 4ml</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5p</var></td>

                  <td>HP LaserJet 5p</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5mp</var></td>

                  <td>HP LaserJet 5mp</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp6p</var></td>

                  <td>HP LaserJet 6p</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp6mp</var></td>

                  <td>HP LaserJet 6mp</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5</var></td>

                  <td>HP LaserJet 5</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5si</var></td>

                  <td>HP LaserJet 5si</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5simx</var></td>

                  <td>HP LaserJet 5simx</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5m</var></td>

                  <td>HP LaserJet 5m</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4100</var></td>

                  <td>HP LaserJet 4100</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4200</var></td>

                  <td>HP LaserJet 4200</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4300</var></td>

                  <td>HP LaserJet 4300</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5simopier</var></td>

                  <td>HP LaserJet 5simopier</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4000</var></td>

                  <td>HP LaserJet 4000</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpcolorlj</var></td>

                  <td>HP Color LaserJet</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpcolorlj5</var></td>

                  <td>HP Color LaserJet 5</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpcolorlj5m</var></td>

                  <td>HP Color LaserJet 5m</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj1200</var></td>

                  <td>HP DesignJet 1200 Family</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hppjxl300</var></td>

                  <td>HP PaintJet XL 300 Family</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj1600</var></td>

                  <td>HP DesignJet 1600 Family</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj200</var></td>

                  <td>HP DeskJet 200</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj220</var></td>

                  <td>HP DeskJet 220</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj600</var></td>

                  <td>HP DeskJet 600</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj650</var></td>

                  <td>HP DeskJet 650</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj230</var></td>

                  <td>HP DeskJet 230</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj250c</var></td>

                  <td>HP DeskJet 250c</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj330</var></td>

                  <td>HP DeskJet 330</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj350c</var></td>

                  <td>HP DeskJet 350c</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj430</var></td>

                  <td>HP DeskJet 430</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj450c</var></td>

                  <td>HP DeskJet 450c</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj455ca</var></td>

                  <td>HP DeskJet 455ca</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj700</var></td>

                  <td>HP DeskJet 700</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj750c</var></td>

                  <td>HP DeskJet 750c</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj750cplus</var></td>

                  <td>HP DeskJet 750cplus</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj755cm</var></td>

                  <td>HP DeskJet 755cm</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj2000cp</var></td>

                  <td>HP DeskJet 2000cp</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp2500</var></td>

                  <td>HP DesignJet 2500 - No PCL, PostScript
                  Only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp2500cm</var></td>

                  <td>HP DesignJet 2500cm - No PCL, PostScript
                  Only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp2500c</var></td>

                  <td>HP DesignJet 2500c - No PCL, PostScript
                  Only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp2500cm</var></td>

                  <td>HP DesignJet 2500cm - PCL and PostScript</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj2500cp</var></td>

                  <td>HP DesignJet 2500CP, not HP2500, HP2500c,
                  HP2500cm</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4500</var></td>

                  <td>HP Color LaserJet Printer 4500</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp8500</var></td>

                  <td>HP Color LaserJet Printer 8500</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp8550</var></td>

                  <td>HP Color LaserJet Printer 8550</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4550n</var></td>

                  <td>HP 4550N</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp5000</var></td>

                  <td>HP 5000 Model C4111A (LaserJet 5000)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp8000</var></td>

                  <td>HP LaserJet 8000 Series, HP8000</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp8100</var></td>

                  <td>HP LaserJet 8000 Series, HP8100</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp8150</var></td>

                  <td>HP LaserJet 8000 Series, HP8150</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp2100</var></td>

                  <td>HP LaserJet 2100 Series</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp2200</var></td>

                  <td>HP LaserJet 2200 Series</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hp4050</var></td>

                  <td>HP 4050 Series Printers</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">qms1725</var></td>

                  <td>QMS 1725, uses appsocket, no status,
                  PostScript only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">qms2025</var></td>

                  <td>QMS Laser Printer QMS 2025, appsocket, no
                  status, PostScript and PCL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">qms860</var></td>

                  <td>QMS Laser Printer QMS 860, appsocket, no
                  status, PostScript and PCL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">qms2060</var></td>

                  <td>QMS Laser Printer QMS 2060, appsocket, no
                  status, PostScript and PCL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser</var></td>

                  <td>Tektronics Generic Phaser Color Printer,
                  appsocket, snmp monitoring, PostScript only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser360</var></td>

                  <td>Tektronics Phaser 360 Color Printer,
                  appsocket, snmp monitoring, PostScript only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser740</var></td>

                  <td>Tektronics Phaser 740 Color Printer,
                  appsocket, snmp monitoring, PostScript only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser750</var></td>

                  <td>Tektronics Phaser 750 Color Printer,
                  appsocket, snmp monitoring, PostScript only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser850</var></td>

                  <td>Tektronics Phaser 850 Color Printer,
                  appsocket, snmp monitoring, PostScript only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser740</var></td>

                  <td>Tektronics Phaser 740 Color Printer,
                  appsocket, snmp monitoring, PostScript and
                  PCL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser5400</var></td>

                  <td>Tektronics Phaser 5400 Color Printer,
                  appsocket, snmp monitoring, PostScript and
                  PCL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">phaser7700</var></td>

                  <td>Tektronics Phaser 7700 Color Printer,
                  appsocket, snmp monitoring, PostScript and
                  PCL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">lexmark4039</var></td>

                  <td>Lexmark 4039, Postscript only</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">lexmark_optra_e312</var></td>

                  <td>Lexmark Optra e312, Postscript, PCL and
                  PJL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ln15s</var></td>

                  <td>Digital Laser LN15, LN17ps, Compaq Laser LN
                  16</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ln16s</var></td>

                  <td>Digital Laser LN15, LN17ps, Compaq Laser LN
                  16</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ln17pss</var></td>

                  <td>Digital Laser LN15, LN17ps, Compaq Laser LN
                  16</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpij2250s</var></td>

                  <td>HP Business Inkjet 2250</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj10</var></td>

                  <td>Canon BubbleJet BJ10e</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj10</var></td>

                  <td>Canon BubbleJet BJ20</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj200</var></td>

                  <td>Canon BubbleJet BJ200</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj200</var></td>

                  <td>Canon BubbleJet BJC-210 B/W only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj200</var></td>

                  <td>Canon BubbleJet BJC-240 B/W only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj200</var></td>

                  <td>Canon BubbleJet BJC-250 B/W only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bj200</var></td>

                  <td>Canon BubbleJet BJC-70 B/W only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-600</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-610</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-50</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-70</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-80</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-210 Color only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-240 Color only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-250</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-1000</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-2000</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-4000</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-4100 B/W only</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-4200</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-4300</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-4550</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon BubbleJet BJC-6000</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc600</var></td>

                  <td>Canon MultiPASS C2500 color
                  printer/fax/copier</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc800</var></td>

                  <td>Canon BubbleJet BJC-800</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc800</var></td>

                  <td>Canon BubbleJet BJC-7000 Color.</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc800</var></td>

                  <td>Canon BubbleJet BJC-4300 Color</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_bjc800</var></td>

                  <td>Canon BubbleJet BJC-4650</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_deskjet</var></td>

                  <td>HP DeskJet</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_deskjet</var></td>

                  <td>HP DeskJet Plus</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_djet500</var></td>

                  <td>HP DeskJet 500 B/W</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_djet500</var></td>

                  <td>HP DeskJet Portable B/W</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_djet500</var></td>

                  <td>HP OfficeJet 590 B/W</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj500</var></td>

                  <td>HP DeskJet 400</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj500</var></td>

                  <td>HP DeskJet 500C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj500</var></td>

                  <td>HP DeskJet 540C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj500</var></td>

                  <td>HP DeskJet 690C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj500</var></td>

                  <td>HP DeskJet 693C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 550C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 560C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 600</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 660C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 660C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 682C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 683C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 693C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 694C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 690C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 692C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 693C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 694C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 695C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 850</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 870Cse</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 895Cxi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP DeskJet 970</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>HP OfficeJet 590</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>Olivetti jp450</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj550</var></td>

                  <td>Xerox XJ6C, PCL and Postscript using
                  GhostScript</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 850</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 855</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 870Cse</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 870Cxi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 890C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 670C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdj850</var></td>

                  <td>HP DeskJet 680</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdeskjet</var></td>

                  <td>HP DeskJet 500C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdjmono</var></td>

                  <td>HP DeskJet 500C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdjmono</var></td>

                  <td>HP DeskJet 510</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdjmono</var></td>

                  <td>HP DeskJet 520</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdjmono</var></td>

                  <td>HP DeskJet 540C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_cdjmono</var></td>

                  <td>HP DeskJet 693C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_epsonc</var></td>

                  <td>Fujitsu DL-1100</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_epsonc</var></td>

                  <td>Fujitsu DL-2400</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_hl7x0</var></td>

                  <td>Brother HL-720</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_hl7x0</var></td>

                  <td>Brother HL-730</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_laserjet</var></td>

                  <td>Bull Compuprint Pagemaster 415</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_lips3</var></td>

                  <td>Canon LBP4+</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_lj4dith</var></td>

                  <td>HP DeskJet 600</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet2</var></td>

                  <td>HP LaserJet II</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet2</var></td>

                  <td>Xerox 4030 - PCL, PostScript support using
                  GhostScript</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet3</var></td>

                  <td>Tandy LP800 With LaserJet III emulation.</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>Brother HL-660</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>Brother HL-760 600dpi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>Epson EPL5700 300dpi OK</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>HP DeskJet 600 margins wrong</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>HP DeskJet 870Cse</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>HP LaserJet 5 300dpi or 600dpi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>HP LaserJet 5L 300dpi or 600dpi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>HP LaserJet 6L 600dpi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>HP LaserJet 1100 600dpi OK.</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>IBM Network Printer 17</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>IBM/Lexmark 4029 Margins wrong.</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>Lexmark Optra E+</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>Lexmark Optra SC 1275 B/W only.</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljet4</var></td>

                  <td>Oki OL410ex LED printer 300dpi or 600dpi</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljetplus</var></td>

                  <td>HP LaserJet Plus</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljetplus</var></td>

                  <td>Canon Laser LBP-600</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_ljetplus</var></td>

                  <td>NEC SuperScript 860</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_pjxl300</var></td>

                  <td>HP PaintJet XL300</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_pjxl300</var></td>

                  <td>HP DeskJet 600</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_pjxl300</var></td>

                  <td>HP DeskJet 1200C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_pjxl300</var></td>

                  <td>HP DeskJet 1600C</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_r4081</var></td>

                  <td>Ricoh 4081 laser printer</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">gs_r4081</var></td>

                  <td>Ricoh 6000 laser printer</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a0.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi plain paper, high speed</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a1.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi plain paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a2.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi coated paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a3.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi transparency film</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a4.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi back print film</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a5.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi fabric sheet</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a6.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi glossy paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a7.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi high gloss film</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610a8.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  360x360dpi high resolution paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b1.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi plain paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b2.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi coated paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b3.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi transparency film</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b4.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi back print film</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b6.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi glossy paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b7.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi high-gloss paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">bjc610b8.upp</var></td>

                  <td>Canon BubbleJet BJC-610 (color, rendered)
                  720x720dpi high resolution paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">cdj550.upp</var></td>

                  <td>HP DeskJet 550C 300x300dpi 32-bit CMYK</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">necp2x.upp</var></td>

                  <td>NEC P2X 360x360dpi 8-bit
                  (Floyd-Steinberg)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stcany.upp</var></td>

                  <td>Epson Stylus Color (Any) 360x360dpi 4-bit,
                  PostScript halftoning</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc.upp</var></td>

                  <td>Epson Stylus (Original) and Stylus Pro Color
                  360x360dpi 32-bit CMYK, 15-pin</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc_l.upp</var></td>

                  <td>Epson Stylus (Original) and Stylus Pro Color
                  360x360dpi 4-bit, PostScript halftoning, weaved
                  noWeave</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc_h.upp</var></td>

                  <td>Epson Stylus (Original) and Stylus Pro Color
                  720x720dpi 32-bit CMYK, 15-pin Weave</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc2.upp</var></td>

                  <td>Epson Stylus (Original) and Stylus Pro Color
                  360x360dpi 32-bit CMYK, 20-pin, Epson Stylus
                  Color II(s)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc2_h.upp</var></td>

                  <td>Epson Stylus (Original) and Stylus Pro Color
                  720x720dpi 32-bit CMYK, 20-pin, Epson Stylus
                  Color II</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc2s_h.upp</var></td>

                  <td>Epson Stylus (Original) and Stylus Pro Color
                  720x720dpi 32-bit CMYK, 20-pin, Epson Stylus
                  Color IIs</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc500p.upp</var></td>

                  <td>Epson Stylus Color 500 360x360dpi 32-bit
                  CMYK, noWeave, plain paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc500ph.upp</var></td>

                  <td>Epson Stylus Color 500 720x720dpi 32-bit
                  CMYK, noWeave, plain paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc600pl.upp</var></td>

                  <td>Epson Stylus Color 600, 360x360dpi,
                  32/90-inch weaving 32-bit CMYK, 32-pin, plain
                  paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc600p.upp</var></td>

                  <td>Epson Stylus Color 600, 720x720dpi,
                  32/90-inch weaving 32-bit CMYK, 32-pin, plain
                  paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc600ih.upp</var></td>

                  <td>Epson Stylus Color 600, 1440x720dpi,
                  32/90-inch weaving 32-bit CMYK, 30-pin, inkjet
                  paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc800pl.upp</var></td>

                  <td>Epson Stylus Color 800, 64/180-inch weaving
                  360x360dpi 32-bit CMYK, 64-pin, plain paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc800p.upp</var></td>

                  <td>Epson Stylus Color 800, 64/180-inch weaving
                  720x720dpi 32-bit CMYK, 64-pin, plain paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc800ih.upp</var></td>

                  <td>Epson Stylus Color 800, 64/180-inch weaving
                  1440x720dpi 32-bit CMYK, 62-pin, inkjet
                  paper</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">stc1520h.upp</var></td>

                  <td>Epson Stylus Color 800, 64/180-inch weaving
                  1440x720dpi 32-bit CMYK, 62-pin, inkjet
                  paper</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">imagerunner550</var></td>

                  <td>Canon imageRUNNER 550/600 iR600-550-60</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">imagerunner600</var></td>

                  <td>Canon imageRUNNER 550/600 iR600-550-60</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">hpdj800ps</var></td>

                  <td>HP DesignJet 800ps</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">panther</var></td>

                  <td>Sharp Generic Panther Family, PS and PCL,
                  uses SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-160</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-161</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-162</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-162s</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-163</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-164</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-200</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-200s</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-201</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-205</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-206</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-207</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-f201</var></td>

                  <td>Sharp %, Panther Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">cougar</var></td>

                  <td>Sharp Generic Cougar Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-335</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-336</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-337</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-s337</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-405</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-407</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-505</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-s505</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-507</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-s507</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-250</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-280</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-281</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-285</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-286</var></td>

                  <td>Sharp %, Cougar Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">leopard</var></td>

                  <td>Sharp Generic Leopard Family, PS and PCL,
                  uses SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-235</var></td>

                  <td>Sharp %s, Leopard Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-275</var></td>

                  <td>Sharp %s, Leopard Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-n275</var></td>

                  <td>Sharp %s, Leopard Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m208</var></td>

                  <td>Sharp %s, Leopard Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">tiger</var></td>

                  <td>Sharp Generic Tiger Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-p350</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m350</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m350u</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m350n</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-p450</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m450</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m450u</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-m450n</var></td>

                  <td>Sharp %, Tiger Family, PS and PCL, uses SNMP
                  for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">toshiba650</var></td>

                  <td>Sharp Generic Toshiba650 Family, PS and PCL,
                  uses SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-650</var></td>

                  <td>Sharp %, Toshiba650 Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-800</var></td>

                  <td>Sharp %, Toshiba650 Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">fiery651</var></td>

                  <td>Sharp Generic Fiery651 Family, PS and PCL,
                  uses SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-651</var></td>

                  <td>Sharp %, Fiery651 Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">ar-810</var></td>

                  <td>Sharp %, Fiery651 Family, PS and PCL, uses
                  SNMP for status and pagecount</td>
                </tr>
              </tbody>
            </table>
          </div>
          <br>
          <br>

          <p>If your printer is not in this this list then you can
          use the following guidelines. If you have a PostScript
          only printer you should use the <var class=
          "LITERAL">ps</var> model. If you have a PCL only printer,
          then <var class="LITERAL">pcl</var> is recommended. If
          you want to process PostScript files on your PCL only
          printer then install GhostScript and use <var class=
          "SYMBOL">pcl_ps</var> entry and select the GhostScript
          driver suitable for your printer.</p>

          <p>The other model entries are used when specific printer
          functionality or features are needed. For example, if you
          want to do accounting or use <span class="emphasis"><i
          class="EMPHASIS">landscape</i></span> mode, then you
          should check for your specific printer model in the
          configuration file.</p>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN1670"></a>Chapter 3. Recommended -Z options
        for Users</h1>

        <p>Due to the general nature of the <b class=
        "APPLICATION">ifhp</b> filter, there is no standard set of
        <var class="OPTION">-Z</var> user options because there is
        no standard set of user facilities. However, the following
        are recommended for use by implementors of new
        configurations or printer support.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1675">3.1. Input Tray
          Selection</a></h2>

          <p>If a printer supports an input tray selection
          mechanism, then the following options are recommended for
          use. Local conditions or printer type may require
          addition options.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt><var class="LITERAL">inupper, inlower, intray1,
              intray2, ..., manual, envelope</var></dt>

              <dd>
                <p>The input tray selection options should start
                with the <var class="LITERAL">in</var> prefix and
                correspond to the various trays, if possible. The
                <var class="LITERAL">manual</var> and <var class=
                "LITERAL">envelope</var> options are included to
                select manual feed or envelope feed. There is a
                possible source of conflict here as there may be an
                envelope feeder as well as an envelope media. This
                is a printer specific dependency.</p>
              </dd>

              <dt><var class="LITERAL">source=name</var></dt>

              <dd>
                <p>The <var class="LITERAL">key=value</var> form
                allows users to use options such as <var class=
                "LITERAL">-Zsource=inbin1</var>, which may be
                useful for systems that have an unusual or
                nonstandard input selection mechanism.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1694">3.2. Output Bin
          Selection</a></h2>

          <p>If a printer has an output bin selection mechanism or
          some other finishing mechanism, then the following are
          recommended for use.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt><var class="LITERAL">outupper, outlower, outbin1,
              ...</var></dt>

              <dd>
                <p>The output bin selection should start with the
                <var class="LITERAL">out</var> prefix.</p>
              </dd>

              <dt><var class="LITERAL">outbin=name</var></dt>

              <dd>
                <p>The <var class="LITERAL">outbin=name</var> form
                allow users to use options such as <var class=
                "LITERAL">-Zoutbin=stapler</var>, which may be
                useful for systems that have an unusual or
                nonstandard output selection mechanism.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1712">3.3. Media Size
          (Paper) Selection</a></h2>

          <p>The paper size selection facilities usually are quite
          printer dependent, and the input tray selection and paper
          size selection mechanisms may interact in strange and
          mysterious ways.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt><var class="LITERAL">letter, legal, ledger,
              oversize, a0, a1, ...</var></dt>

              <dd>
                <p>These are standard paper size names.</p>
              </dd>

              <dt><var class="LITERAL">11x17, tabloid</var></dt>

              <dd>
                <p>These are usually aliases for ledger, but
                depending on local conditions can select different
                types of paper.</p>
              </dd>

              <dt><var class="LITERAL">paper=name</var></dt>

              <dd>
                <p>The <var class="LITERAL">paper=name</var> form
                allow users to use options such as <var class=
                "LITERAL">-Zpaper=b3</var>, which may be useful for
                systems that have an unusual or nonstandard input
                media selection mechanism.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1734">3.4. Media Type
          Selection</a></h2>

          <p>Media Type is not the same as paper size, and
          corresponds to the name assigned to a particular media.
          Of course, the issue is complicated by the fact that some
          media have standard sizes as well. Again, the input tray
          selection, media size, and media type selection will
          interact in confusing and mysterious ways, depending on
          the whim of the printer firmware implementors.</p>

          <p>You will also notice that there is no general <var
          class="LITERAL">mediatype=name</var> selection mechanism.
          This is due to the extremely different way that the media
          names must be passed for PostScript, PJL, and PCL.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt><var class="LITERAL">plain, preprinted,
              letterhead, transparency, glossy, prepunched,
              labels</var></dt>

              <dd>
                <p>These are commonly used media type names gleaned
                from various PostScript Printer Description Files,
                Microsoft printer drivers, and arcane lore of the
                Printer Working Group. Note that these are not
                accepted terms in the paper industry for any of
                these type of media. You are warned.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1746">3.5. Duplex and
          Simplex</a></h2>

          <p>Duplex printing is when impressions are placed on both
          sides of a sheet of media. Due to a general lack of
          conventions, the orientation of each of the impressions
          varies from vendor to vendor, and has changed over the
          years.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt><var class="LITERAL">duplex, lduplex</var></dt>

              <dd>
                <p>Print on both sides using the default
                orientation. The <var class="LITERAL">lduplex</var>
                is an alias for <var class=
                "LITERAL">duplex</var></p>
              </dd>

              <dt><var class="LITERAL">duplexshort,
              sduplex</var></dt>

              <dd>
                <p>Print on both sides but reverse the orientation
                of one page. The <var class="LITERAL">sduplex</var>
                is an alias for <var class=
                "LITERAL">duplexshort</var> Which page is reversed
                is at the whim of the firmware implementors and
                conventions for the printer.</p>
              </dd>

              <dt><var class="LITERAL">simplex</var></dt>

              <dd>
                <p>Print on a single side of a page</p>
              </dd>

              <dt><var class="LITERAL">tumble, shortedge</var></dt>

              <dd>
                <p>This is use to print a single page on one side
                of the media, but using the (nonstandard)
                orientation for the <var class=
                "LITERAL">duplexshort</var>. This is usually done
                when a single impression must be generated on the
                alternative side of the media, rather than the
                default side. Again, this is dependent on the whims
                and whimsies of the printer firmware implementors,
                and may have some unexpected side effects.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1776">3.6. Copies</a></h2>

          <p>This option has been provided to effectively allow the
          printer to make multiple copies of a single page or job.
          This option tends to be misimplemented on almost all
          known printers, and it is strongly recommended that users
          do not use it. However, for completeness, compatibility,
          and implementor consideration, this is included, even
          against the better judgement of the implementors of the
          <b class="APPLICATION">ifhp</b> software.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt><var class="LITERAL">copies=nnn</var></dt>

              <dd>
                <p>Attempt to make <var class="LITERAL">nnn</var>
                copies of each impression. This usually fails with
                catastrophic problems unless you have a system that
                supports all of the various options required, has
                enough memory to handle rasterization, you do not
                have a paper outage, and the printer does not stop
                with operator intervention. You have been
                warned.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN1787"></a>Chapter 4. Printer Capabilities,
        Configurations, and Printcaps</h1>

        <p>One of the major difficulties with printer software is
        dealing with the wide range of different printer hardware
        configurations and printer connections. This section
        outlines the printer communication methods, the types of
        print job languages, and the effects of these on printing
        software and the <b class="APPLICATION">ifhp</b>
        filter.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN1791">4.1. Printer
          Configurations</a></h2>

          <p>A printer consists of a hardware print engine which
          marks the output page and delivers it, a set of control
          hardware that takes a <span class="emphasis"><i class=
          "EMPHASIS">print job</i></span> in a well defined format
          and operates the hardware to produce output according to
          information in the <span class="emphasis"><i class=
          "EMPHASIS">print job</i></span>, and a communication
          channel from the computer to the control hardware. The
          control hardware is sometimes called a <span class=
          "emphasis"><i class="EMPHASIS">print engine</i></span>.
          In most modern computers the control hardware may consist
          of multiple microprocessors, each with their own
          firmware, and each performing a specific printing task.
          For example, one may control the paper feed path, one may
          do rasterization, and one may handle communications with
          the outside world.</p>

          <p>In order to set up printing correctly, it is necessary
          to know the following information about your printer.</p>

          <ol type="1">
            <li>
              <p>The capabilities of the hardware. This is
              dependent on the model of printer, and may be such
              things as the page feed, output and input tray
              selection, numbers of columns and/or rows of output
              available on the output device. This information is
              readily available from most manufacturers.</p>
            </li>

            <li>
              <p>The <span class="emphasis"><i class=
              "EMPHASIS">print job language</i></span> recognized
              by the control hardware. This is the special set of
              codes, commands, and formats recognized by the
              control hardware.</p>
            </li>

            <li>
              <p>The protocol used to send jobs to the printer and
              obtain status about the printing activity.</p>
            </li>
          </ol>
          <br>
          <br>

          <p>Usually the capabilities of a modern printer are very
          well known and documented, and the <b class=
          "APPLICATION">ifhp</b> filter and most print spooling
          software has little difficulty working with them.</p>

          <p>The following checklist will help you in setting up
          your printer. The various options that you will need to
          know about are indicated where appropriate.</p>

          <ol type="1">
            <li>
              <p>Printer Model (<var class=
              "LITERAL">model=???</var>) What is the exact printer
              model? Check the serial number or other
              identification to get this information. You should
              check the <tt class="FILENAME">ifhp.conf</tt>
              configuration file to see if your printer is already
              supported.</p>
            </li>

            <li>
              <p>Print Languages Supported By Your Printer</p>

              <ol type="a">
                <li>
                  <p>PJL? (<var class="LITERAL">pjl</var> or <var
                  class="LITERAL">pjl@</var>) The Printer Job
                  Language (PJL) is a high level language supported
                  by many Hewlett-Packard printers that allows some
                  print system configuration to be performed. Due
                  to historical developments, not all printers
                  support all PJL language facilities, and some
                  support them in different ways than other
                  printers. The <b class="APPLICATION">ifhp</b>
                  filter can use the PJL support for a printer if
                  it is available.</p>
                </li>

                <li>
                  <p>PostScript (and what version)? (<var class=
                  "LITERAL">ps</var> or <var class=
                  "LITERAL">ps@</var>) PostScript is the most
                  common print job language in use. If your printer
                  supports PostScript, then you will have a
                  relatively trouble free time with it. One problem
                  is that it requires a fairly substantial amount
                  of memory and computational support, and is
                  usually not found on the low end (less than $500)
                  printers.</p>
                </li>

                <li>
                  <p>PCL? (<var class="LITERAL">pcl</var> or <var
                  class="LITERAL">pcl@</var>) PCL is another Print
                  Language supported by many vendors, including
                  Hewlett-Packard, Lexmark, and others. It is
                  essentially text with escape sequences to tell
                  the print engine to place markings on a page at
                  specific places in a specific font. It is the
                  second most common format used with modern
                  printers.</p>
                </li>

                <li>
                  <p>Text? (<var class="LITERAL">text</var> or <var
                  class="LITERAL">text@</var>) Text is really just
                  PCL without any control sequences. However, it is
                  easy to have <b class="APPLICATION">ifhp</b>
                  convert ordinary text into PCL by prefixing the
                  appropriate PCL control codes. You may also need
                  to use the <var class="LITERAL">crlf</var> option
                  to force <acronym class="ACRONYM">CR</acronym> to
                  <var class="LITERAL">CR-LF</var> translation. If
                  you have a simple text printer then you may want
                  to use the much easier to configure <b class=
                  "APPLICATION">lpf</b> filter from the <b class=
                  "APPLICATION">LPRng</b> distribution (<a href=
                  "http://www.lprng.com" target=
                  "_top">http://www.lprng.com</a>).</p>
                </li>

                <li>
                  <p>Vendor Specific There is a growing trend to
                  have very proprietary Print Languages for very
                  low end (less than $300) printers. These printers
                  usually require all of their jobs to be
                  preformated by software running on the host and
                  to have the job delivered to them in a specific
                  manner. If you have one of these printers, you
                  will need to get a rasterizing program that
                  produces the correct format. Check to see if <a
                  href="#GHOSTSCRIPT">GhostScript</a>, supports
                  your printer. If it does then you can use <var
                  class="LITERAL">GhostScript</var> to translate
                  PostScript to your printer's required format.</p>
                </li>
              </ol>
              <br>
              <br>
            </li>

            <li>
              <p>Memory Size. If you are going to be sending large
              print jobs or ones with a large amount of graphics to
              the printer, you will need a substantial amount of
              memory to deal with rasterization. Most high
              resolution Laser Copier based printers require a
              minimum of 16 megabytes for adequate performance, and
              if you are printing complex PostScript or PDF
              documents you may want at least 32 megabytes. Color
              printers require substantially more and 64 megabytes
              is not uncommon.</p>
            </li>

            <li>
              <p>Communications. The connection between your
              printer and the host computer.</p>

              <ol type="a">
                <li>
                  <p>Network Connection This is the most reliable
                  and high speed way to connect a printer to a
                  system. This is especially true if a printer must
                  be accessible to multiple users and is located at
                  a distance from the user.</p>
                </li>

                <li>
                  <p>Parallel Port (<var class=
                  "LITERAL">status@</var>) The parallel port is a
                  <span class="emphasis"><i class=
                  "EMPHASIS">unidirectional</i></span>
                  communications channel and does not do full
                  duplex bidirectional communications. Some
                  operating system support bidirectional
                  communications, but they do so by requiring write
                  operations to alternate with read operations.</p>
                </li>

                <li>
                  <p>Serial Ports This is the very worst way to
                  communicate at high speed with a printer. Serial
                  ports usually have a high error rate, suffer from
                  data overruns, and have a severe impact on system
                  performance. You will need to configure your
                  printer speed, format (bits per character,
                  parity, stop bit), and flow control method, and
                  then do the same for the host. This can be an
                  endless source of frustration for the novice
                  user.</p>
                </li>

                <li>
                  <p>Print Server Box Many older printers do not
                  directly support a network connection and have an
                  external <span class="emphasis"><i class=
                  "EMPHASIS">print server box</i></span> attached
                  to either their serial or parallel ports. If you
                  have the printer connected to a parallel port,
                  then you will still most likely only have
                  unidirectional communication and no status
                  information will be available from the
                  printer.</p>
                </li>
              </ol>
              <br>
              <br>
            </li>
          </ol>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="NETWORKPROTOCOLS">4.2. Network
          Communication Protocols</a></h2>

          <p>The most high speed and reliable connection to your
          printer is using a network connection. The following
          protocols are usually used to communicate with a network
          printer: RFC1179 (TCP/IP printing), Socket Protocol
          (TCP/IP), AppSocket Protocol (TCP/IP), Novell Print
          Protocol (IPX), SMB Print Protocol (TCP/IP), and
          AppleTalk Print Protocol (TCP/IP).</p>

          <p>It is highly recommended that you use TCP/IP
          networking to communications to talk to your printer, and
          that you do not enable any other protocol on your
          printer. If you have two different systems trying to
          connect to the same printer using different protocols, a
          wide range of vendor's hardware will lock up and may
          require a power up reset to recover. Documented evidence
          for this behavior includes a wide range of printers,
          including those from Hewlett-Packard, LexMark, IBM and
          other vendors.</p>

          <p>Only the TCP/IP based network job transfer protocols
          are discussed in this document. For details on using
          other protocols, please consult the consult the <a href=
          "http://www.lprng.com" target="_top"><b class=
          "APPLICATION">LPRng</b></a> documentation.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="RFC1179PC">4.3. RFC1179 (BSD
          or TCP/IP) Job Transfer Printcap Entry</a></h2>

          <p>RFC1179 is used to transfer print jobs between a
          client (user) and a print spooler, or between two print
          spoolers. Jobs are transferred as a set of files, and the
          only information exchanged during the transfer process is
          the success or failure of the transfer. In order to get
          status about the actual job printing, a separate query
          status (<b class="APPLICATION">lpq</b>) is sent to the
          print spooler.</p>

          <p>Many, if not all, printers with a network interface
          that supports the TCP/IP protocol support the RFC1179
          protocol for job transfer. However, their support for
          print job status is usually minimal to non-existent. If
          you want to send a job to a printer using the RFC1179
          protocol, please be aware of the following problems.</p>

          <p>Normally a print spooler (System 5 lp, BSD lpd, <b
          class="APPLICATION">LPRng</b>) does not modify a print
          job when forwarding it to another print spooler. This
          means that your print job will normally pass from the
          originating <b class="APPLICATION">lp</b> or <b class=
          "APPLICATION">lpr</b> program to the destination printer
          with no changes. This can have disastrous results if the
          job <span class="emphasis"><i class=
          "EMPHASIS">requires</i></span> filter processing.</p>

          <p>If you are using the <b class="APPLICATION">LPRng</b>
          print spooler, job transfers using <var class=
          "LITERAL">RFC1179</var> is specified by using <var class=
          "LITERAL">:lp=spoolqueue@host</var> or <var class=
          "LITERAL">:rp=spoolqueue:rm=host</var> printcap entries.
          For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN1883"></a>
<pre class="SCREEN">
    raw:
      :lp=raw@host
      :sh:sf:mx=0
      :sd=/var/spool/lp
    cooked:
      :rp=cooked:rm=host
      :sh:sf:mx=0
      :sd=/var/spool/lp
      :filter=/usr/local/libexec/filters/ifhp
</pre>
          </div>
          <br>
          <br>

          <p>The <var class="LITERAL">raw</var> queue does not have
          a filter and jobs sent to the <var class=
          "LITERAL">raw</var> are transfered intact from the <var
          class="LITERAL">raw</var> queue to the destination <var
          class="LITERAL">raw</var> printer on the <var class=
          "LITERAL">host</var> server.</p>

          <p>Jobs sent to the <var class="LITERAL">cooked</var>
          queue will be processed by the program specified by the
          <var class="LITERAL">filter</var> option. For each data
          file in the job, the <b class="APPLICATION">lpd</b> print
          spooler will open a temporary file to hold the filter
          output, and then run the filter program with its <acronym
          class="ACRONYM">STDIN</acronym> set to the job's data
          file file and the <acronym class=
          "ACRONYM">STDOUT</acronym> set to the temporary file. The
          filter <acronym class="ACRONYM">STDERR</acronym> will be
          recorded in an error log.</p>

          <p>When a job is created a job format may specified
          (default is <var class="LITERAL">f</var>), and an filter
          can be specified to process job files with this format.
          The <var class="LITERAL">:i</var>&lt;<span class=
          "emphasis"><i class="EMPHASIS">format</i></span>&gt;
          option specifies the filter program for use. For example,
          you can specify a different filter for the <var class=
          "LITERAL">n</var> format as shown below. The <var class=
          "LITERAL">translate_format</var> option specifies the
          resulting format for the processed files, and uses a
          format similar to the UNIX <var class=
          "LITERAL">try</var>(1) program. In the example, it
          specifies that the output of the filter for the <var
          class="LITERAL">n</var> format be renamed as <var class=
          "LITERAL">f</var>.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN1907"></a>
<pre class="SCREEN">
    cooked:
      :rp=cooked:rm=host
      :sh:sf:mx=0
      :sd=/var/spool/lp
      # default filter
      :filter=/usr/local/libexec/filters/ifhp
      # n filter
      :nf=/usr/local/libexec/filters/nfilter
      :translate_format=nf
</pre>
          </div>
          <br>
          <br>

          <p>There is a final option that is used when rather than
          having a set of job files forwarded to a printer, a
          single job file is desireable. This is usually the case
          when sending a job to a host or printer that has a
          defective RFC1179 spooler implementation, and drops or
          misprints jobs with multiple files in them. The <var
          class="LITERAL">lpd_bounce</var> option causes the output
          of all the filters to be put into a single file, and the
          output is then forwarded to the destination. You can also
          use the <var class="LITERAL">bq_format</var> option to
          specify the format of the job:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN1912"></a>
<pre class="SCREEN">
    cooked:
      :rp=cooked:rm=host
      :sh:sf:mx=0
      :sd=/var/spool/lp
      # default filter
      :filter=/usr/local/libexec/filters/ifhp
      :lpd_bounce
      # output has l (literal) or binary output
      :bq_format=l
</pre>
          </div>
          <br>
          <br>

          <p>The <tt class="COMMAND">lpr -l</tt> or <tt class=
          "COMMAND">lpr -b</tt> flag is used to specify the special
          <var class="LITERAL">literal</var> or <var class=
          "LITERAL">l</var> job format. Job that have the <var
          class="LITERAL">l</var> format usually have only the most
          perfunctory processing done by the filter.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="SOCKETPC">4.4. Socket Protocol
          (TCP/IP) Operation Printcap Entry</a></h2>

          <p>Many printers with a network interface provide a
          TCP/IP port that is a direct connection to the internal
          <span class="emphasis"><i class="EMPHASIS">print
          engine</i></span>. If a TCP/IP connection is made to this
          port and a file is sent over this connection, then the
          print engine will process the file. More importantly, the
          connection is bidirectional, and the printer will report
          errors and status conditions over the connection. PJL and
          PostScript status request commands can be sent to the
          printer and the printer will respond with
          information.</p>

          <p>The <b class="APPLICATION">ifhp</b> filter makes
          extensive use of this protocol, and provides support for
          status and error reporting. In cooperation with the <b
          class="APPLICATION">LPRng</b> print spooler, it will
          provide a detailed description of the actual print job
          progress and any error conditions that arise.</p>

          <p>To use a Socket connection with <b class=
          "APPLICATION">LPRng</b>, you use the <var class=
          "LITERAL">:lp=host%port</var> printcap entry shown below.
          The <b class="APPLICATION">lpd</b> print spooler will
          open a connection to the TCP/IP <var class=
          "LITERAL">port</var> on <span class="emphasis"><i class=
          "EMPHASIS">host</i></span> and passes the (bidirectional)
          connection to the <b class="APPLICATION">ifhp</b> filter
          on file descriptor 1 (<acronym class=
          "ACRONYM">STDOUT</acronym>) and the file to be printed on
          file descriptor 0 (<acronym class=
          "ACRONYM">STDIN</acronym>). Errors and status information
          are reported by the <b class="APPLICATION">ifhp</b>
          filter on file descriptor 2 (<acronym class=
          "ACRONYM">STDOUT</acronym>) and placed in the error
          status log by the <b class="APPLICATION">lpd</b> print
          spooler.</p>

          <p>The connection made by the <b class=
          "APPLICATION">lpd</b> server to the printer is <span
          class="emphasis"><i class=
          "EMPHASIS">persistent</i></span> over the entire job; all
          file transfers for the same job are made over the same
          connection. This is important as it prevents other
          printer users from <span class="emphasis"><i class=
          "EMPHASIS">hijacking</i></span> the printer in the middle
          of print a job and getting your job outputs mixed
          together.</p>

          <p>The following is a typical printcap entry using the
          socket protocol.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN1944"></a>
<pre class="SCREEN">
    raw:
      :lp=host%9100
      :sh:sf:mx=0
      :sd=/var/spool/lp
      :filter=/usr/local/libexec/filters/ifhp
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="APPSOCKETPC">4.5. Appsocket
          Protocol (TCP/IP) Operation</a></h2>

          <p>The Tektronics Phaser Series printers and QMS printers
          use the <span class="emphasis"><i class=
          "EMPHASIS">Appsocket</i></span> protocol when sending a
          job to the printer. This protocol uses two ports: a
          TCP/IP <span class="emphasis"><i class=
          "EMPHASIS">listening</i></span> port which accepts TCP/IP
          connections and a UDP <span class="emphasis"><i class=
          "EMPHASIS">SNMP query</i></span> port that is used to
          obtain status information.</p>

          <p>The Appsocket protocol is (briefly):</p>

          <ol type="1">
            <li>
              <p>The Simple Network Management Protocol (SNMP) is a
              UDP protocol. A SNMP Query packet containing a
              request for information is sent to the printers SNMP
              Agent port (port 161), and a reply containing the
              requested information is returned.</p>
            </li>

            <li>
              <p>To send a job to the printer, a TCP/IP connection
              is opened to the TCP/IP port and job data is sent.
              Only a single job can be sent at a time - a EOJ in
              the job, i.e.- CTRL-D for PostScript or ESC E for PCL
              will cause the printer to terminate reading from the
              TCP/IP port, and after job processing has finished,
              to close the TCP/IP connection. All input after the
              EOJ may be ignored by the printer and not
              processed.</p>
            </li>

            <li>
              <p>While processing the job, if <span class=
              "emphasis"><i class=
              "EMPHASIS">bidirectional</i></span> support is
              available and has been enabled the printer will
              return job status or information until all of the
              print job which is has received has been processed.
              This support is usually not enabled by default and
              must be enabled by using a specialized administration
              interface or configuration tool.</p>
            </li>

            <li>
              <p>Unfortunately, some printers will also close the
              connection when the EOJ has been received. These
              printers are virtually useless when trying to get
              error or status information about a job.</p>
            </li>

            <li>
              <p>Even more annoying is the behavior of some
              printers that insist on the network connection
              remaining open until the job has been processed. The
              device sending the job to the printer must do a <span
              class="emphasis"><i class=
              "EMPHASIS">shutdown</i></span> on the sending
              direction of the network connection, and then read
              status information from the receiving direction until
              the printer terminates the connection. Unfortunately,
              some printers <span class="emphasis"><i class=
              "EMPHASIS">do not</i></span> terminate the
              connection, and the the user must close the
              connection after a suitable timeout.</p>
            </li>

            <li>
              <p>There are also printers that insist on the network
              connection being closed before they will start
              processing small jobs. The device sending the job to
              the printer must do a <span class="emphasis"><i
              class="EMPHASIS">close</i></span> rather than a
              shutdown.</p>
            </li>

            <li>
              <p>While processing the job, the printer will ignore
              any connection requests, and only until the job has
              been processed will the printer accept
              connections.</p>
            </li>

            <li>
              <p>During job processing, status and error
              indications can be obtained by sending a query to the
              UDP port. However, the error conditions and other
              information are not very precise as the status may
              change dramatically during job processing.</p>
            </li>

            <li>
              <p>a query to the UDP port. However, the error
              conditions and other information are not very precise
              as the status may change dramatically during job
              processing.</p>
            </li>
          </ol>
          <br>
          <br>

          <p>The Appsocket protocol does not use a <span class=
          "emphasis"><i class="EMPHASIS">persistent</i></span>
          connection. If two people are sending jobs to the printer
          simultaneously it is very likely that the jobs will get
          intermixed.</p>

          <p>The <var class="LITERAL">appsocket</var> option causes
          the <b class="APPLICATION">ifhp</b> filter to open and
          close a TCP/IP connection to the printer. In order to
          reopen the device, <b class="APPLICATION">ifhp</b> needs
          the device name. It gets this from the <var class=
          "LITERAL">PRINTCAP_ENTRY</var> environment variable which
          has the device information, or by using the TCP/IP
          address of the initial end of the connection.</p>

          <p>The <var class="LITERAL">close_appsocket</var> option
          causes the <b class="APPLICATION">ifhp</b> filter to
          close the connection after sending a job or part of a
          job. This is necessary with printers that will not start
          printing small jobs until a sufficient number of pages
          has been received.</p>

          <p>The following is a sample printcap entry for this
          printer:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN1987"></a>
<pre class="SCREEN">
    # Phaser Setup
    #  Appsocket
    lp:server  
      :<var class="LITERAL">lp=10.0.0.1%9100</var>  
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span>  
      :...  
      :ifhp=model=ps,appsocket
      #path to ifhp filter  
      :filter=/.../ifhp
</pre>
          </div>
          <br>
          <br>

          <p>For your convenience, the <var class=
          "LITERAL">model=phaser</var> entry is suitable for use
          with the appsocket protocol.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="SNMP">4.6. Using SNMP For
          Status Information</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">snmp_monitor</var> FLAG <span
              class="emphasis"><i class="EMPHASIS">use snmp for
              status</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">snmp_program=</var> <span
              class="emphasis"><i class="EMPHASIS">path to
              snmp_printer_status</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">snmp_program_cfg=</var> <span
              class="emphasis"><i class=
              "EMPHASIS">snmp_printer_status configuration
              file</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">snmp_model=</var><span class=
              "emphasis"><i class="EMPHASIS">snmp model
              information</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">snmp_sync_status=</var><span
              class="emphasis"><i class="EMPHASIS">sync
              indicators</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">snmp_end_status=</var><span
              class="emphasis"><i class="EMPHASIS">end of job
              indicators</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">snmp_end_status=</var><span
              class="emphasis"><i class="EMPHASIS">end of job
              indicators</i></span></p>
            </li>
          </ul>

          <p>The <b class="APPLICATION">ifhp</b> filter can be
          configured to use the SNMP helper program <var class=
          "LITERAL">snmp_printer_status</var> to obtain SNMP
          status. This program is supplied as part of the <b class=
          "APPLICATION">ifhp</b> distribution.</p>

          <p>The <var class="LITERAL">snmp_monitor</var> flag is
          used to enable the use of the <var class=
          "LITERAL">snmp_printer_status</var> program. The <var
          class="LITERAL">snmp_program</var> specifies the program
          path and command line to invoke it. The <var class=
          "LITERAL">snmp_program_conf</var> specifies the path to
          the configuration file, <var class=
          "LITERAL">snmp_printer_stastus.conf</var>. The
          configuration file contains information about the
          operation of the program as well as the SNMP Object
          Identifiers (OIDs) for the status information.</p>

          <p>Since different printers may not support all of the
          standard Printer MIB Oids, the <var class=
          "LITERAL">snmp_printer_status.conf</var> can identify the
          options on a per-printer model basis, and the appropriate
          ones can be selected using the <var class=
          "LITERAL">snmp_model</var> option.</p>

          <p>The <var class="LITERAL">snmp_printer_status</var>
          program returns status information on it STDOUT and
          errors on its STDERR. The status information has the
          format:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2040"></a>
<pre class="SCREEN">
    PRINTERNAME=HP LaserJet 2200
    DEVICEID=HP LaserJet
    STATUS=Ready
    DEVICESTATUS=running
    PRINTERSTATUS=idle
    PAGECOUNT=30
</pre>
          </div>
          Consult the <var class=
          "LITERAL">snmp_printer_status</var> program and <var
          class="LITERAL">snmp_printer_status.conf</var> files for
          details of how the status is obtained.<br>
          <br>

          <p>When using <var class="LITERAL">snmp</var> to detect
          idle or end conditions, the <var class=
          "LITERAL">snmp_sync_status</var> and the <var class=
          "LITERAL">snmp_end_status</var> values are used. If the
          retured status matches a field in the <var class=
          "LITERAL">snmp_sync_status</var> list, then a idle
          printer condtion is assumed. If the retured status
          matches a field in the <var class=
          "LITERAL">snmp_end_status</var> list, then an end of job
          condtion is assumed. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2050"></a>
<pre class="SCREEN">
    snmp_end_status=ready idle
    snmp_sync_status=ready power_save_mode
</pre>
          </div>
          <br>
          <br>

          <p>When using SNMP to obtain status, it may be of little
          benefit to use other methods to obtain sync, pagecount,
          or end of job (waitend). Also, if a connection is open to
          the printer then the printer may never indicate <var
          class="LITERAL">idle</var> or non-printing status. This
          problem can be avoided by using the <var class=
          "LITERAL">appsocket</var> protocol. If you use this, then
          you should also set the <var class="LITERAL">sync</var>,
          <var class="LITERAL">waitend</var>, and <var class=
          "LITERAL">pagecount</var> values to <var class=
          "LITERAL">snmp</var> as well. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2059"></a>
<pre class="SCREEN">
    [ printer ]
    snmp_monitor
    appsocket
    sync=snmp
    waitend=snmp
    pagecount=snmp
</pre>
          </div>
          This will cause the <b class="APPLICATION">ifhp</b> to
          perform the operations but not to send any query strings
          to the printer.<br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2062">4.7. Common Print
          Server Boxes Configuration Information</a></h2>

          <p>The following is a list of print server manufacturers,
          models, and with hints on how to access these boxes with
          various protocols.</p>

          <div class="TABLE">
            <a name="NETWORKPRINTSERVERS"></a>

            <p><b>Table 4-1. Network Print Servers</b></p>

            <table border="1" frame="border" rules="all" class=
            "CALSTABLE">
              <col>
              <col>
              <col>
              <col>

              <thead>
                <tr>
                  <th>Manufacturer</th>

                  <th>Model</th>

                  <th>RFC1179 Port Name (rp=XXX)</th>

                  <th>Send to TCP port</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td><a href="http://www.digprod.com/" target=
                  "_top">Digital Products Inc.</a></td>

                  <td>NETPrint Print Server</td>

                  <td><var class="LITERAL">PORT</var><span class=
                  "emphasis"><i class="EMPHASIS">n</i></span>,
                  where <span class="emphasis"><i class=
                  "EMPHASIS">n</i></span> is port on server</td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td rowspan="4"><a href="http://www.efi.com/"
                  target="_top">Electronics For Imaging
                  Inc.</a></td>

                  <td>Fiery RIP i series</td>

                  <td><var class="LITERAL">normalq</var> or <span
                  class="emphasis"><i class=
                  "EMPHASIS">urgentq</i></span></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td>Fiery RIP XJ series</td>

                  <td><var class="LITERAL">xjprint</var></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td>Fiery RIP XJ+ and SI series</td>

                  <td><var class="SYMBOL">print_</var><span class=
                  "emphasis"><i class="EMPHASIS">Model</i></span>,
                  e.g. <var class=
                  "SYMBOL">print_DocuColor</var></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td>Fiery models ZX2100, ZX3300, X2, X2e</td>

                  <td><var class="LITERAL">print</var></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td><a href="http://www.emulex.com/" target=
                  "_top">Emulex Corp.</a></td>

                  <td>NETJet/NETQue print server</td>

                  <td><acronym class=
                  "ACRONYM">PASSTHRU</acronym></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td><a href="http://www.extendsys.com/" target=
                  "_top">Extended Systems Inc.</a></td>

                  <td>ExtendNet Print Server</td>

                  <td><span class="emphasis"><i class=
                  "EMPHASIS">Printer<var class=
                  "REPLACEABLE">n</var></i></span>, where <span
                  class="emphasis"><i class="EMPHASIS">n</i></span>
                  is port on server</td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td rowspan="2"><a href="http://www.hp.com/"
                  target="_top">Hewlett-Packard</a></td>

                  <td>JetDirect interface card</td>

                  <td><var class="LITERAL">raw</var></td>

                  <td>9100</td>
                </tr>

                <tr>
                  <td>JetDirect Print Server</td>

                  <td>Port1=<var class="LITERAL">raw1</var>,
                  Port2=<var class="LITERAL">raw2</var>, ...</td>

                  <td>Port1=9100, Port2=9101, ...</td>
                </tr>

                <tr>
                  <td><a href="http://www.i-data.com/" target=
                  "_top">I-Data</a></td>

                  <td>Easycom 10 Printserver</td>

                  <td><var class="LITERAL">par1</var> (parallel
                  port 1)</td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td>&nbsp;</td>

                  <td>Easycom 100 Printserver</td>

                  <td><var class="LITERAL">LPDPRT1</var></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td><a href="http://www.printers.ibm.com/"
                  target="_top">IBM</a></td>

                  <td>Network Printer 12, 17, 24, and 24PS</td>

                  <td><acronym class="ACRONYM">PASS</acronym></td>

                  <td>- Unknown if supported -</td>
                </tr>

                <tr>
                  <td><a href="http://www.lantronix.com/" target=
                  "_top">Lantronix</a></td>

                  <td>EPS1, EPS2</td>

                  <td><var class="LITERAL">EPS_XXXX_S1 (serial)
                  port 1, EPS_XXXX_P1 (parallel) port 2</var>,
                  etc.</td>

                  <td>3001 (port 1), 3002 (port 2), etc.</td>
                </tr>

                <tr>
                  <td><a href="http://www.qms.com/" target=
                  "_top">QMS</a></td>

                  <td>Various Models</td>

                  <td><acronym class="ACRONYM">RAW</acronym></td>

                  <td>35 (Appsocket)</td>
                </tr>

                <tr>
                  <td><a href="http://www.tek.com/color_printers/"
                  target="_top">Tektronix</a> (Now <a href=
                  "http://www.tektronix.xerox.com" target=
                  "_top">Xerox</a>)</td>

                  <td>Tektronix printer network cards</td>

                  <td><acronym class="ACRONYM">PS</acronym>
                  (PostScript), <acronym class=
                  "ACRONYM">PCL</acronym> (PCL), or <acronym class=
                  "ACRONYM">AUTO</acronym>(Auto-selection between
                  PS, PCL, or HPGL). Not reliable.</td>

                  <td>9100 (Appsocket on some models)</td>
                </tr>

                <tr>
                  <td><a href="http://www.rosel.com" target=
                  "_top">Rose Electronics</a></td>

                  <td>Microserve Print Servers</td>

                  <td>lp</td>

                  <td>9100</td>
                </tr>

                <tr>
                  <td rowspan="6"><a href="http://www.xerox.com/"
                  target="_top">Xerox</a></td>

                  <td>Models 4505, 4510, 4517, 4520</td>

                  <td><acronym class=
                  "ACRONYM">PASSTHRU</acronym></td>

                  <td>2501 (Appsocket on some models)</td>
                </tr>

                <tr>
                  <td>Model 4512</td>

                  <td><var class="LITERAL">PORT1</var></td>

                  <td>10001 (programmable)</td>
                </tr>

                <tr>
                  <td>Model N17</td>

                  <td><acronym class="ACRONYM">RAW</acronym></td>

                  <td>9100</td>
                </tr>

                <tr>
                  <td>Models N24 and N32</td>

                  <td><acronym class="ACRONYM">RAW</acronym></td>

                  <td>2000</td>
                </tr>

                <tr>
                  <td>Models 4900, 4915, 4925, C55</td>

                  <td><acronym class="ACRONYM">PS</acronym></td>

                  <td>2000</td>
                </tr>

                <tr>
                  <td>Document Centre DC220/230</td>

                  <td><var class="LITERAL">lp</var></td>

                  <td>- Unknown if supported -</td>
                </tr>
              </tbody>
            </table>
          </div>
          <br>
          <br>

          <p>All company, brand, and product names are properties
          of their respective owners.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2222">4.8. Timeout Problems
          Sending A Job</a></h2>

          <p>The <b class="APPLICATION">ifhp</b> filter may need to
          run a program such as <var class=
          "LITERAL">ghostscript</var> to do format conversion. For
          large files this can take quite a bit of time and most
          network printers have a <span class="emphasis"><i class=
          "EMPHASIS">connection timeout</i></span>. If no data is
          received for this time the printer will close the
          connection. By default this timeout is fairly short: 30
          or 90 seconds on most printers.</p>

          <p>If you are sending large jobs to the printer using the
          <var class="LITERAL">socket</var> protocol and are
          getting timeout problems due to conversion timeouts, then
          there are two solutions: a) use the Appsocket protocol,
          which will open and close the connection for each file,
          and only send data when the converted file is available,
          or b) do your conversions first and then spool the
          converted job to be sent directly to the printer. The
          second method requires an <b class=
          "APPLICATION">LPRng</b> bounce queue.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2231"></a>
<pre class="SCREEN">
    # Method a) Appsocket
    lp:server 
      :lp=10.0.0.1%9100
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span> 
      :... 
      :ifhp=model=printer,appsocket
      #path to ifhp filter 
      :filter=/.../ifhp 
    
    # Method b) Bounce Queue
    #  this queue does the conversion if required
    lp:server
      :lpd_bounce 
      :lp=real@localhost
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span> 
      :... 
      :ifhp=model=printer
      #path to ifhp filter 
      :filter=/.../ifhp 
    # this queue does transmission
    real:server 
      :lp=10.0.0.1%9100
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span> 
      :ifhp=model=printer
      #path to ifhp filter 
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>

          <p>For method a), the Appsocket protocol is used and the
          <b class="APPLICATION">ifhp</b> filter will be invoked
          before sending a job. For method b), you use two queues:
          a <span class="emphasis"><i class=
          "EMPHASIS">bounce</i></span> queue that does the format
          conversion and then sends the job to the real queue, and
          the real queue that actually talks to the printer.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="RWTIMEOUT">4.9. Printers With
          Lockup Problems</a></h2>

          <p>Due to firmware problems in some PostScript and PCL
          printers, they will occasionally lock up and refuse to
          accept new connections or continue with job processing.
          This is extremely difficult to diagnose, as the printer
          appears to be functional but will simply not accept any
          addition data or respond to a command.</p>

          <p>Unfortunately, this is also the condition when these
          printers are turned offline.</p>

          <p>The <var class="LITERAL">send_job_rw_timeout</var>
          option is used to set a maximum timeout for network
          and/or communication operations. This value can be set to
          the maximum expected completion time of the print job.
          When this time is exceeded, the IFHP filter will exit
          with a <var class="LITERAL">JTIMEOUT</var> error.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2246">4.10. PS, PCL, PJL
          Printer with TPC/IP Network Interface</a></h2>

          <p>The most common TCP/IP protocols used for transferring
          jobs to network printers are <a href="#RFC1179PC">RFC
          1179</a>, a direct TCP/IP <a href="#SOCKETPC">socket</a>,
          connection to the print engine, and the very odd <a href=
          "#APPSOCKETPC">Appsocket</a> protocol described in
          previous sections. Here is a reprise of the various
          printcaps and methods to use them.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2252"></a>
<pre class="SCREEN">
    # printer setup  
    #  force clients (lpr, lpq, to use server)  
    lp:lp=lp@serverhost  
    # server information  
    lp:server  
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span>  
      :...  
    
      # No filtering, transfer using RFC1179, use:
      :lp=queue@10.1.1.1
      #    or 
      :rp=queue:rm=10.1.1.1
    
      # Filtering and then transfer using RFC1179, use:
      :lpd_bounce:lp=queue@10.1.1.1
      #    or 
      :lpd_bounce:rp=queue:rm=10.1.1.1
      :ifhp=model=<span class="emphasis"><i class=
"EMPHASIS">name</i></span>
      :filter=/.../ifhp  
    
      # Filter, transfer using socket, use:
      :lp=10.1.1.1%9100 
      :ifhp=model=<span class="emphasis"><i class=
"EMPHASIS">name</i></span>
      :filter=/.../ifhp  
    
      # Filter, transfer using Appsocket, use:
      :lp=10.1.1.1%9100 
      :ifhp=model=<span class="emphasis"><i class=
"EMPHASIS">name</i></span>,appsocket
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>

          <p>If your printer is a parallel port printer connected
          to an <span class="emphasis"><i class=
          "EMPHASIS">external</i></span> Network Print Spooler such
          as an HP JetDirect box, then while the network connection
          to the Network Print Spooler is bidirectional the
          connection from the Network Print Spooler to the printer
          may be unidirectional and no status information will be
          returned from the Network Print Spooler. In this case you
          <span class="emphasis"><i class=
          "EMPHASIS">must</i></span> add the <var class=
          "LITERAL">status@</var> option to tell <b class=
          "APPLICATION">ifhp</b> not to expect status:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2263"></a>
<pre class="SCREEN">
    # Filter, transfer using socket
      :lp=10.1.1.1%9100 
      :ifhp=model=<span class="emphasis"><i class=
"EMPHASIS">name</i></span>,status@
      :filter=/.../ifhp
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2266">4.11. PS, PCL, PJL
          Printer with Parallel Port Connection</a></h2>

          <p>If your printer is connected to a <span class=
          "emphasis"><i class="EMPHASIS">bidirectional</i></span>
          parallel port you may be able to read status from the
          printer. First, determine if your printer has
          bidirectional IO capability and if your operating system
          has support for it. If it does not, then do not use the
          <var class="LITERAL">:rw</var> (open connection
          read-write) option to open the printer device in read
          write mode.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2271"></a>
<pre class="SCREEN">
    # printer setup  
    #  force clients (lpr, lpq, to use server)  
    lp:lp=lp@serverhost  
    # server information  
    lp:server  
      # do now open read write
      :rw@
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span>  
      :...  
      # parallel port 
      :lp=/dev/lpt
      #path to ifhp filter  
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>

          <p>If, on the other hand, your operating system reports
          that the parallel port is bidirectional and is able to
          read the printer model information, then you can try
          opening the parallel port read-write and seeing if the <b
          class="APPLICATION">ifhp</b> filter can read status
          information:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2276"></a>
<pre class="SCREEN">
    # printer setup  
    #  force clients (lpr, lpq, to use server)  
    lp:lp=lp@serverhost  
    # server information  
    lp:server  
      # open read write
      :rw
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span>  
      :...  
      # parallel port 
      :lp=/dev/lpt
      #path to ifhp filter  
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2279">4.12. PS, PCL, PJL
          Printer with Serial Port</a></h2>

          <p>It is strongly advised that serial ports not be used
          for high speed data transfers. The main problem is trying
          to configure them in such as way that they do not lose
          characters due to data overruns or parity errors. LPRng
          is strongly deprecating support for serial port
          printers.</p>

          <p>The <b class="APPLICATION">LPRng</b> print spooler
          will open and set the serial line characteristics, and
          pass the open connection to the <b class=
          "APPLICATION">ifhp</b> filter. The <var class=
          "LITERAL">tty</var> connection must pass all 8 bits with
          no parity, and should use hardware flow control if at all
          possible. Unfortunately, the various <var class=
          "LITERAL">stty</var> options needed to do this vary from
          system to system. Also, you may discover that your serial
          connection does not support hardware flow control. If
          this is the case, then you will have to use software flow
          control which is rather unreliable for high speed (over
          9600) serial lines due to the timing latencies
          involved.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2287"></a>
<pre class="SCREEN">
    # printer setup  
    #  force clients (lpr, lpq, to use server)  
    lp:lp=lp@serverhost  
    # server information  
    lp:server  
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span>  
      :...  
      # serial port 
      :lp=<tt class="FILENAME">/dev/ttyxxx</tt> 
      :stty=38400 -echo -crmod -raw -oddp -evenp \ 
         ixon pass8 -ixany cbreak crtscts 
      #path to ifhp filter  
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="PSONLY">4.13. PostScript Only
          Printer</a></h2>

          <p>The <var class="LITERAL">model=ps</var> entry supports
          PostScript only printers.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2295"></a>
<pre class="SCREEN">
    # printer setup  
    #  force clients (lpr, lpq, to use server)
    lp:lp=lp@serverhost 
    # server information  
    lp:server  
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span> 
      :...  
      :ifhp=model=ps 
      #path to ifhp filter  
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>

          <p>If you have a <span class="emphasis"><i class=
          "EMPHASIS">unidirectional</i></span> or <span class=
          "emphasis"><i class="EMPHASIS">write only</i></span> (no
          status information) connection such as a parallel port
          you should use:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2301"></a>
<pre class="SCREEN">
    :ifhp=model=ps,status@
</pre>
          </div>
          <br>
          <br>

          <p><a name="PS-EOJ"></a> <a name="PS-EOJ-AT-START"></a>
          <a name="PS-EOJ-AT-END"></a> <a name=
          "PCL-EOJ-AT-START"></a> Many PostScript printers
          recognize the PostScript EOJ marker (Control-D or <var
          class="LITERAL">\004</var>) as an end of PostScript job
          indication and will perform page eject and other suitable
          actions. Unfortunately, strictly according to PostScript
          documentation this character is only allowed in the
          Serial Port Data Stream, and there are some printers that
          treat it as an error. In addition, the Control-T
          character is recognized as a printer status solicitation,
          and some printers do not return status or recognize it as
          an error.</p>

          <p>If your printer does not handle PostScript EOJ
          (Control-D) at all, set <var class=
          "LITERAL">ps_eoj@</var> to suppress generation of extra
          Control-D characters by <b class="APPLICATION">ifhp</b>.
          If your printer requires a Control-D at the end of the
          job but fails when they occur at the start of the job,
          set <var class="LITERAL">ps_eoj_at_start@</var>. If the
          printer requires a Control-D at the start but not at the
          end, set <var class="LITERAL">ps_eoj_at_start@</var>.</p>

          <p>PCL based printers are not nearly as fussy. However,
          you may discover that some of them do not correctly
          handle a PCL EOJ at the start of a job in spite of all
          examples and documention. Use the <var class=
          "LITERAL">pcl_eoj_at_start@</var> to suppress adding a
          PCL EOJ (Esc E) command string to the start of a PCL job
          file.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2316"></a>
<pre class="SCREEN">
    :ifhp=model=ps,ps_eoj@
</pre>
          </div>
          <br>
          <br>

          <p>See the section on <a href="#FILECONVERSION">File
          Conversion Support</a> for ways to print text and other
          files on a PostScript printer.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2320">4.14.
          GhostScript</a></h2>

          <p>Generating a raster image from a PostScript or PCL
          file in a timely manner requires a high speed processor
          and substantial amounts of memory. Many of the low cost
          printers require the user's system to do the raster
          conversion and the raster file is then transferred to the
          printer. The file format is usually a subset of PCL.</p>

          <p>The <a href="#GHOSTSCRIPT">GhostScript</a> program can
          process PostScript files and produce raster output for a
          wide range of devices. The <var class=
          "LITERAL">ghostscript</var> <var class=
          "LITERAL">pcl_gs</var> printer configurations is used
          with these printers. See <a href=
          "#GHOSTSCRIPTCONFIG">GhostScript Printer</a> for
          details.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="PHASER">4.15. Tektronics
          Phaser, QMS, and Appsocket Protocol</a></h2>

          <p>The Tektronics Phaser, QMS Network Printers, and a few
          others use the <a href="#APPSOCKETPC">Appsocket</a>
          protocol described in a previous section. The Tektronics
          (<var class="LITERAL">model=phaser</var>) configuration
          entry has the required options for these printers:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2333"></a>
<pre class="SCREEN">
    [ phaser qms ]
    appsocket
    ps
    pjl@
    pcl
</pre>
          </div>
          <br>
          <br>

          <p>The following shows a typical printcap entry:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2336"></a>
<pre class="SCREEN">
    #  force clients (lpr, lpq, to use server)
    lp:lp=lp@serverhost 
    # server information  
    lp:server  
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span> 
      :lp=10.1.1.1%35 
      :...  
      :ifhp=model=phaser
      #path to ifhp filter  
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="OPTIONS"></a>Chapter 5. Options and
        Arguments</h1>

        <ul>
          <li>
            <p><var class="LITERAL">model=</var><span class=
            "emphasis"><i class="EMPHASIS">Model
            Information</i></span></p>
          </li>

          <li>
            <p><var class="LITERAL">model_from_option=</var><span
            class="emphasis"><i class="EMPHASIS">Option with model
            information</i></span></p>
          </li>
        </ul>

        <p>The <b class="APPLICATION">ifhp</b> filter is designed
        to work with the <b class="APPLICATION">LPRng</b> print
        spooler and expects to be passed the standard set of filter
        options. These have the form:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN2353"></a>
<pre class="SCREEN">
    /.../ifhp [-c] [-X option]* accountingfile
    Example:
    /.../ifhp -n root -H hostname -P printer -s statusfile acct
    # - X is any letter except T
</pre>
        </div>
        <br>
        <br>

        <p>All of the option letters except <var class=
        "LITERAL">T</var> are reserved by the <b class=
        "APPLICATION">LPRng</b> program to pass information to the
        filter. For details about the options, please consult the
        <b class="APPLICATION">LPRng</b> documentation.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2359">5.1. Command Line
          Options</a></h2>

          <p>The most important options that <b class=
          "APPLICATION">LPRng</b> passes and that <b class=
          "APPLICATION">ifhp</b> uses are:</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>-s statusfile</dt>

              <dd>
                <p>The file where <b class="APPLICATION">ifhp</b>
                status information is placed.</p>
              </dd>

              <dt>-Z useroptions</dt>

              <dd>
                <p>The <tt class="COMMAND">lpr -Z</tt> options
                passed by the user, and are discussed in the <a
                href="#OPTIONS">options</a> section.</p>
              </dd>

              <dt>-T options</dt>

              <dd>
                <p>These are usually options specified in the
                printcap entry and are discussed in the <a href=
                "#OPTIONS">options</a> section.</p>
              </dd>

              <dt>accountingfile</dt>

              <dd>
                <p>The file where accounting information is
                written.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2386"></a>
<pre class="SCREEN">
    Examples:
    ifhp "-Tmodel=ps,status@" "-Za4,landscape"
</pre>
          </div>
          <br>
          <br>

          <p>Since commas are used to separate options, whitespace
          is used to separate multiple values for a particular
          option. You will need to quote this on a command line.
          For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2389"></a>
<pre class="SCREEN">
    ifhp "-Tfont=elite greek1 dingbat"
</pre>
          </div>
          <br>
          <br>

          <p>The <b class="APPLICATION">ifhp</b> program first
          checks to see if the <acronym class=
          "ACRONYM">PRINTCAP</acronym> environment variable is
          defined. By convention, <b class="APPLICATION">LPRng</b>
          will place the printer printcap entry in this variable
          when it starts the <b class="APPLICATION">ifhp</b>
          filter. The printcap <var class=
          "LITERAL">:ifhp=options</var> value is extracted and used
          as the default <var class="OPTION">-T</var> options.
          After getting the options from the printcap, the <var
          class="OPTION">-Toptions</var> command line options are
          appended to the list of <var class="OPTION">-T</var>
          options. The single letter command line options are also
          made available to the <b class="APPLICATION">ifhp</b>
          programs as shown below:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2401"></a>
<pre class="SCREEN">
    PRINTCAP=lp:ifhp=model=this,status@:...
    
    ifhp -n root -h localhost -Tmodel=that,debug=1
    
    Concatenated -T options:  model=this,status@,n=root,h=localhost,model=that,debug=1
    Resulting    -T options:  status@,n=root,h=localhost,model=that,debug=1
</pre>
          </div>
          <br>
          <br>

          <p>The <var class="OPTION">-T</var> option list is
          scanned from left to right, and later option values
          override earlier ones. The <var class="OPTION">-T</var>
          option values have priority over values that are obtained
          from the configuration file and cannot be overridden.
          There are several options that have important effects on
          the operation of the <b class="APPLICATION">ifhp</b>
          filter.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="CONFIG">5.2. General
          Configuration Options - config, trace, debug</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">config=</var><span class=
              "emphasis"><i class="EMPHASIS">Configuration file
              location</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">debug=</var><span class=
              "emphasis"><i class="EMPHASIS">Debug
              options</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">trace</var> FLAG <span class=
              "emphasis"><i class="EMPHASIS">trace on <acronym
              class="ACRONYM">STDERR</acronym></i></span></p>
            </li>
          </ul>

          <p>These options are used to control the global operation
          of the <b class="APPLICATION">ifhp</b> filter, and are
          only available from the <var class="OPTION">-T</var>
          command line options.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>config=pathname</dt>

              <dd>
                <p>The <var class="LITERAL">config</var> option
                specifies the location of the <tt class=
                "FILENAME">ifhp.conf</tt> file. This overrides the
                default location. The pathname can be a file name,
                list of filenames separated by spaces, or a filter.
                For example:</p>

                <div class="INFORMALEXAMPLE">
                  <a name="AEN2433"></a>
<pre class="SCREEN">
    ifhp '-Tconfig=/usr/local/etc/ifhp.conf'
    ifhp '-Tconfig=|/usr/local/bin/getconfig'
</pre>
                </div>
                <br>
                <br>

                <p>The second example uses the <var class=
                "LITERAL">getconfig</var> program to obtain
                configuration information. The configuration
                information is read from the program's STDOUT.
                There program is invoked with no command line
                options and is passed the environment variables
                that were provided to <b class=
                "APPLICATION">ifhp</b>.</p>
              </dd>

              <dt>model=MODEL</dt>

              <dd>
                <p>The <var class="LITERAL">model</var> option
                selects the portion of the <b class=
                "APPLICATION">ifhp</b> configuration that will set
                values of configuration parameters. This is
                discussed in detail in the next section.</p>
              </dd>

              <dt>trace</dt>

              <dd>
                <p>As <b class="APPLICATION">ifhp</b> processes the
                print job, it produces tracing and error message
                information. By default this is written to the
                status file specified by the <var class=
                "OPTION">-s</var> command line option. The <var
                class="LITERAL">trace</var> option will cause this
                information to be written to <acronym class=
                "ACRONYM">STDERR</acronym> (file descriptor 2).
                This is usually used in debugging.</p>
              </dd>

              <dt>debug=n</dt>

              <dd>
                <p>This option sets the debugging level to <var
                class="LITERAL">n</var>, where <span class=
                "emphasis"><i class="EMPHASIS">n</i></span> is an
                integer number. Level 0 turns debugging off, level
                1 produces a small amount of verbosity and
                increasing levels produce more verbose
                information.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="STATUSFILE">5.3. Status
          Messages</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">statusfile=</var><span class=
              "emphasis"><i class=
              "EMPHASIS">statusfile</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">statusfile_max=</var><span
              class="emphasis"><i class="EMPHASIS">maximum status
              file size</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">statusfile_min=</var><span
              class="emphasis"><i class="EMPHASIS">minimum status
              file size</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">summaryfile=</var><span
              class="emphasis"><i class="EMPHASIS">one line summary
              file</i></span></p>
            </li>
          </ul>

          <div class="VARIABLELIST">
            <dl>
              <dt>statusfile=pathname or -s pathname</dt>

              <dd>
                <p>The status file pathname is set by the command
                line <var class="OPTION">-s pathname</var>, or if
                it is not present then the <var class=
                "LITERAL">statusfile=pathname</var> configuration
                option. The file must exist and will not be
                created.</p>
              </dd>

              <dt>statusfile_max=n</dt>

              <dd>
                <p>If the status file is larger than <var class=
                "SYMBOL">statusfile_max</var> K bytes (default 8K),
                then it is truncated to <var class=
                "LITERAL">statusfile_min=min</var> K bytes.</p>
              </dd>

              <dt>statusfile_min=n</dt>

              <dd>
                <p>The minimum size in Kbytes of the status file
                after truncation (default 1K).</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="STATUS">5.4. Printer Status
          Available - status</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">status</var> FLAG <span
              class="emphasis"><i class="EMPHASIS">status available
              from device</i></span></p>
            </li>
          </ul>

          <p>The <var class="LITERAL">status</var> option indicates
          that there is a bidirectional connection to the printer,
          and that status can be obtained from the connection.
          During initialization the <b class="APPLICATION">ifhp</b>
          filter will test the printer connection and determine if
          it supports reading. If it does not then <b class=
          "APPLICATION">ifhp</b> will set <var class=
          "LITERAL">status@</var>.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2507">5.5. Monitoring
          Options - sync, waitend, pagecount</a></h2>

          <p>The <var class="LITERAL">sync</var>, <var class=
          "LITERAL">waitend</var>, and <var class=
          "LITERAL">pagecount</var> options are ignored if no
          status is available from the printer. The <var class=
          "LITERAL">sync</var> option specifies the method to use
          to determine if the printer is ready and operational. The
          <var class="LITERAL">waitend</var> option specifies the
          method used to determine when a print job is finished.
          The <var class="LITERAL">pagecount</var> option specifies
          the method used to obtain pagecount or status
          information.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>sync@, waitend@, pagecount@</dt>

              <dd>
                <p>This form of the tag indicates that the
                particular facility is disabled.</p>
              </dd>

              <dt>sync=pjl</dt>

              <dd>
                <p>PJL is used to determine if the printer is
                ready. This can be done by sending a PJL JOB or PJL
                ECHO command to the printer and waiting for return
                status.</p>
              </dd>

              <dt>sync=ps</dt>

              <dd>
                <p>A small PostScript job which causes a status
                report to be returned is sent to the printer.</p>
              </dd>

              <dt>waitend=pjl, waitend=ps</dt>

              <dd>
                <p>This is similar to the <var class=
                "LITERAL">sync</var> operation, but is done at the
                end of a job in order to determine if the printer
                is busy.</p>
              </dd>

              <dt>pagecount=pjl</dt>

              <dd>
                <p>Many PJL capable printers support reporting
                total page usage by means of PJL. This option
                causes a PJL command to be sent requesting the
                total page usage by the printer.</p>
              </dd>

              <dt>pagecount=ps</dt>

              <dd>
                <p>A small PostScript job which causes a status
                report to be returned is sent to the printer.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2542">5.6. User -Z Option
          Support</a></h2>

          <p>The <b class="APPLICATION">ifhp</b> filter provides a
          simple way for users to request a particular printer
          facility or option. The <var class="LITERAL">lpr
          -Zkey=value</var> command causes the <b class=
          "APPLICATION">lpd</b> print spooler to pass the <var
          class="OPTION">-Z</var> options on the <b class=
          "APPLICATION">ifhp</b> command line.</p>

          <p>The <b class="APPLICATION">ifhp</b> filter implements
          these options by first determining if they are allowed,
          and then using them to select a set of strings that are
          sent to the printer. Since some options are implement by
          sending PJL strings to the printer, some by PostScript,
          and some by PCL commands, the method of specifying and
          generating them is a bit involved.</p>

          <p>The following facility is used to control the names
          and types of user options.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>pjl_user_opts=[ ... ]</dt>

              <dd>
                <p>This tag specifies the list of user options that
                are implemented by sending PJL strings to the
                printer. This is available only if the printer is
                PJL capable.</p>
              </dd>

              <dt>pcl_user_opts=[ ... ]</dt>

              <dd>
                <p>This tag specifies the list of user options that
                are implemented by sending PCL strings to the
                printer. This is available only if the printer is
                PCL capable.</p>
              </dd>

              <dt>ps_user_opts=[ ... ]</dt>

              <dd>
                <p>This tag specifies the list of user options that
                are implemented by sending PostScript strings to
                the printer. This is available only if the printer
                is PostScript capable.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>

          <p>For each option, the actual string or set of strings
          is specified as follows.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>pjl_<span class="emphasis"><i class=
              "EMPHASIS">key</i></span>= ...</dt>

              <dd>
                <p>The value of the PJL user option <var class=
                "LITERAL">key</var>. This value can be one or more
                lines; the lines are checked for correct PJL format
                and sent to the printer before any language
                specific information.</p>
              </dd>

              <dt>ps_<span class="emphasis"><i class=
              "EMPHASIS">key</i></span>= ...</dt>

              <dd>
                <p>The value of the PostScript user option <var
                class="LITERAL">key</var>. This value can be one or
                more lines; leading and trailing whitespace is
                removed and the lines are placed before the first
                lines of a PostScript job file.</p>
              </dd>

              <dt>pcl_<span class="emphasis"><i class=
              "EMPHASIS">key</i></span>= ...</dt>

              <dd>
                <p>The value of the PCL user option <var class=
                "LITERAL">key</var>. This value can be one or more
                lines; whitespace and new lines are removed and the
                characters are placed before the first characters
                of a PCL job file.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>

          <p>The following user options are predefined in the
          default <tt class="FILENAME">ifhp.conf</tt> file and are
          recommended for use.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>a3, a4, a5</dt>

              <dd>
                <p>Use a3, a4, or a5 paper</p>
              </dd>

              <dt>copies=N</dt>

              <dd>
                <p>Print N copies of a page or job</p>
              </dd>

              <dt>duplex</dt>

              <dd>
                <p>Use duplex printing, tumble on. Pages will come
                out so that the margins are at opposite ends of a
                page.</p>
              </dd>

              <dt>duplexshort</dt>

              <dd>
                <p>Use duplex printing, tumble off. Pages will come
                out so that the margins are at the same ends of a
                page.</p>
              </dd>

              <dt>envelope</dt>

              <dd>
                <p>Select envelope media</p>
              </dd>

              <dt>inlower</dt>

              <dd>
                <p>Select media from lower input bin.</p>
              </dd>

              <dt>inupper</dt>

              <dd>
                <p>Select media from upper input bin.</p>
              </dd>

              <dt>landscape</dt>

              <dd>
                <p>Use Landscape orientation</p>
              </dd>

              <dt>lduplex</dt>

              <dd>
                <p>Alias for duplex</p>
              </dd>

              <dt>ledger</dt>

              <dd>
                <p>Select ledger size (11x15 inches) media</p>
              </dd>

              <dt>legal</dt>

              <dd>
                <p>Select legal size (8.5x15 inches) media</p>
              </dd>

              <dt>letter</dt>

              <dd>
                <p>Select letter size (8.5x11 inches) media</p>
              </dd>

              <dt>manual</dt>

              <dd>
                <p>Select media from manual feed</p>
              </dd>

              <dt>mediaselect=N</dt>

              <dd>
                <p>Select media number N</p>
              </dd>

              <dt>outlower</dt>

              <dd>
                <p>Put output in lower tray or bin</p>
              </dd>

              <dt>outupper</dt>

              <dd>
                <p>Put output in upper tray or bin</p>
              </dd>

              <dt>oversize</dt>

              <dd>
                <p>Select oversize media</p>
              </dd>

              <dt>portrait</dt>

              <dd>
                <p>Use Portrait orientation</p>
              </dd>

              <dt>sduplex</dt>

              <dd>
                <p>Alias for duplexshort. Print on a single side of
                the media.</p>
              </dd>

              <dt>simplex</dt>

              <dd>
                <p>Print on the single side of the media.</p>
              </dd>

              <dt>transparency</dt>

              <dd>
                <p>Select transparency media</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2673">5.7. Adding User
          Options</a></h2>

          <p>The following shows how to add a PJL option to an <tt
          class="FILENAME">ifhp.conf</tt> file. By convention, the
          configuration is added to the end of the <tt class=
          "FILENAME">ifhp.conf</tt> file.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2678"></a>
<pre class="SCREEN">
    [ newprinter ]
    pjl_user_opts += [ screen ]
    pjl_screen = PJL SCREEN = ON
    
    ps_user_opts += [ fuzzy ]
    ps_fuzzy = &lt;&lt;/Fuzzy (\%s{fuzzy})&gt;&gt; setpagedevice
</pre>
          </div>
          <br>
          <br>

          <p>In the first example we define the <var class=
          "LITERAL">screen</var> option. The <tt class=
          "COMMAND">lpr -Zscreen</tt> option will cause the PJL
          command <var class="LITERAL">PJL SCREEN = ON</var> to be
          put into the output to the printer.</p>

          <p>Similarly, <var class="LITERAL">lpr -Zfuzzy=5</var>
          will cause the PostScript command <var class=
          "LITERAL">&lt;&lt;/Fuzzy (\%s{fuzzy})&gt;&gt;
          setpagedevice</var> to be processed and the resulting
          <var class="LITERAL">&lt;&lt;/Fuzzy (5)&gt;&gt;
          setpagedevice</var> command to be sent to the
          printer.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2688">5.8. Initialization
          and Setup Control</a></h2>

          <p>Several options are used during the processing steps
          discussed in <a href="#DETAILS">Filter Operation
          Details</a> to control what setup is done for the
          printer.</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>pjl_init = [ ... ]</dt>

              <dd>
                <p>If PJL is enabled on this printer, options in
                this list are expanded and the resulting values are
                sent to the printer. After this, the -Z options are
                expanded and any options which are listed in the
                <var class="SYMBOL">pjl_user_opts</var> are
                processed.</p>
              </dd>

              <dt>ps_init = [ ... ]</dt>

              <dd>
                <p>If PostScript is enabled on this printer and a
                PostScript file is being processed, then the
                options in this list are expanded and the resulting
                values are sent to the printer. After this, the -Z
                options are expanded and any options which are
                listed in the <var class=
                "SYMBOL">ps_user_opts</var> are processed.</p>
              </dd>

              <dt>pcl_init = [ ... ]</dt>

              <dd>
                <p>If PCL is enabled on this printer and a PCL file
                is being processed, then the options in this list
                are expanded and the resulting values are sent to
                the printer. After this, the -Z options are
                expanded and any options which are listed in the
                <var class="SYMBOL">pcl_user_opts</var> are
                processed.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>

          <p>These initialization options are very useful in order
          to set up information controlling the default format or
          options for a print job. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2709"></a>
<pre class="SCREEN">
    pcl_init = [ normalpage ]
    pcl_normalpage=[ letter crlf linewrap
      portrait clearmargins fixed pitch=10 courier ]
</pre>
          </div>
          <br>
          <br>

          <p>When processing a PCL job, <var class=
          "LITERAL">normalpage</var> is expanded by searching first
          for <var class="LITERAL">normalpage</var> and then for
          <var class="SYMBOL">pcl_normalpage</var>; this in turn
          results in the expansion of the list of values. For
          example, <var class="SYMBOL">pcl_crlf</var> is usually
          defined as <var class=
          "LITERAL">pcl_crlf=\033&amp;k2G</var>, which is the PCL
          command to translate a New Line (<var class=
          "LITERAL">\015</var>) character as a Carriage Return/New
          Line. The other entries have similar definitions that
          produce the desired effects.</p>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN2718"></a>Chapter 6. Configuration
        File</h1>

        <p>This section will cover the <tt class=
        "FILENAME">ifhp.conf</tt> file and the various options and
        configuration methods used to control the operation of the
        <b class="APPLICATION">ifhp</b> filter.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2723">6.1. Configuration
          File Entries</a></h2>

          <p>The <b class="APPLICATION">ifhp</b> filter uses a
          simple text based configuration file, usually <tt class=
          "FILENAME">/usr/local/etc/ifhp.conf</tt> or <tt class=
          "FILENAME">/etc/ifhp.conf</tt> to get a set of
          configuration values which control its operation. The
          following sample configuration file segment shows how
          information is specified.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2729"></a>
<pre class="SCREEN">
    # comment line - first non-blank character is a #
    #---- DEFAULTS ----
    # we first have the default section
    #   - a flag option whose value is 1
    on_flag
    #   - a flag option whose value is 0
    off_flag@
    #   - a flag option whose value is a string (single line)
    #     its value will be 'this is a string'
    strval = this is a string
    #   - a flag option whose value is multiple lines
    #     each additional line starts with whitespace
    #     value is 'this\nis1\na\nstring'
    longstrval = this
     is\061
     a
     string
    #   - and a list that gets expanded -
    #     '[ this ] [ is a\nlist ]' -&gt; [ this is a list ]
    longlist = [ this ] [ is a
     list ]
    #    we can extend a string.
    #    strval will  now be 'this is a string added'
    strval += added
    #    and we can expand a list
    #     '[ this ] [ is a\nlist ] [ more ]' -&gt; [ this is a list more ]
    longlist += [ more ]
    
    # a printer specific section
    # ---- PRINTER ----
    [ hp hp4* ]
    # this match model=hp, model=hp4, model=hp4x
    # override the default
    onflag@
    include /usr/local/etc/ifhp.conf.local
    
    [ entry1 ]
    value
    [ entry2 ]
    tc=entry1
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2731">6.2.
          Comments</a></h2>

          <p>Comments are lines whose first non-whitespace
          character is <var class="LITERAL">#</var>. Use <var
          class="LITERAL">\#</var> if the first non-whitespace
          character must be <span class="emphasis"><i class=
          "EMPHASIS">#</i></span>.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2737">6.3. Option
          Setting</a></h2>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2740"></a>
<pre class="SCREEN">
    Syntax             Equivalent To
    option                     option=1
    option@                    option=0
    option=val
    option=[ v1 v2  ... ]      value contains all whitespace
    option=[ v1                up to the next option entry
     v2                        blank lines and comments
     v3                        are not included
     ]
    option=v1
     v2
     v3
</pre>
          </div>
          <br>
          <br>

          <p>If an option's default value is the empty string (<var
          class="LITERAL">''</var>). The <b class=
          "APPLICATION">ifhp</b> program uses the Perl language
          convention that this value is equivalent to 0 when used
          in a numerical context or the empty string when used in a
          string context.</p>

          <p>In general when a string is used in an integer context
          it is converted to a the appropriate numerical type using
          the standard Perl/C numerical representation and
          conversion methods.</p>

          <p>The <var class="LITERAL">flag</var> syntax sets the
          value of <span class="emphasis"><i class=
          "EMPHASIS">flag</i></span> to the string <var class=
          "LITERAL">'1'</var>, that is, the string with a 1 value,
          and <var class="LITERAL">flag@</var> sets it to <var
          class="LITERAL">'0'</var>.</p>

          <p>The <var class="LITERAL">option = value</var> syntax
          sets the option value to a string. The string can extend
          across multiple lines. A line starting with a space has
          its value appended to the previous option with a new line
          (<var class="LITERAL">\n</var>) separator.</p>

          <p>As shown in the example, the <var class=
          "LITERAL">+=</var> operator is used to append to a string
          value. The <var class="LITERAL">[ option option
          ...]</var> syntax is used to specify that the value is a
          list. Lists are used to specify a list of options which
          can be flags or string values. Lists have the property of
          <span class="emphasis"><i class="EMPHASIS">recursive
          evaluation</i></span> which means that the individual
          list items will be further processed during printing.
          This is discussed later in detail.</p>

          <p>The <var class="LITERAL">include</var> facility is
          currently deprecated, and may not be implemented in
          future releases. It will cause the specified file to be
          read and processed at that point in the configuration
          file.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2761">6.4. Option
          Use</a></h2>

          <p>Options and their values are used to control printer
          operation. There are two types of options: those with a
          predefined or <span class="emphasis"><i class=
          "EMPHASIS">builtin</i></span> meaning to the <b class=
          "APPLICATION">ifhp</b> filter and those which have their
          values sent to the printer when appropriate. The builtin
          options are listed and their use is explained in later
          sections.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2766">6.5. List
          Expansion</a></h2>

          <p>The <b class="APPLICATION">ifhp</b> filter configures
          a printer by sending the values of options to the printer
          or performing built-in operations. An option can have a
          flag, string, or list value.</p>

          <p>A LIST value has the form <var class="LITERAL">[ v1 v2
          ... ]</var>. When a list value is to be sent to the
          printer each of <var class="LITERAL">v1</var>, <span
          class="emphasis"><i class="EMPHASIS">v2</i></span>, etc.
          is expanded in turn and the corresponding string value or
          builtin action is carried out. If the string value of a
          term is itself a list, the list will be expanded in turn.
          Recursive list evaluation will result in an error. The
          following is an example of list expansion:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2774"></a>
<pre class="SCREEN">
    t1=[ p1 p2 ]
    p1=this is
    p2=[ p3 p4 ]
    p3=a
    p4=test
</pre>
          </div>
          <br>
          <br>

          <p>The option <var class="LITERAL">t1</var> is expanded
          by expanding <span class="emphasis"><i class=
          "EMPHASIS">p1</i></span> and then <span class=
          "emphasis"><i class="EMPHASIS">p2</i></span>; The
          expansion of <var class="LITERAL">p1</var> produces <var
          class="LITERAL">"this is"</var>, and <var class=
          "LITERAL">p2</var> produces <var class="LITERAL">[p3
          p4]</var>. This list is then expanded to produce <var
          class="LITERAL">"a"</var> and <var class=
          "LITERAL">"test"</var>.</p>

          <p>Some LIST options are used in printer language
          specific contexts and their values are processed
          appropriately. For example, pjl_init=[...] specifies a
          set of initialization operations for PJL printers, and
          pcl_init=[...] is used to specify the initialization
          needed for PCL printing. The expansion of the LIST
          entries is done in the language specific context. For PJL
          this requires that the output be well formed PJL
          commands, and for PCL that all whitespace be removed.</p>

          <p>The context dependent expansion is required because
          sometimes it is necessary to do operations both using PJL
          and PCL or PJL and PS combinations to ensure correct
          printer operation. During expansion the language name and
          an underscore is prefixed to the list entry name and this
          is used as the option name during expansion. If the
          prefixed name is not found then the unprefixed name will
          be used. For example, suppose that we have:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2788"></a>
<pre class="SCREEN">
    pjl_init=[ initstr test ]
    pcl_init=[ initstr ]
    pjl_initstr=@PJL ECHO YES
    pcl_initstr=\033(*0V
    test=DONE
</pre>
          </div>
          <br>
          <br>

          <p>When PJL initialization is being done and we want
          string values for the <var class="SYMBOL">pjl_init</var>
          LIST, we expand <var class="LITERAL">initstr</var> and
          <var class="LITERAL">test</var> in the <var class=
          "SYMBOL">pjl_</var> context. First a defined <var class=
          "SYMBOL">pjl_initstr</var> value will be looked for and
          then a defined <var class="LITERAL">initstr</var> value.
          Since there is a value of <var class=
          "SYMBOL">pjl_initstr</var> it will be used.</p>

          <p>Similarly we will check for <var class=
          "SYMBOL">pjl_test</var> and <var class=
          "LITERAL">test</var> values. Since <var class=
          "SYMBOL">pjl_test</var> does not have a defined value the
          <var class="LITERAL">test</var> value <acronym class=
          "ACRONYM">DONE</acronym> will be used.</p>

          <p>When PCL initialization is being done and we want
          string values for the <var class="SYMBOL">pcl_init</var>
          LIST, then we expand <var class="LITERAL">initstr</var>
          in a similar way, resulting in <var class=
          "LITERAL">\033(*0V</var>.</p>

          <p>We can use the list entry <var class="LITERAL">[
          option=value ]</var> to temporarily specify the value of
          a variable which is then used during language specific
          expansion. For example, suppose that we have the
          following set of definitions:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2810"></a>
<pre class="SCREEN">
    pjl_init=[ initstr=testing ]
    pjl_initstr=@PJL INIT=\%s%lcub;initstr%rcub;XQ
</pre>
          </div>
          <br>
          <br>

          <p>As discussed in the next section, the <var class=
          "LITERAL">\%s%lcub;initstr%rcub;</var> will cause the
          value for the <span class="emphasis"><i class=
          "EMPHASIS">initstr</i></span> value to be substituted
          into the <var class="SYMBOL">pjl_initstr</var> string.
          How this is done is discussed in the section on <a href=
          "#STRINGESCAPE">String Escape Sequences</a>.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="STRINGESCAPE">6.6. String
          Escape Sequences</a></h2>

          <p>String values have a syntax similar to PERL or C. The
          <var class="LITERAL">\</var> (escape) character indicates
          the start of an escape sequence string. This has the
          syntax:</p>

          <div class="VARIABLELIST">
            <dl>
              <dt>Standard Character Replacement</dt>

              <dd>
                <p><var class="LITERAL">\f</var>, <var class=
                "LITERAL">\r</var>, <var class="LITERAL">\n</var>,
                and <var class="LITERAL">\t</var> are replaced in
                turn by the ASCII characters FF, CR, NL, and HT
                whose values are 014, 015, 012, and 011
                respectively.</p>
              </dd>

              <dt>Octal Character Replacement</dt>

              <dd>
                <p><var class="LITERAL">\nnn</var>, where nnn is 3
                octal digits, is replaced by the corresponding
                character with the specified value.</p>
              </dd>

              <dt>Option Value Replacement</dt>

              <dd>
                <p><var class="LITERAL">\%format{option} OR
                \%format[option]</var></p>

                <p>The value of the option will be determined and
                replaced by a formatted string. The option value is
                determined by the following algorithm.</p>

                <ol type="1">
                  <li>
                    <p>When expanding a list value, the <var class=
                    "LITERAL">option=word</var> will push the <var
                    class="LITERAL">option=word</var> combination
                    onto an evaluation stack, and then the <var
                    class="LITERAL">option</var> value is expanded
                    in the current language context.</p>
                  </li>

                  <li>
                    <p>When starting a search for <var class=
                    "LITERAL">{option}</var> in a language context
                    <var class="SYMBOL">lang_</var>, the stack of
                    list values is searched in oldest to newest
                    order for a match for <var class=
                    "SYMBOL">lang_option</var> and then for <var
                    class="LITERAL">option</var>. The first one
                    found is used as the option value.</p>
                  </li>

                  <li>
                    <p>After searching the evaluation stack for
                    <var class="LITERAL">{option}</var> and finding
                    no match, the <var class="OPTION">-Z</var>
                    command line option values are searched for a
                    matching entry.</p>
                  </li>

                  <li>
                    <p>If none is found, then the <var class=
                    "OPTION">-T</var> command line option values
                    and next the printer configuration will then be
                    searched for <var class=
                    "SYMBOL">lang_option</var> and then for <var
                    class="LITERAL">option</var>. If no match is
                    found, then the empty string will be the result
                    if a string is wanted, or the value 0 if a
                    number is wanted.</p>
                  </li>

                  <li>
                    <p>If the result of this lookup is a list, then
                    the list will be expanded in turn, and the
                    concatenating values of the expansion will be
                    used.</p>
                  </li>

                  <li>
                    <p>When starting a search for <var class=
                    "LITERAL">[option]</var> the <var class=
                    "OPTION">-T</var> command line options will be
                    searched first and next the printer
                    configuration will be searched for <var class=
                    "SYMBOL">lang_option</var> and then for <var
                    class="LITERAL">option</var>. If no match is
                    found, then the empty string will be the result
                    if a string is wanted, or the value 0 if a
                    number is wanted.</p>
                  </li>

                  <li>
                    <p>***help*** If the result of this lookup is a
                    list If no match was found, then the search
                    rules for <var class="LITERAL">{option}</var>
                    will be used, and the list expansion will be
                    done as described above. If no match was found
                    a null (empty string) value will be used.</p>
                  </li>
                </ol>
                <br>
                <br>
              </dd>

              <dt>Option Value Format</dt>

              <dd>
                <div class="INFORMALEXAMPLE">
                  <a name="AEN2877"></a>
<pre class="SCREEN">
       %[-][0][length[.precision]][format]
       %d{1}   =&gt;  '1'       %s{1}   =&gt; '1'
       %3d{1}  =&gt;  '  1'     %3s{1}  =&gt; '  1'
       %03d{1} =&gt;  '0001'    %-3s{1} =&gt; '1  '
       %4.2f{1} =&gt; '1.00'
     Special Case Conversion:
       %s{ThisWord} =&gt; 'ThisWord'
       %U{ThisWord} =&gt; 'THISWORD'
       %M{ThisWord} =&gt; 'Thisword'
       %L{ThisWord} =&gt; 'thisword'
</pre>
                </div>
                The format specifies how the value is to appear,
                and is similar to the printf format usage.<br>
                <br>

                <p>Depending on the format type, a value will be
                converted and used appropriately. The empty string
                or null value (<var class="LITERAL">''</var>) will
                be treated as a <span class="emphasis"><i class=
                "EMPHASIS">'0'</i></span> value when used in an
                numeric context.</p>

                <p>The default format is %d, ie, \%{val} would be
                \%d{val}. The numerical formats supported are: %d,
                %o, %x, %X, %e, %f, and %g; The %s format use the
                string value of the result.</p>

                <p>The <var class="LITERAL">U</var>, <var class=
                "LITERAL">M</var>, and <var class="LITERAL">L</var>
                have the same behavior as the <var class=
                "LITERAL">s</var> format, but the string value is
                then uppercased, lowercased and the first letter
                uppercased, and lowercased respectively. This
                allows various programs that have fussy requirement
                about the case of their options to be handled
                correctly.</p>
              </dd>
            </dl>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2888">6.7. Language Context
          and Value Expansion</a></h2>

          <p>The <b class="APPLICATION">ifhp</b> filter sends
          initialization and configuration commands to the printer.
          Depending on the type of language of a print file (i.e. -
          PostScript or PCL), different command formats would need
          to be used to implement different options. For example,
          to implement a <span class="emphasis"><i class=
          "EMPHASIS">landscape</i></span> option for a PJL aware
          printer you would need to send the PJL command <var
          class="LITERAL">@PJL SET ORIENTATION=LANDSCAPE</var>. For
          a PostScript printer you would need to send a very
          strange string which would depend on the actual printer
          mode.</p>

          <p>Our language context also includes various checks for
          language specific dependencies. This section refers to
          material that is discussed in depth in later sections of
          this document, and on first reading may be a little
          confusing. However, if you are not aware of some of these
          restrictions then much of the information in the
          configuration files may be very confusing.</p>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="AEN2895">6.7.1. PJL
            Language</a></h3>

            <p>A PJL command has the form <var class="LITERAL">@PJL
            OPCODE ...</var>, and PJL commands must be sent as a
            block before any other commands. In order to assist
            with this, the <b class="APPLICATION">ifhp</b> filter
            provides the following assistance. When expanding a
            list value, each list entry is expected to form a well
            formatted PJL command.</p>

            <ol type="1">
              <li>
                <p>Before sending any PJL command to the printer,
                the PJL Universal Exit Command (<var class=
                "LITERAL">\033%-12345X</var>) string is sent to the
                printer. This is automatically done if <var class=
                "LITERAL">pjl</var> is enabled for the printer.</p>
              </li>

              <li>
                <p>The list item is expanded, and all value
                substitutions are done. Leading and trailing
                whitespace is removed, all characters are converted
                to uppercase, and a new line (<var class=
                "LITERAL">\n</var>) value is appended to the
                command.</p>
              </li>

              <li>
                <p>Because not all printers support all PJL
                commands, the <b class="APPLICATION">ifhp</b>
                filter performs uses the <var class=
                "SYMBOL">pjl_only</var> and <var class=
                "SYMBOL">pjl_except</var> configuration lists to
                ensure that the options are allowed by the printer.
                The OPCODE must appear in the <var class=
                "SYMBOL">pjl_only</var> list and not in the <var
                class="SYMBOL">pjl_except</var> list. For
                example:</p>

                <div class="INFORMALEXAMPLE">
                  <a name="AEN2915"></a>
<pre class="SCREEN">
    pjl_only = [ JOB SET STATUS ]
    pjl_except = [ STATUS ]
</pre>
                </div>
                &#13;<br>
                <br>

                <p>The <var class="SYMBOL">pjl_only</var> indicates
                that the printer supports the PJL JOB, SET, and
                STATUS commands, but the <var class=
                "SYMBOL">pjl_except</var> list removes the STATUS
                from this list. This means that only the JOB and
                SET commands will be allowed.</p>
              </li>

              <li>
                <p>If the command is a <acronym class=
                "ACRONYM">SET</acronym> command, then the PJL
                variable must appear in the <var class=
                "SYMBOL">pjl_vars_set</var> list and not in the
                <var class="SYMBOL">pjl_vars_except</var> list.</p>

                <div class="INFORMALEXAMPLE">
                  <a name="AEN2925"></a>
<pre class="SCREEN">
    pjl_vars_set = [ PAPER SIZE ORIENTATION ]
    pjl_vars_except = [ PAPER ]
    
    @PJL SET SIZE=A4
    @PJL SET PAPER=LETTER
</pre>
                </div>
                &#13;<br>
                <br>

                <p>In the above example, the <var class=
                "LITERAL">SIZE=A4</var> command would be allowed
                and sent while the <var class=
                "LITERAL">PAPER=LETTER</var> command would be
                rejected and not sent.</p>
              </li>
            </ol>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="AEN2930">6.7.2. PCL
            Language</a></h3>

            <p>When sending PCL initialization strings to a
            printer, it is essential to send nothing that could
            cause a printable character to be sent before the
            actual file contents. Such output could cause the
            location and positioning of text to be altered in
            unexpected ways. To avoid this, the following steps are
            taken when expanding a list in a PCL language
            context.</p>

            <ol type="1">
              <li>
                <p>Before any PCL string is sent to the printer,
                the PCL End of Job (<var class=
                "LITERAL">\033E</var>) string is sent to the
                printer.</p>
              </li>

              <li>
                <p>All whitespace (blanks, tabs, etc) are removed
                from the string value.</p>
              </li>

              <li>
                <p>Next, all escaped values are substituted. At
                this point you can <span class="emphasis"><i class=
                "EMPHASIS">force</i></span> printable strings
                containing whitespace into the output by using the
                <var class="LITERAL">\nnn</var> escape
                mechanism.</p>
              </li>

              <li>
                <p>All list values are concatenated and then sent
                to the printer.</p>
              </li>
            </ol>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="AEN2945">6.7.3. PostScript
            Language</a></h3>

            <p>The PostScript language processing is very minimal,
            as there are few problems sending PostScript to a
            printer.</p>

            <ol type="1">
              <li>
                <p>Before sending any PostScript initialization
                strings, the PostScript End of Job indicator (<var
                class="LITERAL">\004</var> or Control-D) is
                sent.</p>
              </li>

              <li>
                <p>Strings are then expanded and the escape
                sequences are substituted.</p>
              </li>

              <li>
                <p>Individual strings have a newline (<var class=
                "LITERAL">\n</var>) appended to them before being
                sent to the printer.</p>
              </li>
            </ol>
            <br>
            <br>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2957">6.8. Printer
          Entries</a></h2>

          <p>The <tt class="FILENAME">ifhp.conf</tt> file is
          divided into printer entries by <var class="LITERAL">[
          pattern pattern ...]</var> lines. Each pattern is glob
          matched against the <var class="LITERAL">model</var>
          option value, and if the match is successful then the
          options on the following lines until the next printer
          entry header are appended to the specific printer
          configuration entry.</p>

          <p>By convention, each configuration file is assumed to
          start with the header <var class="LITERAL">[ default
          ]</var>, and the initial set of lines are used to set
          default values for the various <b class=
          "APPLICATION">ifhp</b> options.</p>

          <p>The algorithm for scanning the configuration files
          first sets the <var class="LITERAL">model</var> value to
          <span class="emphasis"><i class=
          "EMPHASIS">default</i></span>, and extracts the default
          information. It then sets the <var class=
          "LITERAL">model</var> value to the user specified value,
          and rescans the configuration file information.</p>

          <p>If users need to add or modify the <tt class=
          "FILENAME">ifhp.conf</tt> file, then they should add
          their entries to the end of the file, and override any
          default options by specific values in their new entry. To
          aid with system configuration and maintenance, the
          distributed <tt class="FILENAME">ifhp.conf</tt> file has
          the following text at the end of the file:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN2973"></a>
<pre class="SCREEN">
    ##### This is the end of the standard ifhp.conf file.
    ##### Add your local files after this
    ##### If you want to override some entries, simply change the names to
    ##### something different, i.e. hp4 hp4.old
    ##### Here is a script to do this and then append your local file to the
    ##### end of the ifhp.conf file:
    #####
    ##### #!/bin/sh
    ##### for i in $* ; do
    #####   perl -spi.bak -e 's/ $i / $i.orig /g' ifhp.conf
    ##### done
    #####
    ##### sed -n -e '1,/XXX END XXX/p' ifhp.conf &gt;ifhp.conf.new
    ##### sed '1,/XXX END XXX/d' ifhp.old &gt;&gt; ifhp.conf.new
    #####
    ##### You can probably improve on this.
    #####
    #### XXX END XXX #####
    
    # user adds new default values here for all printer entries
    [ default ]
    # set default value
    pcl_option= \033test
    
    [ mypcl_printer ]
    # override default value
    pcl_option=
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2975">6.9. Include
          Facility</a></h2>

          <p>The <var class="LITERAL">include filename</var>
          facility is similar to the standard compiler file
          inclusion facility. The specified file or list of files
          separated by commas or whitespace will be substituted for
          the indicated line.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2979">6.10. tc Entry
          Inclusion Facility</a></h2>

          <p>The <var class="LITERAL">tc=entry</var> facilty is
          similar to the printcap <var class="LITERAL">tc</var>
          facility used in the <b class="APPLICATION">LPRng</b>
          software other places. The specified entry or list of
          entries separated by commas or whitespace will be
          substituted for the indicated line.</p>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="DETAILS"></a>Chapter 7. Filter Operation
        Details&#13;</h1>

        <p>The <b class="APPLICATION">ifhp</b> filter operates by
        first reading a configuration file to determine the type of
        printer it is working with, and then proceeds to carry out
        operations requested by the values of option variables
        passed on the command line or found in the configuration
        files. In normal operation, input is read from <acronym
        class="ACRONYM">STDIN</acronym> (file descriptor 0) and
        results written to <acronym class=
        "ACRONYM">STDOUT</acronym> (file descriptor 1). Status
        reports are written to a status file or optionally to
        <acronym class="ACRONYM">STDERR</acronym> (file descriptor
        2), together with any error messages or diagnostics.</p>

        <p>In addition to normal operation the filter can run in
        the <acronym class="ACRONYM">OF</acronym> mode and act as a
        printer initializer and job terminator. This is discussed
        in detail in the <b class="APPLICATION">LPRng</b>
        documentation. When in the OF mode the two character
        sequence <var class="LITERAL">"\031\001"</var> to the
        filter. will cause the filter to suspend itself by sending
        itself a <acronym class="ACRONYM">SIGSUSP</acronym> signal.
        The print spooler will detect this and then send job files
        to the same output device. After the files have been
        transferred the the filter will be restarted with a SIGCONT
        signal.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN2997">7.1. Filter
          Pseudo-Code</a></h2>

          <p>The details of the filter operations are described in
          the following <span class="emphasis"><i class=
          "EMPHASIS">pseudo-code</i></span>. The sections marked
          with <var class="LITERAL">###</var> are discussed later
          in this document in detail.</p>

          <p><tt class="FILENAME">///</tt> See: <a href=
          "#SETUP">Options, Initialization and Setup</a></p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3005"></a>
<pre class="SCREEN">
    ###+++ Initialization and Setup
    // get ifhp information from PRINTCAP_ENTRY environment variable
    if( PRINTCAP_ENTRY environment variable has a value ){
        split printcap information into printcap fields
        if( :ifhp=options,options is present in printcap ){
            split the options list and place in the Toptions list
        }
    }
    Add the -T command line options to the Toptions list
    Add the -Z command line options to the Zoptions list
    foreach option in -Toptions do
        if( option = "debug=level" ){
            set Debuglevel = level;
        }
        if( option = "trace" ){
            output error and trace on STDERR
        }
        if( option = "config=pathlist" ){
            set configuration pathlist = pathlist;
        }
        if( option = "model=name" and model not set ){
            set model = name;
        }
    }
    Read the configuration files from the config file list
    Prepend each file with a [ default ] header
    
    Scan the configuration files for [ default ] entries;
      later entry values will override earlier ones.
    
    Repeat the scan, but this time search for [ model ] entries
      matching the specified model.
    
    Put the command line options and -T options into configuration
      information, effectively overriding the information from the
      configuration files.
    
    if( appsocket ) {
       Get the :lp=... entry from the PRINTCAP_ENTRY environment variable
       if( no information ) {
           use the getpeername() to get the TCP/IP address of the current
           connection.
       }
       if( no informtion AND no dev=... parameter ) {
           error!
       }
       close connection to printer and set -Tdev= device or IP Address
    }
    
    // open a connection to the printer if required
    // usually only done when appsocket protocol is used
    if( device specified using -Tdev=device ){
        close(1)
        // if device is host%port, we open TCP/IP connection
        fd = open(device);
        // Note - status  opens RW
        //        status@ opens WO
        dup fd to 1; close fd;
    }
    
    ###---
</pre>
          </div>
          <tt class="FILENAME">///</tt> See: <a href=
          "#SYNCPAGE">Synchronization and Pagecount</a> 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3009"></a>
<pre class="SCREEN">
    ###+++ Synchronization and Pagecount
    if( status returned by printer and sync requested ){
        do{
            send command and wait for timeout;
        } while( no response );
        if( appsocket ){
            close and reopen TCP/IP connection;
        }
    }
    
    
    if( status and pagecount requested ){
        // pagecount has the form pagecount@ (none),
        //   pagecount=ps, pagecount=pjl, ...
        if( pagecount=language has value ) do {
            if( pagecount TRUE ){
                set pagecount= pjl or ps depending on availability
            }
            if( pagecount = pjl and PJL INFO available ){
               send PJL INFO PAGECOUNT command to printer
            } else if( pagecount = ps ){
               send PS program to printer
            } else {
                terminate with error;
            }
        } while( no pagecount response );
        if( appsocket ){
            close and reopen TCP/IP connection;
        }
    }
    ###---
</pre>
          </div>
          <tt class="FILENAME">///</tt> See: <a href="#PJLINIT">PJL
          Initialization</a> 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3013"></a>
<pre class="SCREEN">
    ### PJL INITIALIZATION
    if( PJL enabled ){
        language = "pjl_"
        foreach option in pjl_init=[...] {
           expand the option using the language value
           #+++ PJL OPTION ACTIONS +++
           if( option in pjl_vars_set=[ ... ]
             and option not in pjl_vars_except
             expand "@PJL SET OPTION=\%{option}"
             output = expanded string value
           } else {
             if( option value is a string ){
               output = expanded string value;
             }
           }
           // output has the form @PJL COMMAND ....
           if( COMMAND is in pjl_only=[ ... ]
               and not in pjl_except=[ ... ] ){
               send output to printer
           }
           #--- end PJL OPTION ACTIONS
        }
        if( !OF_mode ){
             foreach option in -Toption=value {
                if( option in pjl_user_opts ){
                    #+++ USER PJL OPTIONS
                    // join 'pjl_' and the option name
                    expand 'pjl_' . option
                    // perform PJL actions as above
                        #+++ PJL OPTION ACTIONS +++
                        ....
                        #-- PJL OPTION ACTIONS +++
                    #--- USER PJL OPTIONS
                }
             }
             foreach option in -Zoption=value {
                if( option in pjl_user_opts ){
                    // perform USER PJL actions as above
                    #+++ USER PJL OPTIONS
                    #--- USER PJL OPTIONS
                }
             }
        }
    }
    
    ###--- PJL INITIALIZATION
</pre>
          </div>
          <tt class="FILENAME">///</tt> See: <a href=
          "#CONVERSION">File Conversion Support</a> 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3017"></a>
<pre class="SCREEN">
    // language is set to the type of job language
    // - PS, PCL, TEXT, RAW, UNKNOWN
    //  the first part of the job file is read and the filter takes
    //  a (wimpy) guess at the job file based only on the first couple
    //  of characters;  language is  be PJL, PS, or TEXT, or RAW
    //  This is the same algorithm as the UNIX FILE utility
    
    language = default_language (from configuration);
    if( command line -c (binary) option present ){
        language = RAW;
    } else if( -Zlanguage=xxx option present ){
        language=xxx
    } else if( forceconversion set ){
        use UNIX file utility to get file type
    } else if( file is PS file ){
        language=PS
        if( file starts with PS EOJ (CTRL-D)
            and ps_eoj_at_start is clear ){
            remove the PS EOJ
        } else {
            send a PS EOJ first
        }
    } else if( file is PCL file ){
        language=PCL
        if( file starts with PCL EOJ (ESC E)
            and pcl_eoj_at_start is clear ){
            remove the PCL EOJ
        }
    }
    if( file conversion table specified then ){
        look up file type in conversion table;
        if( conversion program specified ){
            run input through conversion program
        }
        set file type to output type
    }
    
    
    if( language = TEXT and PCL allowed ){
        language = PCL;
    }
    
    if( language not recognized by printer ){
        exit with error;
    }
    
    if( PJL ENTER supported ){
        use PJL ENTER command to select language;
        send nullpad NULLS to force full buffer condition
    }
</pre>
          </div>
          <tt class="FILENAME">///</tt> See: <a href=
          "#LANGUAGEINIT">Language Specific Initialization</a> <a
          name="PCL-USER-OPTS"></a> <a name="PS-USER-OPTS"></a> 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3023"></a>
<pre class="SCREEN">
    // LANGUAGE SPECIFIC INITIALIZATIONS
    if( language = PCL ){
        foreach option in pcl_init {
            ###+++ expansion
            do expansion similar to PJL OPTION actions
                using "pcl_" prefix for option lookup;
            ###---
        }
        if( not in OF_MODE ){
            foreach option in -Toption do {
                if( option in pcl_user_vars=[ ... ] ){
                ###+++ expansion as above
                ###---
            }
            foreach option in -Zoption do {
                if( option in pcl_user_opts=[ ... ] ){
                ###+++ expansion as above
                ###---
            }
        }
        remove whitespace and expand string results;
    } else if( language = PS ){
        ###+++ language specific actions as above,
          using the ps_ prefix for lookup
          allow only user option in the ps_user_opts list
        expand string results but do not remove whitespace
    }
</pre>
          </div>
          <tt class="FILENAME">///</tt> See: <a href=
          "#FILETRANSFER">File Transfer and Error Status
          Monitoring</a> 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3027"></a>
<pre class="SCREEN">
    Transfer job to printer, reading error and other information
      back from the printer if enabled
    
    if( language = PCL ){
        send PCL End of Job
    } else if( language = PS ){
        send PS End of Job
    }
    
    
    // job termination
    
    ###+++ Synchronization and Pagecount as above
    finished = 0
    while( waitend and not finished ){
        // timeouts and retries are done here
        if( time taken is too long ){
            give up and report an error
        }
        if( waitend with PJL ){
            wait for end of job using UINFO;
        } else if( waitend with PS ){
            send PostScript echo program to printer
            if end_ctrl_t then add ^T
        }
        wait for response
        if( response has end of job indication ) {
            finished = 1;
        }
    }
    if( pagecount ){
        if( appsocket ){
            close and reopen connection;
        }
        get pagecount using previously described algorithm
    }
    
    ###---
    
    exit
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="SETUP">7.2. Options,
          Initialization and Setup</a></h2>

          <p>During the setup step, the <b class=
          "APPLICATION">ifhp</b> system will extract command line
          options and scan configuration files for printer entries.
          These operations are covered in detail in other
          sections.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="LANGUAGES">7.3. Languages
          Supported- pjl, pcl, ps, and text</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">pjl</var> FLAG <span class=
              "emphasis"><i class="EMPHASIS">PJL
              Supported</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pcl</var> FLAG <span class=
              "emphasis"><i class="EMPHASIS">PCL
              Supported</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">ps</var> FLAG <span class=
              "emphasis"><i class="EMPHASIS">PostScript
              Supported</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">text</var> FLAG <span class=
              "emphasis"><i class="EMPHASIS">Text
              Supported</i></span></p>
            </li>
          </ul>

          <p>These flags set the languages that are recognized or
          processed by the filter.</p>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="PJL-JOB">7.3.1. pjl_job
            FLAG</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">pjl_job</var> FLAG <span
                class="emphasis"><i class="EMPHASIS">Send PJL Job
                and EOJ</i></span></p>
              </li>
            </ul>

            <p>If PJL is enabled and the <var class=
            "LITERAL">pjl_job</var> flag is SET a PJL JOB and PJL
            EOJ command will be generated and sent to the printer
            at the job start and end respectively. The <var class=
            "LITERAL">JOB</var> command has the form:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3063"></a>
<pre class="SCREEN">
    @PJL JOB NAME = "..." [ START = nnn ] [ END = mmm ]
</pre>
            </div>
            The START and END values can be specified by <var
            class="LITERAL">-Zstartpage=nnn</var> and <var class=
            "LITERAL">-Zendpage=mmm</var> command line options. The
            EOJ command has must match the JOB command. 

            <div class="INFORMALEXAMPLE">
              <a name="AEN3067"></a>
<pre class="SCREEN">
    @PJL EOJ NAME = "..." [ START = nnn ] [ END = nnn ]
</pre>
            </div>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="PJL-ENTER">7.3.2. pjl_enter
            FLAG</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">pjl_enter</var> FLAG <span
                class="emphasis"><i class="EMPHASIS">Send PJL
                ENTER</i></span></p>
              </li>
            </ul>

            <p>If PJL is enabled and the <var class=
            "LITERAL">pjl_enter</var> flag is SET, a PJL ENTER
            LANGUAGE = xx command will be generated when PCL or PS
            files are sent to the printer.</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3078"></a>
<pre class="SCREEN">
    @PJL ENTER LANGUAGE = PCL
    @PJL ENTER LANGUAGE = POSTSCRIPT
</pre>
            </div>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="REMOVE-PJL-AT-START">7.3.3.
            remove_pjl_at_start FLAG</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">remove_pjl_at_start</var>
                FLAG <span class="emphasis"><i class=
                "EMPHASIS">Remove PJL code from begining of
                job</i></span></p>
              </li>
            </ul>

            <p>Some printer drivers will prepend PJL code to the
            begining of print jobs. If the <var class=
            "LITERAL">remove_pjl_at_start</var> flag is SET, <b
            class="APPLICATION">ifhp</b> will remove this PJL
            code.</p>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="NULLPAD">7.3.4. nullpad
            STRING</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">nullpad=</var> ephasis/null
                character count/</p>
              </li>
            </ul>

            <p>Some older model HP printers require receiving a
            large number of NULL (0) characters to force commands
            in the input buffer to be read. This can be done using
            the <var class="LITERAL">nullpad</var> option. In
            practice, this has turned out to be largely irrelevant
            as most newer printers and network interface printers
            do not have this problem.</p>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="PJL-CONSOLE">7.3.5.
            pjl_console FLAG</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">pjl_console</var> FLAG
                <span class="emphasis"><i class="EMPHASIS">printer
                console messages</i></span></p>
              </li>
            </ul>

            <p>When this flag is set and PJL is available and the
            PJL <acronym class="ACRONYM">RDYMSG</acronym> command
            is supported, then a short message will be put on the
            console.</p>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="REMOVE-CTRL">7.3.6.
            remove_ctrl STRING</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">remove_ctrl=</var><span
                class="emphasis"><i class="EMPHASIS">remove control
                characters</i></span></p>
              </li>
            </ul>

            <p>The <var class="SYMBOL">remove_ctrl</var> string
            option species a list of (control) characters that will
            be removed from PostScript jobs. This solves the
            problem of jobs with embedded Control-T or Control-C
            characters causing abnormal printer operation. For
            example:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3116"></a>
<pre class="SCREEN">
    remove_ctrl=CT
</pre>
            </div>
            would cause Control-C and Control-T characters to be
            removed.<br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="TBCP">7.3.7. tbcp
            FLAG</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">tbcp</var> FLAG <span
                class="emphasis"><i class="EMPHASIS">Use TBCP
                protocol</i></span></p>
              </li>
            </ul>

            <p>The <var class="LITERAL">tbcp</var> flag can be
            specified as a user option as well as a configuration
            file option. If the file type is PostScript and this
            flag is set then the file is transferred using the
            Transparent Binary Communication Protocol. (See the
            Adobe PostScript Language Reference Manual for details
            on the protocol.)</p>

            <p>At the start of the PostScript job, the sequence
            <var class="LITERAL">\001</var> <span class=
            "emphasis"><i class="EMPHASIS">M</i></span> is sent.
            Afterwards, all control characters in the set <var
            class="LITERAL">0x01, 0x03, 0x04, 0x05, 0x11, 0x13,
            0x14, 0x1C,</var> are replaced by the two character
            sequence <var class="LITERAL">\001</var> <var class=
            "LITERAL">X+'@'</var> or <var class=
            "LITERAL">X+'\100'</var> or is sent. For example:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3134"></a>
<pre class="SCREEN">
    C\001\003   -&gt;  \001\115\103\001\101\001\103 or \001MC\001A\001C
</pre>
            </div>
            <br>
            <br>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="SYNCPAGE">7.4. Synchronization
          and Pagecounts</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">accounting=</var> <span
              class="emphasis"><i class="EMPHASIS">accounting
              program</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">accounting_info=</var> <span
              class="emphasis"><i class="EMPHASIS">accounting
              information</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pagecount</var> FLAG or
              Option <span class="emphasis"><i class=
              "EMPHASIS">pagecounter available</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pagecount_interval=</var>
              <span class="emphasis"><i class="EMPHASIS">get
              pagecounter interval</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pagecount_timeout=</var>
              <span class="emphasis"><i class="EMPHASIS">get
              pagecounter timeout</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pagecount_start=</var> <span
              class="emphasis"><i class="EMPHASIS">get pagecounter
              at job start</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pagecount_end=</var> <span
              class="emphasis"><i class="EMPHASIS">get pagecounter
              at job end</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pagecount_ps_code=</var>
              <span class="emphasis"><i class="EMPHASIS">PostScript
              to get pagecounter</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">sync</var> FLAG or Option
              <span class="emphasis"><i class="EMPHASIS">sync
              required</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">sync_interval=</var> <span
              class="emphasis"><i class="EMPHASIS">do sync at
              interval</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">sync_timeout=</var> <span
              class="emphasis"><i class="EMPHASIS">sync
              timeout</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">wait_for_banner</var> FLAG
              <span class="emphasis"><i class="EMPHASIS">wait for
              banner page</i></span></p>
            </li>
          </ul>

          <p>Many printers are able to provide status information
          back to the filter. It is assumed that in these
          circumstances file descriptor 1 (FD1) is <span class=
          "emphasis"><i class="EMPHASIS">bidirectional</i></span>
          and status information can be read from it. When the <var
          class="LITERAL">status</var> option is TRUE, FD1 is
          readable and is a device or communications socket, then
          the filter assumes that it can read FD1.</p>

          <p>Synchronization is usually done in order to ensure
          that a previously spooled job or printer action has
          completed correctly, and the printer is ready to accept a
          new job. It is usually carried out by sending a request
          to the printer to echo a string back to the filter.
          Clearly, if the printer cannot provide status or echo
          values back, then synchronization is impossible.</p>

          <p>The value of the <var class="LITERAL">sync</var>
          option determines if a PJL ECHO command or simple
          PostScript program is used. The PostScript program has
          the form:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3193"></a>
<pre class="SCREEN">
    \004%!PS-Adobe-2.0
    ( %%[ echo: <acronym class=
"ACRONYM">TODSTR</acronym> ]%% ) print () = flush
    \004
</pre>
          </div>
          where <acronym class="ACRONYM">TODSTR</acronym> is
          replaced with the current Time of Day.<br>
          <br>

          <p>To control obtaining synchronization, the <var class=
          "LITERAL">sync_interval=nnn</var> and <var class=
          "LITERAL">sync_timeout=nnn</var> options are used. The
          PJL or PS command is repeated at <var class=
          "LITERAL">sync_interval=nnn</var> second intervals; if
          nnn is 0, then it is sent only once. If synchronization
          is not obtained within <var class=
          "LITERAL">sync_timeout=nnn</var> seconds, then the filter
          exits with an error status. A 0 value or <var class=
          "LITERAL">sync_timeout@</var> disables timeouts.</p>

          <p>When the <b class="APPLICATION">ifhp</b> filter is
          operating in OF mode and the <var class=
          "LITERAL">wait_for_banner</var> option is true, the
          filter will wait until it determines that the banner page
          has been completely printed before carrying out other
          filter functions.</p>

          <p>Pagecounts are used to do accounting and report the
          number of pages used for a job. Most printers have a
          hardware based pagecounter mechanism whose value can be
          read by the appropriate PJL command or PostScript
          program. For example, if the PJL INFO command</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3207"></a>
<pre class="SCREEN">
    @PJL INFO PAGECOUNT
</pre>
          </div>
          is supported by a printer, the printer will return a
          status message containing the current pagecounter value.
          Printers that support PostScript may also be able to
          access the pagecounter value using a PostScript program.
          The exact details of the PostScript program vary from
          vendor to vendor and the <var class=
          "LITERAL">pagecount_ps_code=...</var> option specifies
          the PostScript program to use. For example: 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3210"></a>
<pre class="SCREEN">
    pagecount_ps_code=
      /p {print} def ( %%[ pagecount: ) p
      statusdict begin pagecount end 20 string cvs p
      ( ]%% ) p () = flush
</pre>
          </div>
          <br>
          <br>

          <p>The <b class="APPLICATION">lpd</b> print server and
          the <b class="APPLICATION">ifhp</b> filter must act in
          coordination to do reliable pagecounting. The following
          options are used by the <b class="APPLICATION">ifhp</b>
          filter to assist with this:</p>

          <div class="INFORMALTABLE">
            <a name="PAGECOUNTOPTIONS"></a>

            <table border="1" frame="border" rules="all" class=
            "CALSTABLE">
              <col>
              <col>

              <thead>
                <tr>
                  <th>Option</th>

                  <th>Purpose</th>
                </tr>
              </thead>

              <tbody>
                <tr>
                  <td><var class=
                  "LITERAL">accounting=</var>.../</td>

                  <td>accounting program</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">accounting_info=AnPR</var></td>

                  <td>accounting information</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pagecount@</var></td>

                  <td>do not get pagecounter value</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pagecount</var></td>

                  <td>get pagecounter using either PJL or
                  PostScript if available on the printer
                  (default)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pagecount=pjl</var></td>

                  <td>get pagecounter using PJL</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pagecount=ps</var></td>

                  <td>get pagecounter using PostScript</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">pagecount_start</var></td>

                  <td>get pagecounter at job start (default)</td>
                </tr>

                <tr>
                  <td><var class="LITERAL">pagecount_end</var></td>

                  <td>get pagecounter at job end (default)</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">pagecount_poll=N</var></td>

                  <td>if nonzero, poll printer and conclude
                  pagecounter value is nonzero when identical N
                  times (default 1)</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">pagecount_interval</var></td>

                  <td>if polling more than once, then leave this
                  interval (in seconds) between polls.</td>
                </tr>

                <tr>
                  <td><var class=
                  "LITERAL">of_options=...</var></td>

                  <td>Use these option values when running in OF
                  Mode</td>
                </tr>
              </tbody>
            </table>
          </div>
          <br>
          <br>

          <p>The following options are used in the <b class=
          "APPLICATION">LPRng</b> printcap entry to assist with
          getting the pagecounter values:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3269"></a>
<pre class="SCREEN">
    lp:
      # run at job start
      :as=/.../accounting_at_start
      # run at job end
      :ae=/.../accounting_at_end
      # -a filter option value or last command line argument
      :af=/.../acct
      # default filter
      :filter=/.../ifhp
      # of filter - run before and after job, can be suspended
      # desperation flag for desperate situations
      #:suspend_of_filter@
      :of=/.../ifhp
      #options
      :ifhp=...,of_options=pagecount waitend
</pre>
          </div>
          <br>
          <br>

          <p>The <var class="LITERAL">:as</var> program is run at
          the start of a print job, and is used to determine if the
          user has sufficient resourses to print a job. The <var
          class="LITERAL">:ae</var> program is run at the end of a
          print job and is used to collect the accounting
          statistics. The <b class="APPLICATION">ifhp</b> filter
          will write accounting information to the accounting file
          specified by the command line <var class=
          "OPTION">-a</var> option, or the last command line
          argument. When both the <var class="LITERAL">:of</var>
          filter and normal filters are used together, the
          accounting information will be nested as shown.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3277"></a>
<pre class="SCREEN">
    Normal Mode:
      start                     '-qProcessID' '-pPagecounter' \
         '-tStartTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo'
      end '-bPages' '-Telapsed' '-qProcessID' '-pPagecounter' 
         '-tEndTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo' \
         '-TElapsedTime'
    
    OF Mode:
      filestart                     '-qProcessID' '-pPagecounter' \
         '-tStartTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo'
      fileend '-bPages' '-Telapsed' '-qProcessID' '-pPagecounter' \
         '-tEndTime' '-Pprinter' '-Hhost' '-nuser' '-Raccntinfo'
         
    
    Sample Accounting File Entry:
    
      start '-q10699' '-p234' '-t2000-05-24-09:27:47.784' \
          -Plp -Hh4.private -npapowell
      filestart '-q10700' '-p234' '-t2000-05-24-09:27:47.784' \
          -Plp -Hh4.private -npapowell
      fileend '-b0' '-T1' '-q10700' '-p235' '-t2000-05-24-09:27:47.863' \
          -Plp -Hh4.private -npapowell
      end '-b1' '-T1' '-q10699' '-p235' '-t2000-05-24-09:27:47.863'
          -Plp -Hh4.private -npapowell
</pre>
          </div>
          <br>
          <br>

          <p>The format of the information written to the
          accounting file is controlled by the <var class=
          "LITERAL">accounting_info=AHPn</var> <b class=
          "APPLICATION">ifhp</b> configuration value. If they are
          present, the specified <b class="APPLICATION">ifhp</b>
          command line flags are appended to the end of the
          standard accounting information. The <var class=
          "LITERAL">accounting=...</var> option specfies a program
          to run at then end of the job. This program has all of
          the accounting information passed as command line
          options. The program should exit with a 0 exit code;
          otherwise the results are undefined.</p>

          <p>The printcap <var class=
          "SYMBOL">:suspend_of_filter</var> controls how the <b
          class="APPLICATION">lpd</b> spooler manages the <var
          class="LITERAL">of</var> filter. When a file is to be
          printed normally, a special two character suspend message
          (<var class="LITERAL">\031\001</var>) is written to the
          filter STDIN. When the <b class="APPLICATION">ifhp</b>
          filter detects this string in the input it is required to
          suspend itself by sending itself a <var class=
          "LITERAL">SIGSUSP</var> signal. The <var class=
          "LITERAL">:suspend_of_filter@</var> flag causes the <b
          class="APPLICATION">lpd</b> process to close the <var
          class="LITERAL">:of</var> filter rather than suspending
          it, and to start a new <var class="LITERAL">:of</var>
          filter process when it needs one. This option is used
          when there can be at most one process communicating with
          the printer, or when the <b class="APPLICATION">ifhp</b>
          filter must totally reinitialize the printer at job
          end.</p>

          <p>The <var class="LITERAL">pagecount</var> option
          controls if and how the pagecounter value will be
          fetched. Currently <var class=
          "LITERAL">pagecount=ps</var> (PostScript) and <var class=
          "LITERAL">pagecount=pjl</var> (PJL) are supported. The
          <var class="LITERAL">pagecount</var> form will use PJL if
          it is available; otherwise PostScript if it is available.
          The <var class="LITERAL">pagecount@</var> suppresses
          pagecount operation. The <var class=
          "SYMBOL">pagecount_start</var> and <var class=
          "SYMBOL">pagecount_end</var> flags control if the
          pagecounter will be obtained at the start and end of the
          print job.</p>

          <p>One of the major problems with getting printcounter
          values is that the print job must be totally finished or
          at least have all of its pages run through the paper feed
          stream when the pagecounter value is reported.
          Unfortunately, most manufacturers do not provide accurate
          ways to coordinate the two activities. The <var class=
          "LITERAL">waitend</var> option is used to enable the <b
          class="APPLICATION">ifhp</b> filter to send special
          command sequences to the printer which will detect the
          true end of job, but this may not be possible on many
          printers.</p>

          <p>The <var class="LITERAL">printcounter_poll=N</var>
          (default 1) option provides a method to deal with these
          types of printers. Commands to get the printcounter value
          are sent to the printer, and repeated at <var class=
          "SYMBOL">printcap_interval</var> second intervals until
          the printcounter value has been stable for <var class=
          "LITERAL">N</var> readings.</p>

          <p>The PJL TEOJ (True End Of Job) command has been used
          with only limited success to force End of Job reporting
          only when the job has finished. This can be sent to the
          printer during PJL initialization by specifying it as one
          of the PJL initialization strings:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3312"></a>
<pre class="SCREEN">
    pjl_init=[ ... teoj ... ]
    pjl_teoj=@PJL TEOJ=ON
</pre>
          </div>
          <br>
          <br>

          <p>The <a href="#OFOPTIONS"><var class=
          "SYMBOL">of_options</var></a> are used to modify the
          actions of the <b class="APPLICATION">ifhp</b> filter
          when it is running in OF Mode.</p>

          <p>The <var class="SYMBOL">pagecount_start</var> and <var
          class="SYMBOL">pagecount_end</var> (both default to TRUE
          or ON) control if pagecounter values are obtained at the
          start or end respectively of the job.</p>

          <p>The pagecount request is sent to the printer every
          <var class="LITERAL">pagecount_interval=nnn</var> second
          intervals; if nnn is 0, then it is sent only once. If no
          pagecount value is obtained within <var class=
          "LITERAL">pagecount_timeout=nnn</var> seconds then the
          filter exits with an error.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="PJLINIT">7.5. PJL
          Initialization</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">pjl_init=[ ... ]</var><span
              class="emphasis"><i class="EMPHASIS">pjl
              initialization</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">startpage=</var><span class=
              "emphasis"><i class="EMPHASIS">start page to
              print</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">endpage=</var><span class=
              "emphasis"><i class="EMPHASIS">end page to
              print</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_only=[ ... ]</var><span
              class="emphasis"><i class="EMPHASIS">pjl commands
              supported</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_except=[ ... ]</var><span
              class="emphasis"><i class="EMPHASIS">pjl commands not
              to be used</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_vars_set=[ ...
              ]</var><span class="emphasis"><i class="EMPHASIS">pjl
              variables supported</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_vars_except=[ ...
              ]</var><span class="emphasis"><i class="EMPHASIS">pjl
              variables not to be used</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_user_opts=[ ...
              ]</var><span class="emphasis"><i class="EMPHASIS">pjl
              options available to user</i></span></p>
            </li>
          </ul>

          <p>If a printer supports PJL, the many printer operations
          can be initiated and controlled using PJL commands.
          Unfortunately, not all printers support the same set of
          commands. In addition, not all printers support the same
          set of operations or options. A PJL command has the
          form:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3360"></a>
<pre class="SCREEN">
    @PJL COMMAND OPTION OPTION ...
</pre>
          </div>
          A PJL variable is set using: 

          <div class="INFORMALEXAMPLE">
            <a name="AEN3362"></a>
<pre class="SCREEN">
    @PJL SET <span class="emphasis"><i class=
"EMPHASIS">var</i></span> = <span class="emphasis"><i class=
"EMPHASIS">value</i></span> ...
</pre>
          </div>
          The <var class="LITERAL">pjl_only=[ ... ]</var>, <var
          class="LITERAL">pjl_except=[ ... ]</var>, <var class=
          "LITERAL">pjl_vars_set=[ ... ]</var>, and <var class=
          "LITERAL">pjl_vars_except=[ ... ]</var> options are used
          to control which PJL commands and which PJL variables can
          be set. The <var class="SYMBOL">pjl_only</var> variable
          lists the commands supported by the printer, and the <var
          class="SYMBOL">pjl_except</var> lists commands <span
          class="emphasis"><i class="EMPHASIS">not</i></span>
          supported by the printer. Before sending a PJL command,
          the <b class="APPLICATION">ifhp</b> filter checks to make
          sure that the command name is in <var class=
          "SYMBOL">pjl_only</var> and not in <var class=
          "SYMBOL">pjl_except</var>. If the tests fail, then tne
          command is not sent.<br>
          <br>

          <p>Similarly, when sending a command to set a PJL
          variable, the <var class="SYMBOL">pjl_vars_set</var> and
          <var class="SYMBOL">pjl_vars_except</var> lists are
          checked to determine if the variable name is in <var
          class="SYMBOL">pjl_vars_set</var> and not in <var class=
          "SYMBOL">pjl_except</var> list. If the tests fail, then
          tne command is not sent.</p>

          <p>If PJL is enabled, then the following actions are
          taken.</p>

          <ol type="1">
            <li>
              <p>PJL Universal Exit Language (UEL) <var class=
              "LITERAL">\033%-12345X</var> is sent to the
              printer.</p>

              <p>This is required to ensure that the following PJL
              commands are accepted.</p>
            </li>

            <li>
              <p>PJL JOB command is sent at the start of job. The
              JOB command can be used to select pages or
              impressions to be printed. If the <var class=
              "LITERAL">-Zstartpage=nnn</var> or <var class=
              "LITERAL">-Zendpage=mmm</var> option is present, then
              the PJL JOB command has the form:</p>

              <div class="INFORMALEXAMPLE">
                <a name="AEN3391"></a>
<pre class="SCREEN">
    @PJL JOB START=nnn END=mmm
</pre>
              </div>
              <br>
              <br>
            </li>

            <li>
              <p>The <var class="LITERAL">pjl_init=[ ... ]</var>
              value option is expanded using the PJL (<var class=
              "LITERAL">"pjl_"</var>) language context as described
              above.</p>
            </li>

            <li>
              <p>The <var class="LITERAL">-Toption=value</var>s and
              <var class="LITERAL">-Zoption=value</var>s are
              scanned for matching option names in the <var class=
              "LITERAL">pjl_user_opts=[ ... ]</var> list. If they
              are found, then the options are recursively evaluated
              in the PJL language context. The expansion algorithm
              will cause the option value to be used to set PJL
              variables. For example:</p>

              <div class="INFORMALEXAMPLE">
                <a name="AEN3402"></a>
<pre class="SCREEN">
    Configuration:
      pjl_vars_set=[ OUTBIN AUTOSELECT JAM=YES ]
    
    Command
      ifhp -Zoutbin=upper,autoselect,jam
    
    PJL command generated:
      @PJL SET OUTBIN=UPPER
      @PJL SET AUTOSELECT=ON
      @PJL SET JAM=YES
</pre>
              </div>
              <br>
              <br>
            </li>
          </ol>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="FILECONVERSION">7.6. File
          Conversion Support</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">forceconversion</var> FLAG
              <span class="emphasis"><i class="EMPHASIS">force use
              of file utility</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">default_language=</var><span
              class="emphasis"><i class="EMPHASIS">default job
              language</i></span></p>
            </li>
          </ul>

          <p>The <tt class="COMMAND">lpr -l</tt> or <tt class=
          "COMMAND">lp -b</tt> flags indicate that the spooled
          files are not to be processed by an output filter. The <b
          class="APPLICATION">LPRng</b> spooler recognizes this
          option and passes the <var class="OPTION">-c</var>
          command line option to suppress any language specific
          processing for files.</p>

          <p>However, many PostScript printers cannot handle text
          files, and produce many hundreds of pages of garbage
          output if they are sent to the printer without being
          translated into PostScript, and some printers require
          language specific setup in order to print PCL, PostScript
          or text files correctly.</p>

          <p>The <b class="APPLICATION">ifhp</b> filter has builtin
          tests for PJL, PCL, and PostScript files. These tests are
          almost identical to those used by many printers which do
          <span class="emphasis"><i class=
          "EMPHASIS">autodetection</i></span>. If you need to
          recognize a wider range of file types, you can configure
          <b class="APPLICATION">ifhp</b> to use the UNIX <var
          class="LITERAL">file</var>(1) program.</p>

          <p>Finally, some printers have a very specialized job
          format that requires conversion to by a <var class=
          "LITERAL">rasterizer</var> program. This is handled as
          detailed in the following sections.</p>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="FILE-UTIL-PATH">7.6.1. File
            Type Detection</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">file_util_path=</var><span
                class="emphasis"><i class="EMPHASIS">file utilty
                path</i></span></p>
              </li>

              <li>
                <p><var class="LITERAL">forceprocessing</var> FLAG
                <span class="emphasis"><i class="EMPHASIS">force
                file processing</i></span></p>
              </li>
            </ul>

            <p>The <b class="APPLICATION">ifhp</b> filter has a set
            of built-in tests to determine if the input job file is
            PJL, PostScript, and PCL, or (default) text, and flags
            the file with language types <var class=
            "LITERAL">pjl</var>, <var class="LITERAL">ps</var>,
            <var class="LITERAL">pcl</var>, and <var class=
            "LITERAL">text</var> respectively.</p>

            <p>You can also use the UNIX <a href="#FILEUTIL">file
            utility</a> utility to determine type as well. The <var
            class="LITERAL">file</var> utility is invoked with it
            <acronym class="ACRONYM">STDIN</acronym> attached to
            the file and <b class="APPLICATION">ifhp</b> uses the
            information it writes to <acronym class=
            "ACRONYM">STDOUT</acronym> as the raw file type. The <b
            class="APPLICATION">ifhp</b> program will convert the
            output to lowercase, remove multiple whitespace
            characters, and replace the remaining whitespace
            characters with underscores <var class=
            "SYMBOL">_</var>.</p>

            <p>By default, <b class="APPLICATION">ifhp</b> will not
            try to detect <span class="emphasis"><i class=
            "EMPHASIS">binary</i></span> files, i.e. - files
            printed with the binary or literal flag (<var class=
            "LITERAL">-c</var> command line flag). You can use the
            <var class="LITERAL">forceprocessing</var> flag to
            cause all files of all types to be processed. <b class=
            "APPLICATION">ifhp</b> will first try to use its
            builtin tests and then will use the <var class=
            "LITERAL">file</var> utility. You can set the <var
            class="SYMBOL">forceconversion</var> flag to force <b
            class="APPLICATION">ifhp</b> to only use the <var
            class="LITERAL">file</var> utility. The following shows
            the information in the <tt class=
            "FILENAME">ifhp.conf</tt> file used to configure the
            file type detection.</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3464"></a>
<pre class="SCREEN">
    ##forceprocessing - check all files for type - default 'no'
    forceprocessing@
    ## default
    default_language=text
    ## force only use of file program
    ## default is to let ifhp try first, then try file
    forceconversion@
    ##  file utility path
    file_util_path=/usr/bin/file -
</pre>
            </div>
            <br>
            <br>

            <p>The output of the file utility is converted to lower
            case and used as the language type for further
            processing.</p>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="CONVERSION">7.6.2.
            Conversion</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">file_output_match=</var>
                TABLE <span class="emphasis"><i class=
                "EMPHASIS">file utility output match
                list</i></span></p>
              </li>

              <li>
                <p><var class="LITERAL">language=</var><span class=
                "emphasis"><i class="EMPHASIS">language type
                override</i></span></p>
              </li>
            </ul>

            <p>Once the language type has been determined, the <b
            class="APPLICATION">ifhp</b> filter then decides if a
            conversion program needs to be run and will convert the
            input file to a required file type. This activity is
            controlled by the <var class=
            "SYMBOL">file_output_match</var> table.</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3481"></a>
<pre class="SCREEN">
    file_output_match = [
      *postscript*  ps  \%s{ps_converter}
      *pcl*         pcl  \%s{pcl_converter}
      *pjl*         pjl  \%s{pjl_converter}
      *printer*job*language* pjl
      *text*  pcl  \%s{pcl_converter}
      *gzip_compressed*  filter  \%s{gzip_decompresser}
      ]
</pre>
            </div>
            Each line of the <var class=
            "SYMBOL">file_output_match</var> table contains a (URL
            encoded) <span class="emphasis"><i class=
            "EMPHASIS">glob</i></span> pattern, the language type
            (<var class="LITERAL">ps</var>, <span class=
            "emphasis"><i class="EMPHASIS">pcl</i></span>, etc.)
            produced by the conversion program, and the (optional)
            conversion program.<br>
            <br>

            <p>The format:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3488"></a>
<pre class="SCREEN">
    file_output_match = &lt;/pathname
</pre>
            </div>
            <br>
            <br>

            <p>will cause <b class="APPLICATION">ifhp</b> to open
            and read the specified file for the <var class=
            "SYMBOL">file_output_match</var> table. The file's
            contents must have the same format as the <var class=
            "SYMBOL">file_output_match</var> table but without the
            <var class="LITERAL">[</var> or <var class=
            "LITERAL">]</var> delimiters.</p>

            <p>The <var class="SYMBOL">file_match_table</var> is
            scanned from first to last entry for a <var class=
            "LITERAL">glob</var> pattern that matches the file type
            determined by the <b class="APPLICATION">ifhp</b>
            program or the output of the <var class=
            "SYMBOL">file_util_path</var> program. If no match is
            found, then the language is set to the <var class=
            "SYMBOL">default_language</var> value.</p>

            <p>The output language of the conversion program is set
            to the second entry. The conversion program will be run
            with its STDIN set to the input file and its STDOUT
            used as the converted output. If there is no conversion
            program then the original file is used and only the
            language type is modified.</p>

            <p>The <var class="LITERAL">filter</var> language type
            causes the specified conversion program to be run and
            then the output of the program to be reprocessed. As
            shown above, this allows file decompression routines to
            be used to expand the files.</p>

            <p>The following are some short samples of what can be
            done with the conversion facility.</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3506"></a>
<pre class="SCREEN">
    # set up GhostScript
    gs_device=epsonc
    gs_options=-r1440
    gs=/usr/bin/gs
    gs_converter= [ \%s{gs} -dBATCH -q -sOutputFile=- \
      -sDEVICE=\%s{gs_device} \%s{gs_options} - ]
    # use GhostScript for conversion
    ps_converter = [ \%{gs_converter} ]
    text_converter= [/usr/bin/a2ps -q -B -1 -M Letter \
      --borders=no -o- \%s{ps_converter} ]
    gzip_decompresser = [ /usr/bin/gzip -c -d ]
    
    [ ghostscript gs ]
    file_output_match = [
      *postscript*  ps  \%s{ps_converter}
      *text*  pcl  \%s{pcl_converter}
      *gzip_compressed*  filter  \%s{gzip_decompresser}
      ]
    
    Printcap entry:
    
    pr:
      :ifhp=model=ghostscript,gs_device=laserjet,gs_options=-r300x300
</pre>
            </div>
            <br>
            <br>

            <p>In this example, we have shown a very interesting
            device - the GhostScript device. We use the <var class=
            "LITERAL">gs</var> (GhostScript) program to do the
            conversion, and specify the <var class=
            "SYMBOL">gs_device</var> and <var class=
            "SYMBOL">gs_options</var> values in the printcap entry.
            There are a few details that should be observed when
            using this facility.</p>

            <ol type="1">
              <li>
                <p>The output from the <var class=
                "LITERAL">file</var> program has spaces converted
                to underscores. If you need to match spaces then
                use the underscore in the pattern. For example,
                <var class="LITERAL">ascii text</var> would be
                matched by <span class="emphasis"><i class=
                "EMPHASIS">*ascii_text*</i></span>.</p>
              </li>

              <li>
                <p>If the conversion program contains a shell meta
                character such as <var class="LITERAL">|</var>,
                <var class="LITERAL">;</var>, <var class=
                "LITERAL">&gt;</var>, <var class=
                "LITERAL">&lt;</var>, etc, then it will be executed
                using <var class="LITERAL">/bin/sh -c
                'command'</var>. This allows a pipe of conversion
                commands to be constructed. This is discussed in
                detail below.</p>
              </li>

              <li>
                <p>The most commonly used conversion programs are
                <a href="#GHOSTSCRIPT">GhostScript</a>, used to
                convert PostScript to a format compatible with a
                non-PostScript printer, and the <a href=
                "#A2PS">a2ps</a>, <a href="#ENSCRIPT">enscript</a>,
                and <a href="#TEXTPS">textps</a> Text to PostScript
                conversion programs which convert text into
                PostScript for a non-text supporting printer. The
                use of a <var class="LITERAL">wrapper</var> program
                with these utilities is discussed below.</p>
              </li>

              <li>
                <p>All of the command line options can be
                substituted on the command line using <var class=
                "LITERAL">\%{X}</var>, where <span class=
                "emphasis"><i class="EMPHASIS">X</i></span> is the
                single letter command line option flag.</p>
              </li>

              <li>
                <p>The <var class="LITERAL">\%s{ARGV}</var> value
                is replaced by the command line arguments.</p>
              </li>

              <li>
                <p>The conversion program must exit with a 0 error
                code or an error is assumed to have occurred.</p>
              </li>
            </ol>
            <br>
            <br>

            <p>The <var class="LITERAL">enscript</var> program will
            exit with a non-zero error codes even for successful
            conversions and we need to use a <var class=
            "LITERAL">wrapper</var> script that will run it and
            then return the correct error code as shown below.</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3544"></a>
<pre class="SCREEN">
    #!/bin/sh
    # /usr.../wrapper path [options]
    # wrapper script for a2ps, enscript and others
    #   path is the path to the program and options are the
    #   options to pass.  The program is run and then the exit
    #   code is corrected
    "$@"
    status=$?
    case "$status" in
        1 ) exit $status ;;
    esac
    exit 0
</pre>
            </div>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="CRLF">7.6.3. LF to CR/LF
            Conversion</a></h3>

            <ul>
              <li>
                <p><var class="LITERAL">crlf</var> FLAG <span
                class="emphasis"><i class="EMPHASIS">LF to CR-LF
                conversion</i></span></p>
              </li>
            </ul>

            <p>When processing <var class="LITERAL">text</var> or
            <span class="emphasis"><i class=
            "EMPHASIS">pcl</i></span> files, the <var class=
            "LITERAL">crlf</var> option will enable translation of
            LF (<var class="LITERAL">\n</var>) to CR/LF (<span
            class="emphasis"><i class="EMPHASIS">\r\n</i></span>)
            sequences. If you are using <b class=
            "APPLICATION">ifhp</b> to simply do LF to CR/LF
            translation, then you can use:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3560"></a>
<pre class="SCREEN">
    ifhp -Tcrlf
</pre>
            </div>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="AEN3562">7.6.4. Text Treated
            Like PCL</a></h3>

            <p>Text is simply PCL with no special formatting codes.
            However, you will still need to send the PCL
            initialization strings to the printer. You can do this
            by using the following entry in the <var class=
            "SYMBOL">file_output_match</var> table:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3566"></a>
<pre class="SCREEN">
    file_output_match = [
     *text*  pcl
     ]
</pre>
            </div>
            <br>
            <br>
          </div>

          <div class="SECT2">
            <hr>

            <h3 class="SECT2"><a name="AEN3568">7.6.5. Default to
            Passthrough</a></h3>

            <p>Your printer may be capable of handling a wide
            variety of job formats. If you want to simply pass
            through files of unknown type or language then use the
            following entry in the <var class=
            "SYMBOL">file_output_match</var> table:</p>

            <div class="INFORMALEXAMPLE">
              <a name="AEN3572"></a>
<pre class="SCREEN">
    file_output_match = [
     *  raw
     ]
</pre>
            </div>
            <br>
            <br>
          </div>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="GHOSTSCRIPTCONFIG">7.7.
          GhostScript Printer</a></h2>

          <p>Generating a raster image from a PostScript or PCL
          file in a timely manner requires a high speed processor
          and substantial amounts of memory. Many of the low cost
          printers require the user's system to do the raster
          conversion, and a raster file is then transferred to the
          printer. These files are usually in a proprietary format.
          The <a href="#GHOSTSCRIPT">GhostScript</a> program can
          process PostScript files and produce raster output for a
          wide range of devices. See the GhostScript documentation
          for details. Some printers have PCL support but do not
          support PostScript. The <var class="LITERAL">gs</var> and
          <var class="LITERAL">pcl_gs</var> printer configuration
          support these printers.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3580"></a>
<pre class="SCREEN">
    # PRINTER ghostscript - Printer with GhostScript conversion to raster files
    gs_converter= [ /usr/bin/gs -dSAFER -dBATCH -q 
       -sOutputFile=- -sDEVICE=\%s{gs_device} \%s{gs_options} -
     ]
    text_converter= [ /usr/bin/a2ps -q -B -1 -M Letter --borders=no -o-
     ]
    
    [ ghostscript gs ]
    pcl@
    pjl@
    ps
    text@
    file_output_match = [
    # PostScript to Raster
      *postscript*  raw  \%s{gs_converter}
    # text to PostScript to Raster conversion
      *text*  filter  \%s{text_converter}
      ]
    
    # PRINTER pcl_gs - PCL Printer with GhostScript conversion to raster files
    [ pcl_gs ]
    pcl
    pjl@
    ps
    text@
    file_output_match = [
    # PostScript to Raster
      *postscript*  raw  \%s{gs_converter}
      *pcl*  pcl
    # text to PostScript to Raster conversion
      *text*  filter  \%s{text_converter}
      ]
</pre>
          </div>
          <br>
          <br>

          <p>The <var class="LITERAL">\%s{gs_device}</var> and <var
          class="LITERAL">\%s{gs_options}</var> parameters can now
          be specified in the printcap. The following shows a
          typical printcap entry for use with this entry.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3585"></a>
<pre class="SCREEN">
    #  force clients (lpr, lpq, to use server)
    lp:lp=lp@serverhost 
    # server information  
    lp:server  
      :sd=<span class="emphasis"><i class=
"EMPHASIS">spooldir</i></span> 
      :lp=/dev/lpt0     
      :...  
      :ifhp=model=gs,gs_device=epson,gs_options=-r240x72 
      #path to ifhp filter  
      :filter=/.../ifhp 
</pre>
          </div>
          <br>
          <br>

          <p>The <b class="APPLICATION">ifhp</b> configuration
          entry uses GhostScript to do the rasterization of the
          PostScript file, and the <var class="LITERAL">a2ps</var>
          program to do a text to PostScript conversion.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="LANGUAGEINIT">7.8. Language
          Specific Initialization</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">ps_init=</var> <span class=
              "emphasis"><i class="EMPHASIS">PostScript
              initialization steps</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pcl_init=</var> <span class=
              "emphasis"><i class="EMPHASIS">PCL initialization
              steps</i></span></p>
            </li>
          </ul>

          <p>After determining the output file language type,
          language specific operations are then carried out by
          expanding the <var class="SYMBOL">language</var><var
          class="LITERAL">_init=[ ... ]</var> options in the
          language context, and then the options in the <var class=
          "LITERAL">-Toption=value</var> and <var class=
          "LITERAL">-Zoption=value</var> command line options. The
          <var class="OPTION">-T</var> options are expanded before
          the <var class="OPTION">-Z</var>, allowing the <var
          class="OPTION">-Z</var> actions to override any set by
          the <var class="OPTION">-T</var> actions.</p>

          <p>As mentioned elsewhere, the reason for the language
          specific processing is to allow different actions for the
          same command line option, depending on the file type that
          is being processed. For example, when processing a PCL
          file it might be necessary to send PCL command strings
          and when processing a PostScript file, you would need to
          send PostScript commands.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="FILETRANSFER">7.9. File
          Transfer and Error Status Monitoring</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">logall</var> FLAG <span
              class="emphasis"><i class="EMPHASIS">log all printer
              status</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_error_codes</var> TABLE
              <span class="emphasis"><i class="EMPHASIS">PJL error
              code translations</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_quiet_codes</var> TABLE
              <span class="emphasis"><i class="EMPHASIS">ignore
              these PJL error codes</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_alert_codes</var> TABLE
              <span class="emphasis"><i class="EMPHASIS">alert
              operation on these PJL error codes</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">pjl_alert_handler</var> TABLE
              <span class="emphasis"><i class="EMPHASIS">program to
              alert operator</i></span></p>
            </li>
          </ul>

          <p>If the printer can return status, i.e., the <var
          class="LITERAL">status</var> option is on, the filter
          will read status information from the printer.</p>

          <p>If the <var class="LITERAL">logall</var> flag is SET,
          then all error messages will be written to the status or
          log file.</p>

          <p>If the printer is returning PJL status information,
          then this has a specific format:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3640"></a>
<pre class="SCREEN">
    @PJL UINFO DEVICE
    CODE=nnnn
    DISPLAY="value"
    ...
    
    @PJL UINFO JOB
    START
    ...
    
    @PJL UINFO JOB
    END
    ...
</pre>
          </div>
          <br>
          <br>

          <p>The <b class="APPLICATION">ifhp</b> program will
          extract the <acronym class="ACRONYM">CODE</acronym> and
          job start and end flags, and log these as
          appropriate.</p>

          <p>Unfortunately, some PJL based printers are extremely
          verbose in their generation of status messages. In order
          to reduce the amount of logging of redundant information,
          <b class="APPLICATION">ifhp</b> will only record when a
          device status has <span class="emphasis"><i class=
          "EMPHASIS">changed</i></span>, rather than when it has
          been reported.</p>

          <p>The pjl_quiet_codes=[ code code code ] value is used
          to suppress reporting of selected error codes. If the
          error code is in the pjl_quiet_codes list, then the error
          status will not be reported to the user unless the <var
          class="LITERAL">logall</var> option is set. The list of
          values is used as <span class="emphasis"><i class=
          "EMPHASIS">glob</i></span> patterns. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3651"></a>
<pre class="SCREEN">
      pjl_quiet_codes=[ 10000 10001 10003 10023 10024 35078 41* ]
</pre>
          </div>
          <br>
          <br>

          <p>Also, there may be error codes which do not have a
          builtin error message available. New messages can be
          added using the <var class="SYMBOL">pjl_error_codes</var>
          option. Its value is a list of lines, each line
          consisting of an error code followed by the corresponding
          error message:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3655"></a>
<pre class="SCREEN">
    pjl_error_codes=[
       code=msg
       code=msg
       ...
    ]
    
    Example:
      pjl_error_codes=[
         10000=powersave mode
         10001=Ready Online
         10002=Ready Offline
         10003=Warming Up
         10004=Self Test
         10005=Reset
      ]
</pre>
          </div>
          <br>
          <br>

          <p>Finally, there are codes or classes of codes that
          require operator intervention. These are specified using
          the <var class="SYMBOL">pjl_alert_codes</var>, and the
          <var class="SYMBOL">pjl_alert_handler</var> program will
          be invoked to send them to the appropriate destination.
          The formated error message will be available on STDIN for
          the handler. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3660"></a>
<pre class="SCREEN">
    pjl_alert_codes=[ 41* 42* 23* ]
    pjl_alert_handler=/usr/local/libexec/filters/alert_handler
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="WAITEND">7.10. End of
          Job</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">waitend</var> OPTION <span
              class="emphasis"><i class="EMPHASIS">wait for job
              completion status</i></span></p>
            </li>

            <li>
              <p><var class="LITERAL">waitend_interval=</var><span
              class="emphasis"><i class="EMPHASIS">query for end at
              this interval</i></span></p>
            </li>

            <li>
              <p><var class=
              "LITERAL">waitend_ctrl_t_interval=</var><span class=
              "emphasis"><i class="EMPHASIS">send CTRL-T at this
              interval</i></span></p>
            </li>
          </ul>

          <p>The <var class="LITERAL">waitend</var> option controls
          the job termination sequence. By default, this will do
          the same work as the <var class="LITERAL">sync</var>
          operation, and the option takes the same set of
          values.</p>

          <p>If <var class="LITERAL">waitend</var> is suppressed
          using <var class="LITERAL">waitend@</var>, then as soon
          as a job has been transferred, the next step, <var class=
          "LITERAL">pagecount</var>, will be attempted. If the
          print job has not finished at this point, then erroneous
          page counts will be reported.</p>

          <p>When the <var class="LITERAL">appsocket</var> protocol
          is used, suppressing <var class="LITERAL">waitend</var>
          will cause no error messages from the printer to be
          reported.</p>

          <p>Some printers do not have a True End Of Job reporting
          capability using PJL. This means that the job will be
          reported as done, but paper is still moving through the
          print engine. If you try to get pagecounts at this point
          you will get the wrong value. An alternative method is to
          set <var class="LITERAL">waitend=ps</var> and The <var
          class="LITERAL">end_ctrl_t=word:word:...</var> This will
          cause a CONTROL-T to be sent to the printer, a PostScript
          convention that will cause the PostScript interpreter to
          return the actual printing status. In most printers this
          will be <var class="LITERAL">printing</var> or something
          other than <var class="LITERAL">idle</var> or <span
          class="emphasis"><i class="EMPHASIS">busy</i></span> as
          long as paper is moving in the print engine. When status
          is returned, the words in the <var class=
          "LITERAL">end_ctrl_t=word:word:...</var> list value are
          examined for a match. If the status word is present then
          the end of job condition is assumed.</p>

          <p>The <var class="SYMBOL">waitend_interval</var> value
          controls how often the waitend operation is repeated.
          This is usually set to a fairly large value, as it is
          normally used only to recover from printer failures such
          as users turning the printer on and off.</p>

          <p>The <var class="SYMBOL">waitend_ctrl_t_interval</var>
          controls how often the printer is queried for status
          using CTRL-T and is usually set to a short (2 or 3
          second) value.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="APPSOCKET">7.11. Tektronix
          Phaser, QMS and AppSocket Support</a></h2>

          <ul>
            <li>
              <p><var class="LITERAL">appsocket</var> FLAG <span
              class="emphasis"><i class="EMPHASIS">connect to
              printer and use AppSocket Protocol</i></span></p>
            </li>
          </ul>

          <p>The <var class="LITERAL">appsocket</var> flag is used
          to specify that data transfer will be done using the <a
          href="#APPSOCKETPC">AppSocket</a> protocol. The <b class=
          "APPLICATION">ifhp</b> filter will open a connection to
          the ip address and port specified by the <var class=
          "LITERAL">dev=host%port</var> option and carry out the
          various operations that it needs to do.</p>

          <p>Normally after sending information to the printer a
          <code class="FUNCTION">close()</code> operation is done
          on the network connection. This will usually be
          acceptible as the printer will print the job that was
          sent to it. However, some printers require that the
          network connection be left open to report status.</p>

          <p>If page count information is needed, the <b class=
          "APPLICATION">ifhp</b> filter will then reopen the
          connection and get the page count information.</p>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN3714"></a>Chapter 8. Banners and OF Mode
        Operation</h1>

        <p>One of the more difficult administrative issues is
        whether to print banners (job separators) or to save the
        large amount of wasted paper, time and effort. The <b
        class="APPLICATION">LPRng</b> and <b class=
        "APPLICATION">ifhp</b> combination provide a rather
        esoteric set of methods to generate banners, at least one
        of which should be suitable for your application.</p>

        <p>You should be aware that some printers have the
        obnoxious habit of generating their own banner pages when
        jobs are transferred via the RFC1179 protocol. You should
        consult the manufacturers documentation and take the
        necessary steps to turn printer banner page generation off.
        It may turn out that this is impossible to do, and in that
        case the only option is to use the Socket or Appsocket
        connection methods.</p>

        <p>In the original BSD print spooler, the <var class=
        "LITERAL">:of</var> print filter was responsible for banner
        generation. The print server would send it a <span class=
        "emphasis"><i class="EMPHASIS">magic string</i></span> that
        the filter would recognize as a <span class="emphasis"><i
        class="EMPHASIS">print a banner</i></span> request, and it
        would then generate a banner. After this, another special
        <var class="LITERAL">magic cookie</var> string, the
        character sequence <var class="LITERAL">0x19,0x01</var>,
        was sent to cause the <var class="LITERAL">:of</var> filter
        to suspend itself. This allowed the print spooler to hold
        the connection to the printer open while it started another
        filter to transfer a file. Finally, after all the jobs were
        sent, the <var class="LITERAL">:of</var> filter was sent a
        <acronym class="ACRONYM">SIGCONT</acronym> signal to wake
        up and perform whatever closing operations were
        necessary.</p>

        <p>This mixing of functionality causes horrible problems
        when special setup strings must be sent to printers in
        order to configure them for various operation. In order to
        avoid these problems, the banner printing and filter
        functions have been separated in the <b class=
        "APPLICATION">ifhp</b> filter. If a banner is needed, then
        <b class="APPLICATION">LPRng</b> will use a special banner
        generating program to generate the banner. The output of
        this program is then sent to the <var class=
        "LITERAL">:of</var> filter, or directly to the printer if
        there is no <var class="LITERAL">:of</var> filter.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3734">8.1. No
          Banner</a></h2>

          <p>Here is a typical printcap entry when banner printing
          is not wanted:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3737"></a>
<pre class="SCREEN">
    lp:
      :sh
      :filter=/.../ifhp
</pre>
          </div>
          <br>
          <br>

          <p>The <var class="LITERAL">:sh</var> (suppress headers
          or banners) explicitly disables banner printing, and the
          <b class="APPLICATION">lpd</b> server will not even
          attempt to print a banner.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3742">8.2. Banner Printing
          and No OF Filter</a></h2>

          <p>This printcap entry specifies a banner generator
          program and and banner generation. There is no <var
          class="LITERAL">:of</var> filter specified, so the banner
          is sent directly to the printer. In such a case the
          banner printing program should make sure that it
          generates output with the appropriate set of
          initialization strings. The <var class=
          "LITERAL">pclbanner</var>, <var class=
          "LITERAL">psbanner</var>, and <var class=
          "LITERAL">lpbanner</var> programs produce PCL,
          PostScript, and text banners suitable for a wide range of
          printers. The code for these banner generators is part of
          the <b class="APPLICATION">LPRng</b> distribution.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3750"></a>
<pre class="SCREEN">
    lp:
      :bp=/.../pclbanner
      :of=/.../ifhp
      :filter=/.../ifhp
       # or
      :bp=/.../psbanner
      :of=/.../ifhp
      :filter=/.../ifhp
       # or
      :bp=/.../lpbanner
      :of=/.../ifhp
      :filter=/.../ifhp
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3752">8.3. Banner Printing
          With OF Filter</a></h2>

          <p>Finally, we may want banner printing together with the
          <var class="LITERAL">:of</var> filter. This is usually
          the case when we need to perform special printer setups
          or require the <b class="APPLICATION">ifhp</b> filter to
          do accounting. In this case we need to make sure that the
          banner page is counted as part of the job:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3757"></a>
<pre class="SCREEN">
    lp:
      :bp=/.../pclbanner <span class="emphasis"><i class=
"EMPHASIS">or</i></span> :bp=/.../psbanner <span class=
"emphasis"><i class="EMPHASIS">or</i></span> :bp=/.../lpbanner
      :of=/.../ifhp
      :filter=/.../ifhp
</pre>
          </div>
          <br>
          <br>

          <p>When invoked as an <var class="LITERAL">:of</var>
          filter, the <b class="APPLICATION">lpd</b> server passes
          a <var class="OPTION">-Fo</var> option on the command
          line, so that the <b class="APPLICATION">ifhp</b> filter
          knows what mode it is operating in.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3766">8.4. <b class=
          "APPLICATION">LPRng</b> Options Controlling Banner
          Printing</a></h2>

          <p>The <tt class="COMMAND">lpr -h</tt> (no header or
          banner) option suppresses putting <span class=
          "emphasis"><i class="EMPHASIS">banner name</i></span>
          (<var class="LITERAL">L</var> line) into the control
          file. The <b class="APPLICATION">LPRng</b> <var class=
          "SYMBOL">:ab</var> (always banner) overrides this, and
          will print a banner using the user name information. The
          <var class="LITERAL">:sh</var> (suppress header) option
          will override everything and prevent banners from being
          generated.</p>

          <p>Banners are generated by the <var class=
          "LITERAL">:bp=/...</var> (banner program) program;
          different banners at start and end can be generated by
          using the <var class="LITERAL">:bs=/...</var> (banner
          start) and <var class="LITERAL">:be=/...</var> (banner
          end) options, which override the <var class=
          "LITERAL">:bp=</var> option.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="OFOPTIONS">8.5. of_options
          option</a></h2>

          <p>This option, usually used on the command line or in
          the <var class="LITERAL">printcap</var> file as part of
          the <var class="LITERAL">:ifhp</var> information,
          specifies a set of options to use when the filter is
          running in OF mode. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3786"></a>
<pre class="SCREEN">
    lp:
      :ifhp=sync@,pagecount@,waitend@,of_options=sync pagecount waitend
      :filter=/usr/local/libexec/filtes/ifhp
      :of=/usr/local/libexec/filtes/ifhp
    
    same as:
    
    lp:
      :filter=/usr/local/libexec/filtes/ifhp -Tsync@,pagecount@,waitend@
      :of=/usr/local/libexec/filtes/ifhp -Tsync,pagecount,waitend
</pre>
          </div>
          <br>
          <br>

          <p>In this printcap entry, the <b class=
          "APPLICATION">ifhp</b> filter is invoked normally with
          the <var class="LITERAL">sync@</var>, <var class=
          "LITERAL">pagecount@</var> and <var class=
          "LITERAL">waitend@</var> options. This causes it to send
          jobs as fast as possible to the output device and only
          monitor the device for error status. The <var class=
          "LITERAL">of=</var> entry causes the <b class=
          "APPLICATION">lpd</b> print spooler to start <b class=
          "APPLICATION">ifhp</b> in OF mode, and the <var class=
          "SYMBOL">of_options</var> are used to override the other
          ones.</p>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN3797"></a>Chapter 9. Font Download
        Support</h1>

        <p>For historical reasons, there is support for downloading
        a font or other file to the printer. A large amount of the
        necessary operations are now in the <tt class=
        "FILENAME">ifhp.conf</tt> file.</p>

        <p>The <var class="SYMBOL">font_download</var> built-in
        option supports downloading as described below.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3803">9.1. PCL Font
          Downloading</a></h2>

          <p>The following shows the a typical <tt class=
          "FILENAME">ifhp.conf</tt> file which has PCL font
          downloading enabled.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3807"></a>
<pre class="SCREEN">
    #
    # Fonts and Font Downloading
    #  fontid is used to set the current font
    pcl_init=[ ... font ... ]
    
    # combination command
    pcl_font=[ delete_fonts font_id font_download font_primary ]
    
    # font control
    #
    font_op=0
    pcl_font_op=\033*c\%{font_op}F
    pcl_delete_fonts=\033*c0F
    
    font_id=1
    pcl_font_id=\033*c\%{font_id}D
    
    # set primary font
    font_primary=1
    pcl_font_primary=\033(\%{font_primary}X
    
    # font directory
    pcl_fontdir=/usr/local/lib/fonts
    
    #default font file
    font=c1201b.10
</pre>
          </div>
          <br>
          <br>

          <p>To allow users to download a font and have it set up
          for PCL use, the <var class="SYMBOL">pcl_init</var>
          option should include the <var class="LITERAL">font</var>
          option in an appropriate position in the initialization
          sequence. As shown above, this will get expanded into the
          <var class="SYMBOL">pcl_delete_fonts</var>, <var class=
          "SYMBOL">pcl_font_id</var>, <var class=
          "SYMBOL">pcl_font_download</var> (which is has built-in
          support), and the <var class=
          "SYMBOL">pcl_font_primary</var> options, which are
          expanded in order.</p>

          <p>The <var class="SYMBOL">pcl_font_download</var> is
          supported by the builtin operation which will find the
          <var class="SYMBOL">pcl_fontdir</var> directory value and
          a value for the <var class="LITERAL">font</var> variable,
          using values from the <var class="OPTION">-Z</var> and
          <var class="OPTION">-T</var> and configuration
          information in that order. If no <var class=
          "LITERAL">font</var> value is found, no font will be
          downloaded. For example:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3823"></a>
<pre class="SCREEN">
    lpr -Tfont=font1,font2
</pre>
          </div>
          <br>
          <br>

          <p>When the <var class="SYMBOL">pcl_font_download</var>
          option is expanded, it will generate the pathnames <tt
          class="FILENAME">/usr/local/lib/fonts/font1</tt> and <tt
          class="FILENAME">/usr/local/lib/fonts/font2</tt>, open
          these files, and send their contents directly to the
          printer.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3829">9.2. PS Font
          Downloading</a></h2>

          <p>PostScript font downloading is supported in a similar
          manner to PCL font downloading.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3832"></a>
<pre class="SCREEN">
    #
    # Fonts and Font Downloading
    #
    ps_init=[ ... font ... ]
    
    # combination command
    ps_font=[ font_download ]
    
    # font directory
    ps_fontdir=/usr/local/lib/fonts
    
    #default font file
    font=font.ps.10
</pre>
          </div>
          <br>
          <br>

          <p>In a similar manner to the PCL font downloading, when
          the <var class="SYMBOL">ps_init</var> list is expanded,
          the <var class="SYMBOL">ps_font</var> entry will be
          expanded in turn. If the <var class=
          "LITERAL">-Zfont=ZapDingbat.ps</var> is specified, then
          the <tt class=
          "FILENAME">/usr/local/lib/fonts/ZapDingbat.sp</tt> file
          will be opened and downloaded to the printer.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN3839">9.3. PJL File
          Downloading</a></h2>

          <p>In a similar manner to the above font downloading, you
          can specify a configuration or other setup file that
          should be sent to the printer as part of the PJL setups.
          The following configuration shows how to set this up.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN3842"></a>
<pre class="SCREEN">
    #
    # PJL Initialization File Downloading
    #  fontid is used to set the current font
    pjl_init=[ ... setup  ... ]
    
    setup=initval
    font=\%s{setup}
    # setup directory
    pjl_fontdir=/usr/local/lib/fonts
    pjl_setup=[ font_download ]
</pre>
          </div>
          <br>
          <br>

          <p>The above configuration will cause the value of the
          <var class="LITERAL">setup</var> <var class=
          "OPTION">-Z</var>, <var class="OPTION">-T</var> or
          configuration option to be used.</p>
        </div>
      </div>

      <div class="CHAPTER">
        <hr>

        <h1><a name="AEN3848"></a>Chapter 10. Debugging and Problem
        Solving</h1>

        <p>If you are reading this section, then most likely you
        have had a problem using <b class="APPLICATION">ifhp</b>
        with <b class="APPLICATION">LPRng</b>. Before going any
        further, please read <a href="#RFC1179PC">RFC1179 (BSD or
        TCP/IP) Job Transfer Printcap Entry</a>, and make sure that
        your printcap entry has the <var class=
        "SYMBOL">lpd_bounce</var> flag set. This is the <span
        class="emphasis"><i class="EMPHASIS">Most Frequently Asked
        Question</i></span> and the <span class="emphasis"><i
        class="EMPHASIS">Most Frequently Provided Answer</i></span>
        on the <b class="APPLICATION">LPRng</b> mailing list.</p>

        <p>The following section outlines a method to debug
        problems with the <b class="APPLICATION">ifhp</b> filter.
        It will make use of some <var class=
        "LITERAL">diagnostic</var> options that are normally not
        used in a printcap entry. First, let us start with a
        typical printcap entry and a problem.</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3861"></a>
<pre class="SCREEN">
    lw4:
      :lp=10.0.0.14%9100
      :sd=/var/spool/lpd/%P
      :ifhp=/usr/local/lib/filters/ifhp
    
    Command:
      lpr -Plw4 -V /etc/motd
    
    LPR output:
    
    sending job 'papowell@h4+223' to lw4@localhost
    connecting to 'localhost', attempt 1
    connected to 'localhost'
    requesting printer lw4@localhost
    sending control file 'cfA223h4.private' to lw4@localhost
    completed sending 'cfA223h4.private' to lw4@localhost
    sending data file 'dfA223h4.private' to lw4@localhost
    completed sending 'dfA223h4.private' to lw4@localhost
    done job 'papowell@h4+223' transfer to lw4@localhost
    Version LPRng-3.6.14
</pre>
        </div>
        <br>
        <br>

        <p>When trying to print to the print queue, the user
        discovers that no output comes out of the printer. The
        immediate suspicion is that the filter is not working. You
        should make sure that the <var class="LITERAL">lpr</var>
        command is actually sending the job to the print queue. You
        can then use <var class="LITERAL">lpq</var> to discover
        what happened:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3866"></a>
<pre class="SCREEN">
    # lpq -llll
    Printer: lw4@h4  'Hp : Laserwriter'
     Queue: no printable jobs in queue
     Status: subserver pid 27251 starting at 15:34:09.350
     Status: accounting at start at 15:34:09.357
     Status: opening device 'h14.private%9100' at 15:34:09.366
     Status: printing job 'root@h4+223' at 15:34:09.375
     Status: printing data file 'dfA223h4.private', size 3, IF filter 'ifhp' at 15:34:09.376
     Status: IF filter finished at 15:34:35.012
     Status: printing done 'root@h4+223' at 15:34:35.012
     Status: accounting at end at 15:34:35.014
     Status: finished 'root@h4+223', status 'JSUCC' at 15:34:35.014
     Status: subserver pid 27251 exit status 'JSUCC' at 15:34:35.018
     Status: lw4@h4.private: job 'root@h4+223' printed at 15:34:35.020
     Status: job 'root@h4+223' removed at 15:34:35.101
     Filter_status: accounting at start, pagecount 89696, pages 0 at 15:34:13.304
     Filter_status: sending job file at 15:34:13.306
     Filter_status: starting transfer at 15:34:13.306
     Filter_status: initial job type 'text' at 15:34:13.306
     Filter_status: job type 'pcl' at 15:34:13.306
     Filter_status: transferring 3 bytes at 15:34:13.308
     Filter_status: 100 percent done at 15:34:13.308
     Filter_status: finished writing file, cleaning up at 15:34:13.308
     Filter_status: sent job file at 15:34:13.308
     Filter_status: doing cleanup at 15:34:13.308
     Filter_status: getting end using 'pjl job/eoj' at 15:34:13.309
     Filter_status: end of job detected at 15:34:33.219
     Filter_status: getting pagecount using 'pjl info pagecount' at 15:34:33.219
     Filter_status: final pagecount 89697 at 15:34:35.009
     Filter_status: accounting at end, pagecount 89697, pages 1 at 15:34:35.010
     Filter_status: done at 15:34:35.010
</pre>
        </div>
        <br>
        <br>

        <p>As you can see from the <var class="LITERAL">lpq</var>
        output, the <var class="LITERAL">Status</var> section shows
        the <b class="APPLICATION">lpd</b> activities and the <var
        class="SYMBOL">Filter_status</var> section shows what <b
        class="APPLICATION">ifhp</b> is doing. This is the first
        line of defense - make sure that the information and errors
        reported here are for the correct filter.</p>

        <p>If this does not help, then we will start with the basic
        filter tests and work our way <span class="emphasis"><i
        class="EMPHASIS">back</i></span> to the print server.
        First, you will need a couple of test files. If you have a
        PostScript printer, find a simple PostScript file - the <tt
        class="FILENAME">ellipse.ps</tt> file is included in the <b
        class="APPLICATION">ifhp</b> distribution in the <acronym
        class="ACRONYM">UTILS</acronym> directory. You will also
        need a short text file - <tt class=
        "FILENAME">/etc/motd</tt> is usually handy to use.</p>

        <p>Create the <tt class="FILENAME">/tmp/send</tt> file with
        the following contents:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3882"></a>
<pre class="SCREEN">
    #!/bin/sh
    cp /dev/null /tmp/t
    /usr/local/libexec/filters/ifhp -Tdev=/tmp/t,trace,debug=1 &lt;/etc/motd 2&gt;/tmp/trace
</pre>
        </div>
        <br>
        <br>

        <p>This will create the <tt class="FILENAME">/tmp/t</tt>
        file, run the <b class="APPLICATION">ifhp</b> filter, and
        put the trace and debugging information into the <tt class=
        "FILENAME">/tmp/trace</tt> file. Run this command
        using:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3888"></a>
<pre class="SCREEN">
    #!/bin/sh
    sh -x /tmp/send
</pre>
        </div>
        <br>
        <br>

        <p>Examine the output in <tt class=
        "FILENAME">/tmp/trace</tt>. It will look like:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3892"></a>
<pre class="SCREEN">
    ifhp 15:46:14.402 [27307] main: Debug '1'
    ifhp 15:46:14.403 [27307] main: dump &lt;NULL&gt;
    ifhp 15:46:14.403 [27307] main: Model_id '&lt;NULL&gt;'
    ifhp 15:46:14.440 [27307] main: scanning Raw for default, then model '&lt;NULL&gt;'
    ifhp 15:46:14.441 [27307] Select_model_info: id 'default', list-&gt;count 1940, model-&gt;count 0, init 0
    ifhp 15:46:14.448 [27307] Dump_line_list: main: Model information - count 156, max 204, list 0x806e000
    ifhp 15:46:14.448 [27307]   [ 0]='T=dev=/tmp/g,trace,debug=1'
    ifhp 15:46:14.448 [27307]   [ 1]='banner@'
    ifhp 15:46:14.448 [27307]   [ 2]='banner_file=/usr/local/libexec/filters/psbanner.ps'
    ifhp 15:46:14.448 [27307]   [ 3]='converter='
    ifhp 15:46:14.448 [27307]   [ 4]='debug=1'
    ifhp 15:46:14.449 [27307]   [ 5]='default_language=text'
    ifhp 15:46:14.449 [27307]   [ 6]='dev=/tmp/g'
    ifhp 15:46:14.449 [27307]   [ 7]='duplex_select=1'
</pre>
        </div>
        <br>
        <br>

        <p>Most of the information with debug level 1 is simply
        showing the details of options, command execution, and
        error status. This will, however, help with the majority of
        problems.</p>

        <p>You can now modify the <tt class=
        "FILENAME">/tmp/send</tt> file to better reflect your
        printer.</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3897"></a>
<pre class="SCREEN">
    #!/bin/sh
    cp /dev/null /tmp/t
    # substitute your ifhp options here
    ifhp=model=hp4,status@
    /usr/local/libexec/filters/ifhp -Tdev=/tmp/t,trace,debug=1,${ifhp} &lt;/etc/motd 2&gt;/tmp/trace
</pre>
        </div>
        Now run this again and examine the trace and output in <tt
        class="FILENAME">/tmp/t</tt>. If this looks correct, we
        move on to the interactive tests.<br>
        <br>

        <p>If your printer is a network based printer and you are
        using RFC1179 transfers, then you can use the following
        <var class="LITERAL">lpr</var> command to send the <tt
        class="FILENAME">/tmp/t</tt> file directly to the
        printer:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3903"></a>
<pre class="SCREEN">
      lpr -Ppr@host /tmp/t
    Example:
      print queue 'raw'
    
      lpr -Praw@10.1.1.1 /tmp/t
</pre>
        </div>
        <br>
        <br>

        <p>This form of the command causes <var class=
        "LITERAL">lpr</var> to send the job directly to the
        printer. If this works correctly then we know that there is
        no problem with <b class="APPLICATION">ifhp</b> formatting
        the file, and that the problem must be with the <b class=
        "APPLICATION">lpd</b> print spooler.</p>

        <p>If your printer is network based and uses a socket
        connection, then you can have <b class=
        "APPLICATION">ifhp</b> connect to the printer by using the
        <var class="LITERAL">dev=host%port</var> connection option.
        This is only used for testing or when you want to use the
        AppSocket protocol.</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3912"></a>
<pre class="SCREEN">
    #!/bin/sh
    # substitute your ifhp options here
    #  this should always work
    #ifhp=model=hp4,status@
    #  this does status checking, no pagecount
    #ifhp=model=hp4,pagecount@
    #  this does status checking and pagecount
    #ifhp=model=hp4
    /usr/local/libexec/filters/ifhp -Tdev=10.1.1.1%9100,trace,debug=1,${ifhp} &lt;/etc/motd 2&gt;/tmp/trace
</pre>
        </div>
        <br>
        <br>

        <p>If you have a windowing system, run this command from
        one window and in another window use the <tt class=
        "COMMAND">tail -f /tmp/trace</tt> command to view status.
        Most of the time you will discover that the system is
        failing to print because either the <var class=
        "LITERAL">sync</var>, <var class="LITERAL">pagecount</var>,
        or <var class="LITERAL">waitidle</var> step of the printing
        process is not completing correctly. If there is
        insufficient detail for you to decide the failure
        mechanism, set <var class="LITERAL">debug=3</var>, or even
        <var class="LITERAL">debug=4</var> and explore what is
        happening.</p>

        <p>If you have a parallel port connected printer on <tt
        class="FILENAME">/dev/lptxx</tt>, then you can simply use
        <tt class="COMMAND">cat /tmp/t &gt;/dev/lptxx</tt> and see
        what happens. If this works, then use:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3924"></a>
<pre class="SCREEN">
    #!/bin/sh
    # substitute your ifhp options here
    ifhp=model=hp4,status@
    /usr/local/libexec/filters/ifhp -Tdev=/dev/lptxxx,trace,debug=1,${ifhp} &lt;/etc/motd 2&gt;/tmp/trace
</pre>
        </div>
        <br>
        <br>

        <p>If you have a serial port printer, then you can use a
        similar method for setting up a connection. You will need
        to use the undocumented <var class="LITERAL">stty</var>
        option to set the speed and other parameters. These are
        identical to those used by <b class=
        "APPLICATION">LPRng</b>, so you should have no
        problems.</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN3929"></a>
<pre class="SCREEN">
    #!/bin/sh
    # substitute your ifhp options here
    #  this should always work
    #ifhp=model=hp4,status@
    #  this does status checking, no pagecount
    #ifhp=model=hp4,pagecount@
    #  this does status checking and pagecount
    #ifhp="model=hp4,stty= 9600 -parity crtscts raw"
    stty="9600 -parity crtscts raw"
    /usr/local/libexec/filters/ifhp -Tdev=/dev/tty00,trace,debug=1,${ifhp},stty=\"${stty}\" &lt;/etc/motd 2&gt;/tmp/trace
</pre>
        </div>
        <br>
        <br>

        <p>If all this does not help, then subscribe to the <b
        class="APPLICATION">LPRng</b> mailing list and ask for
        help.</p>
      </div>

      <div class="APPENDIX">
        <hr>

        <h1><a name="IFHPOPTIONS"></a>Appendix A. Index to
        Options</h1>

        <p>&#13;</p>

        <div class="TABLE">
          <a name="IFHPOPTIONSTABLE"></a>

          <p><b>Table A-1. <var class="LITERAL">ifhp.conf</var> -
          ifhp Options</b></p>

          <table border="1" frame="border" rules="all" class=
          "CALSTABLE">
            <col>
            <col>

            <thead>
              <tr>
                <th>Option</th>

                <th>Purpose</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td><a href="#MODELSELECTION"><var class=
                "LITERAL">default</var></a></td>

                <td>HP 4M Plus, PostScript, PJL, PCL, status,
                pagecount support</td>
              </tr>

              <tr>
                <td><a href="#APPSOCKET"><var class=
                "LITERAL">appsocket FLAG</var></a></td>

                <td>Use Tektronix AppSocket Protocol</td>
              </tr>

              <tr>
                <td><a href="#CONFIG"><var class=
                "LITERAL">config=PATHNAMES</var></a></td>

                <td>Configuration file pathnames</td>
              </tr>

              <tr>
                <td><a href="#CRLF"><var class="LITERAL">crlf
                FLAG</var></a></td>

                <td>Do LF to CRLF translation</td>
              </tr>

              <tr>
                <td><a href="#CONFIG"><var class="LITERAL">debug
                FLAG</var></a></td>

                <td>Debugging level</td>
              </tr>

              <tr>
                <td><a href="#CONVERSION"><var class=
                "LITERAL">default_language=LANGUAGE</var></a></td>

                <td>Default job file language (ps, pcl, raw, text,
                etc)</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">endpage=NNN</var></a></td>

                <td>PJL JOB command END = NNN value</td>
              </tr>

              <tr>
                <td><a href="#FILECONVERSION"><var class=
                "LITERAL">forceconversion FLAG</var></a></td>

                <td>Force conversion using UNIX file(1)
                utility</td>
              </tr>

              <tr>
                <td><a href="#CONVERSION"><var class=
                "LITERAL">file_output_match=LIST</var></a></td>

                <td>File type and conversion matching</td>
              </tr>

              <tr>
                <td><a href="#FILE-UTIL-PATH"><var class=
                "LITERAL">file_util_path=PATHNAME</var></a></td>

                <td>Pathname of the UNIX file(1) utility</td>
              </tr>

              <tr>
                <td><a href="#CONVERSION"><var class=
                "LITERAL">language=LANGUAGE</var></a></td>

                <td>Specify job file language to be used (ps, pcl,
                raw, text, etc)</td>
              </tr>

              <tr>
                <td><a href="#FILETRANSFER"><var class=
                "LITERAL">logall FLAG</var></a></td>

                <td>Log all status reports from printer if set</td>
              </tr>

              <tr>
                <td><a href="#NULLPAD"><var class=
                "LITERAL">nullpad=COUNT</var></a></td>

                <td>Send COUNT nulls to force full buffer
                condition</td>
              </tr>

              <tr>
                <td><a href="#OPTIONS"><var class=
                "LITERAL">model=NAME</var></a></td>

                <td>Specify model name for configuration
                selection</td>
              </tr>

              <tr>
                <td><a href="#OPTIONS"><var class=
                "LITERAL">model_from_option=X</var></a></td>

                <td>Specify model name using a command line option
                value</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class=
                "LITERAL">pagecount=LANGUAGE</var></a></td>

                <td>Get pagecount using pjl, ps or default</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class=
                "LITERAL">pagecount_interval=SECONDS</var></a></td>

                <td>Send pagecount command at SECONDS interval</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class=
                "LITERAL">pagecount_ps_code=STRING</var></a></td>

                <td>PostScript code to get pagecount
                information</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class=
                "LITERAL">pagecount_timeout=SECONDS</var></a></td>

                <td>Timeout getting pagecount after SECONDS</td>
              </tr>

              <tr>
                <td><a href="#LANGUAGES"><var class="LITERAL">pcl
                FLAG</var></a></td>

                <td>Printer supports PCL if set</td>
              </tr>

              <tr>
                <td><a href="#PCL-EOJ-AT-START"><var class=
                "LITERAL">pcl_eoj_at_start FLAG</var></a></td>

                <td>PCL EOJ (CTRL-D) at start of job</td>
              </tr>

              <tr>
                <td><a href="#LANGUAGEINIT"><var class=
                "LITERAL">pcl_init=LIST</var></a></td>

                <td>PCL initializations to be done</td>
              </tr>

              <tr>
                <td><a href="#PCL-USER-OPTS"><var class=
                "LITERAL">pcl_user_opts=LIST</var></a></td>

                <td>User PCL options supported</td>
              </tr>

              <tr>
                <td><a href="#LANGUAGES"><var class="LITERAL">pjl
                FLAG</var></a></td>

                <td>Printer supports PJL if set</td>
              </tr>

              <tr>
                <td><a href="#FILETRANSFER"><var class=
                "LITERAL">pjl_alert_codes=LIST</var></a></td>

                <td>alert operator on these PJL error codes</td>
              </tr>

              <tr>
                <td><a href="#FILETRANSFER"><var class=
                "LITERAL">pjl_alert_handler=STRING</var></a></td>

                <td>program to alert operator on PJL error</td>
              </tr>

              <tr>
                <td><a href="#PJL-CONSOLE"><var class=
                "LITERAL">pjl_console FLAG</var></a></td>

                <td>Printer supports messages on console</td>
              </tr>

              <tr>
                <td><a href="#FILETRANSFER"><var class=
                "LITERAL">pjl_error_codes=LIST</var></a></td>

                <td>PJL error messages for error codes</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">pjl_except=LIST</var></a></td>

                <td>Do not allow these PJL commands</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">pjl_init=LIST</var></a></td>

                <td>PJL initializations to be done</td>
              </tr>

              <tr>
                <td><a href="#PJL-JOB"><var class="LITERAL">pjl_job
                FLAG</var></a></td>

                <td>PJL JOB and EOJ supported</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">pjl_only=LIST</var></a></td>

                <td>Allow only these PJL commands</td>
              </tr>

              <tr>
                <td><a href="#FILETRANSFER"><var class=
                "LITERAL">pjl_quiet_codes=LIST</var></a></td>

                <td>ignore these PJL error codes</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">pjl_user_opts=LIST</var></a></td>

                <td>Allow only these user PJL commands or variables
                to be set</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">pjl_vars_except=LIST</var></a></td>

                <td>Do not allow these PJL variables to be set</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">pjl_vars_set=LIST</var></a></td>

                <td>Allow these PJL variables to be set</td>
              </tr>

              <tr>
                <td><a href="#LANGUAGES"><var class="LITERAL">ps
                FLAG</var></a></td>

                <td>Printer supports PostScript (ps)</td>
              </tr>

              <tr>
                <td><a href="#PS-EOJ-AT-START"><var class=
                "LITERAL">ps_eoj_at_start FLAG</var></a></td>

                <td>PostScript EOJ (CTRL-D) at start of job</td>
              </tr>

              <tr>
                <td><a href="#LANGUAGEINIT"><var class=
                "LITERAL">ps_init=LIST</var></a></td>

                <td>PS initializations to be done</td>
              </tr>

              <tr>
                <td><a href="#PS-USER-OPTS"><var class=
                "LITERAL">ps_user_opts=LIST</var></a></td>

                <td>Support these PostScript user options</td>
              </tr>

              <tr>
                <td><a href="#REMOVE-CTRL"><var class=
                "LITERAL">remove_ctrl=LIST</var></a></td>

                <td>Remove these characters from PostScript
                jobs</td>
              </tr>

              <tr>
                <td><a href="#REMOVE-PJL-AT-START"><var class=
                "LITERAL">remove_pjl_at_start FLAG</var></a></td>

                <td>Remove PJL commands from begining of job</td>
              </tr>

              <tr>
                <td><a href="#PJLINIT"><var class=
                "LITERAL">startpage=NNN</var></a></td>

                <td>PJL JOB command START = NNN value</td>
              </tr>

              <tr>
                <td><a href="#RWTIMEOUT"><var class=
                "LITERAL">send_job_rw_timeout=NNN</var></a></td>

                <td>Timeout for non-responding printer</td>
              </tr>

              <tr>
                <td><a href="#STATUS"><var class="LITERAL">status
                FLAG</var></a></td>

                <td>Printer supplies status information</td>
              </tr>

              <tr>
                <td><a href="#STATUSFILE"><var class=
                "LITERAL">statusfile=PATHNAME</var></a></td>

                <td>Status file pathname</td>
              </tr>

              <tr>
                <td><a href="#STATUSFILE"><var class=
                "LITERAL">statusfile_max=NNN</var></a></td>

                <td>Status file has maximum size of NNN Kbytes</td>
              </tr>

              <tr>
                <td><a href="#STATUSFILE"><var class=
                "LITERAL">statusfile_min=NNN</var></a></td>

                <td>Status file has truncated size of NNN
                Kbytes</td>
              </tr>

              <tr>
                <td><a href="#STATUSFILE"><var class=
                "LITERAL">summaryfile=PATHNAME</var></a></td>

                <td>Summary file pathname</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class="LITERAL">sync
                FLAG</var></a></td>

                <td>Synchronize printer if set</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class=
                "LITERAL">sync_interval=SECONDS</var></a></td>

                <td>Send synchronization request at SECONDS
                interval</td>
              </tr>

              <tr>
                <td><a href="#SYNCPAGE"><var class=
                "LITERAL">sync_timeout=SECONDS</var></a></td>

                <td>Timeout synchronization request after
                SECONDS</td>
              </tr>

              <tr>
                <td><a href="#TBCP"><var class="LITERAL">tbcp
                FLAG</var></a></td>

                <td>Use Transparent Binary Communications Protocol
                for PostScript files</td>
              </tr>

              <tr>
                <td><a href="#LANGUAGES"><var class="LITERAL">text
                FLAG</var></a></td>

                <td>Printer supports text mode</td>
              </tr>

              <tr>
                <td><a href="#CONFIG"><var class="LITERAL">trace
                FLAG</var></a></td>

                <td>Put error and trace messages on STDERR if
                set</td>
              </tr>

              <tr>
                <td><a href="#WAITEND"><var class=
                "LITERAL">waitend=METHOD</var></a></td>

                <td>How to wait for printer to end printing</td>
              </tr>

              <tr>
                <td><a href="#WAITEND"><var class=
                "LITERAL">waitend_interval=SECONDS</var></a></td>

                <td>How often to query printer for end of
                printing</td>
              </tr>

              <tr>
                <td><a href="#WAITEND"><var class=
                "LITERAL">waitend_ctrl_t_interval=SECONDS</var></a></td>

                <td>How often to send CTRL-T for end of printing
                status</td>
              </tr>
            </tbody>
          </table>
        </div>
        &#13;<br>
        <br>
      </div>

      <div class="APPENDIX">
        <hr>

        <h1><a name="AEN4236"></a>Appendix B. HP JetDirect Card
        Support</h1>

        <p>The HPJetDirect card or external JetDirect box can be
        configured through the printer front panel or through a set
        of network files. Here is a summary of the methods used
        from UNIX systems, or when you are desperate, to configure
        the printer.</p>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN4239">B.1. MicroSoft
          JetDirect Support</a></h2>

          <p>There is limited support from HP for non-MicroSoft
          configuration tools. However, the tools that are provided
          are simple and easy to use, especially for the initial
          configuration.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN4242">B.2. TCP/IP
          Address</a></h2>

          <p>You can set the TCP/IP address from the front panel.
          Reset the printer and then use the MENU, +-, SELECT keys
          as follows:</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN4245"></a>
<pre class="SCREEN">
     MENU  -&gt; MIO MENU (use MENU to display MIO MENU)
     ITEM  -&gt; CFG NETWORK=NO*
     +     -&gt; CFG NETWORK=YES
     ENTER -&gt; CFG NETWORK=YES*
     ITEM  -&gt; TCP/IP=OFF* (use ITEM to display TCP/IP)
     +     -&gt; TCP/IP=ON
     ENTER -&gt; TCP/IP=ON*
     ITEM  -&gt; CFG TCP/IP=NO* (use ITEM to display TCP/IP)
     +     -&gt; CFG TCP/IP=YES
     ENTER -&gt; CFG TCP/IP=YES*
     ITEM  -&gt; BOOTP=NO*
         (Enable BOOTP if you want to - see below)
     ITEM  -&gt; IP BYTE 1=0*
         This is IP address MSB byte.
         Use +- keys to change value, and then ENTER to change
         Use ITEM keys to get IP BYTE=2,3,4
     ITEM  -&gt; SM BYTE 1=255*
          This is the subnet mask value
         Use +- keys to change value, and then ENTER to change
         Use ITEM keys to get IP BYTE=2,3,4
     ITEM  -&gt; LG BYTE 1=255*
         This is the Syslog server (LoGger) IP address
         Use +- keys to change value, and then ENTER to change
         Use ITEM keys to get IP BYTE=2,3,4
     ITEM  -&gt; GW BYTE 1=255*
         This is the subnet gateway (router) IP address
         Use +- keys to change value, and then ENTER to change
         Use ITEM keys to get IP BYTE=2,3,4
     ITEM  -&gt; TIMEOUT=90
          This is the connection timeout value.  It puts a limit
         on time between connections.  A value of 10 is reasonable.
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN4247">B.3. Web Server
          Configuration</a></h2>

          <p>Many of the newer releases of HP JetDirect firmware
          have a Web Server configuration capability.
          Unfortunately, the web pages assume that you have
          JavaScript support for the browser, and not all of the
          facilities used are supported by all browsers. However
          the configuration information and pages presented are
          extremely simple to use and understand.</p>

          <p>The major problem with the Web Server configuration is
          that not all of the options can be set through the Web
          Server pages.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN4251">B.4. Telnet
          Configuration</a></h2>

          <p>Once you have assigned an IP address to the JetDirect
          Box you can telnet to the box and configure it through a
          simple command line interface. When you first connect to
          the box, hit <var class="LITERAL">RETURN</var> a couple
          of times, followed by <var class="LITERAL">?</var>
          (Question Mark) <var class="LITERAL">RETURN</var> and you
          should get a simple help menu. This help information
          usually scrolls off a small (25 line) screen so a buffer
          that allows you to see all of the information is
          advisable.</p>

          <p>The major problem with the telnet configuration is
          that not all of the options can be set through the
          command line facilties.</p>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN4258">B.5. BOOTP
          Information</a></h2>

          <p>If you have a bootp server, you can put this
          information in the bootptab file. To use this, you must
          enable the bootp option on the printer. The T144 option
          specifies a file to be read from the bootp server. This
          file is read by using the TFTP protocol, and you must
          have a TFTPD server enabled. Here is a sample bootptab
          entry.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN4261"></a>
<pre class="SCREEN">
    # Example /etc/bootptab: database for bootp server (/etc/bootpd).
    # Blank lines and lines beginning with '#' are ignored.
    #
    # Legend:
    #
    #       first field -- hostname
    #                       (may be full domain name)
    #
    #       hd -- home directory
    #       bf -- bootfile
    #       cs -- cookie servers
    #       ds -- domain name servers
    #       gw -- gateways
    #       ha -- hardware address
    #       ht -- hardware type
    #       im -- impress servers
    #       ip -- host IP address
    #       lg -- log servers
    #       lp -- LPR servers
    #       ns -- IEN-116 name servers
    #       rl -- resource location protocol servers
    #       sm -- subnet mask
    #       tc -- template host (points to similar host entry)
    #       to -- time offset (seconds)
    #       ts -- time servers
    #
    # Be careful about including backslashes where they're needed.  Weird (bad)
    # things can happen when a backslash is omitted where one is intended.
    #
    peripheral1:
    :hn:ht=ether:vm=rfc1048:
    :ha=08000903212F:
    :ip=190.40.101.22:
    :sm=255.255.255.0:
    :gw=190.40.101.1:
    :lg=190.40.101.3:
    :T144="hpnp/peripheral1.cfg":
</pre>
          </div>
          <br>
          <br>

          <p>If you are using the T144 option, you will need to
          create the configuration file. The sample configuration
          file from the HP Direct distribution is included
          below.</p>

          <div class="INFORMALEXAMPLE">
            <a name="AEN4264"></a>
<pre class="SCREEN">
    #
    # Example HP Network Peripheral Interface configuration file
    #
    # Comments begin with '#' and end at the end of the line.
    # Blank lines are ignored.  Entries cannot span lines.
    
    # Name is the peripheral (or node) name.  It is displayed on the peripheral's
    # self-test page or configuration plot, and when sysName is obtained through
    # SNMP.  This name can be provided in the BOOTP response or can be specified
    # in the NPI configuration file to prevent the BOOTP response from overflowing
    # the packet.  The domain portion of the name is not necessary because the
    # peripheral does not perform Domain Name System (DNS) searches.  Name is
    # limited to 64 characters.
    
    name: picasso
    
    # Location describes the physical location of the peripheral.  This is the
    # value used by the interface for the MIB-II sysLocation object.  The default
    # location is undefined.  Only printable ASCII characters are allowed.
    # Maximum length is 64 characters.
    
    location: 1st floor, south wall
    
    # Contact is the name of the person who administers or services the peripheral
    # and may include how to contact this person.  It is limited to 64 characters.
    # This is the value used by the interface for the MIB-II sysContact object.
    # The default contact is undefined.  Only printable ASCII characters are
    # allowed.  Maximum length is 64 characters.
    
    contact: Phil, ext 1234
    
    # The host access list contains the list of hosts or networks of hosts
    # that are allowed to connect to the peripheral.  The format is
    # "allow: netnum [mask]", where netnum is a network number or a host IP
    # address.  Mask is an address mask of bits to apply to the network number
    # and connecting host's IP address to verify access to the peripheral.
    # The mask usually matches the network or subnet mask, but this is not
    # required.  If netnum is a host IP address, the mask 255.255.255.255 can
    # be omitted.  Up to ten access list entries are permitted.
    
    # to allow all of network 10 to access the peripheral:
    allow: 10.0.0.0  255.0.0.0
    
    # to allow a single host without specifying the mask:
    allow: 15.1.2.3
    
    # Idle timeout is the time (in seconds) after which an idle
    # print data connection is closed.  A value of zero disables
    # the timeout mechanism.  The default timeout is 90 seconds.
    
    idle-timeout: 120
    
    # A community name is a password that allows SNMP access to MIB values on
    # the network peripheral.  Community names are not highly secure; they are
    # not encrypted across the network.  The get community name determines which
    # SNMP GetRequests are responded to.  By default, the network peripheral
    # responds to all GetRequests.  The get community name is limited to 32
    # characters.
    #
    # For hpnpstat and hpnpadmin, the community name can be stored in
    # /usr/lib/hpnp/hpnpsnmp.
    
    get-community-name: blue
    
    # The set community name is similar to the get community name.  The set
    # community name determines which SNMP SetRequests are responded to.  In
    # addition, SetRequests are only honored if the sending host is on the
    # host access list.  By default, the network peripheral does not respond
    # to any SetRequests.  The set community name is limited to 32 characters.
    #
    # The set community name can come from /usr/lib/hpnp/hpnpsnmp
    # if it is the same as the get community name.  We recommend that the
    # set community name be different from the get community name though.
    
    set-community-name: yellow
    
    # SNMP traps are asynchronous notifications of some event that has occurred.
    # SNMP traps are useful only with network management software.  Traps are
    # sent to specific hosts and include a trap community name.  Up to four
    # hosts can be sent SNMP traps.   The trap community name is limited to
    # 32 characters.  The default name is public.
    
    trap-community-name: red
    
    # The SNMP trap destination list specifies systems to which SNMP
    # traps are sent.  Up to four IP addresses are allowed.  If no
    # trap destinations are listed, traps are not sent.
    
    trap-dest: 15.1.2.3
    trap-dest: 15.2.3.4
    
    # The SNMP authentication trap parameter enables or disables the sending
    # of SNMP authentication traps.  Authentication traps indicate that an SNMP
    # request was received and the community name check failed.  By default,
    # the parameter is off.
    
    authentication-trap: on
    
    # The syslog-facility parameter sets the source facility identifier that the
    # card uses when issuing syslog messages.  Other facilities, for example,
    # include the kernel (LOG_KERN), the mail system (LOG_MAIL), and the spooling
    # system (LOG_LPR).  The card only allows its syslog facility to be configured
    # to one of the local user values (LOG_LOCAL0 through LOG_LOCAL7).  The
    # selectable option strings, local0 through local7 (configured to LOG_LOCAL0
    # through LOG_LOCAL7, respectively) are case insensitive.  The default
    # syslog-facility for the card is LOG_LPR.
    
    syslog-facility: local2
    
    # This parameter allows the card to treat hosts on other subnets as if the
    # hosts were on the card's subnet.  This parameter determines the TCP
    # Maximum Segment Size (MSS) advertised by the card to hosts on other subnets
    # and affects the card's initial receive-window size.  The card will use a
    # TCP MSS of 1460 bytes for local hosts, and 536 bytes for a non-local host.
    # The default is off, that is, the card will use the maximum packet sizes
    # only on the card's configured subnet.
    #
    # The configuration utility does not allow access to this parameter.  If you
    # want to configure it, you must manually edit the NPI configuration file
    # and add it to the bottom of the entry for the network peripheral.
    
    subnets-local: on
    
    # This parameter affects how the card handles TCP connection requests from
    # the host.  By default, the JetDirect MPS card will accept a TCP connection
    # even if the peripheral is off-line.  If this parameter is set to "on", then
    # the card will only accept a TCP connection when the peripheral is on-line.
    
    old-idle-mode: off
</pre>
          </div>
          <br>
          <br>
        </div>

        <div class="SECT1">
          <hr>

          <h2 class="SECT1"><a name="AEN4266">B.6.
          Timeouts</a></h2>

          <p>You should be aware that the <var class=
          "LITERAL">idle-timeout</var> value in the configuration
          file will override the value entered on the control panel
          of the printer.</p>

          <p>Also, the <var class="LITERAL">@PJL SET TIMEOUT =
          NNN</var> command will override this value as well.</p>
        </div>
      </div>
    </div>
    <hr>
  </body>
</html>