1postio(1) User Commands postio(1)
2
3
4
6 postio - serial interface for PostScript printers
7
9 postio -l line [-D] [-i] [-q] [-t] [-S] [-b speed] [-B num]
10 [-L file] [-P string] [-R num] [file]...
11
12
13 /usr/lib/lp/postscript/postio
14
15
17 postio sends files to the PostScript printer attached to line. If no
18 files are specified the standard input is sent.
19
21 The first group of options should be sufficient for most applications:
22
23 -D Enable debug mode. Guarantees that everything read on line
24 will be added to the log file (standard error by default).
25
26
27 -q Prevents status queries while files are being sent to the
28 printer. When status queries are disabled a dummy message
29 is appended to the log file before each block is transmit‐
30 ted.
31
32
33 -b speed Transmit data over line at baud rate speed. Recognized
34 baud rates are 1200, 2400, 4800, 9600, and 19200. The
35 default speed is 9600 baud.
36
37
38 -B num Set the internal buffer size for reading and writing files
39 to num bytes. By default num is 2048 bytes.
40
41
42 -l line Connect to the printer attached to line. In most cases
43 there is no default and postio must be able to read and
44 write line. If the line does not begin with a / it may be
45 treated as a Datakit destination.
46
47
48 -L file Data received on line gets put in file. The default log
49 file is standard error. Printer or status messages that
50 don't show a change in state are not normally written to
51 file but can be forced out using the -D option.
52
53
54 -P string Send string to the printer before any of the input files.
55 The default string is simple PostScript code that disables
56 timeouts.
57
58
59 -R num Run postio as a single process if num is 1 or as separate
60 read and write processes if num is 2. By default postio
61 runs as a single process.
62
63
64
65 The next two options are provided for users who expect to run postio on
66 their own. Neither is suitable for use in spooler interface programs:
67
68 -i Run the program in interactive mode. Any files are sent first and
69 followed by the standard input. Forces separate read and write
70 processes and overrides many other options. To exit interactive
71 mode use your interrupt or quit character. To get a friendly
72 interactive connection with the printer type executive on a line
73 by itself.
74
75
76 -t Data received on line and not recognized as printer or status
77 information is written to the standard output. Forces separate
78 read and write processes. Convenient if you have a PostScript
79 program that will be returning useful data to the host.
80
81
82
83 The last option is not generally recommended and should only be used if
84 all else fails to provide a reliable connection:
85
86 -S Slow the transmission of data to the printer. Severely limits
87 throughput, runs as a single process, disables the -q option,
88 limits the internal buffer size to 1024 bytes, can use an exces‐
89 sive amount of CPU time, and does nothing in interactive mode.
90
91
92
93 The best performance will usually be obtained by using a large internal
94 buffer (the -B option) and by running the program as separate read and
95 write processes (the -R 2 option). Inability to fork the additional
96 process causes postio to continue as a single read/write process. When
97 one process is used, only data sent to the printer is flow controlled.
98
99
100 The options are not all mutually exclusive. The -i option always wins,
101 selecting its own settings for whatever is needed to run interactive
102 mode, independent of anything else found on the command line. Interac‐
103 tive mode runs as separate read and write processes and few of the
104 other options accomplish anything in the presence of the -i option. The
105 -t option needs a reliable two way connection to the printer and
106 therefore tries to force separate read and write processes. The -S
107 option relies on the status query mechanism, so -q is disabled and the
108 program runs as a single process.
109
110
111 In most cases postio starts by making a connection to line and then
112 attempts to force the printer into the IDLE state by sending an appro‐
113 priate sequence of ^T (status query), ^C (interrupt), and ^D (end of
114 job) characters. When the printer goes IDLE, files are transmitted
115 along with an occasional ^T (unless the -q option was used). After all
116 the files are sent the program waits until it's reasonably sure the job
117 is complete. Printer generated error messages received at any time
118 except while establishing the initial connection (or when running
119 interactive mode) cause postio to exit with a non-zero status. In
120 addition to being added to the log file, printer error messages are
121 also echoed to standard error.
122
124 Example 1 Examples of the postio command.
125
126
127 Run as a single process at 9600 baud and send file1 and file2 to the
128 printer attached to /dev/tty01:
129
130
131 example% postio -l /dev/tty01 file1 file2
132
133
134
135
136 Same as above except two processes are used, the internal buffer is set
137 to 4096 bytes, and data returned by the printer gets put in file log:
138
139
140 example% postio -R 2 -B 4096 -l/dev/tty01 -L log file1 file2
141
142
143
144
145 Establish an interactive connection with the printer at Datakit desti‐
146 nation my/printer:
147
148
149 example% postio -i -l my/printer
150
151
152
153
154 Send file program to the printer connected to /dev/tty22, recover any
155 data in file results, and put log messages in file log:
156
157
158 example% postio -t -l /dev/tty22 -L log program >results
159
160
161
163 The following exit values are returned:
164
165 0 Successful completion.
166
167
168 non-zero An error occurred.
169
170
172 See attributes(5) for descriptions of the following attributes:
173
174
175
176
177 ┌─────────────────────────────┬─────────────────────────────┐
178 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
179 ├─────────────────────────────┼─────────────────────────────┤
180 │Availability │SUNWpsf │
181 └─────────────────────────────┴─────────────────────────────┘
182
184 download(1), dpost(1), postdaisy(1), postdmd(1), postmd(1), post‐
185 print(1), postreverse(1), posttek(1), attributes(5)
186
188 The input files are handled as a single PostScript job. Sending several
189 different jobs, each with their own internal end of job mark (^D) is
190 not guaranteed to work properly. postio may quit before all the jobs
191 have completed and could be restarted before the last one finishes.
192
193
194 All the capabilities described above may not be available on every
195 machine or even across the different versions of the UNIX system that
196 are currently supported by the program.
197
198
199 There may be no default line, so using the -l option is strongly rec‐
200 ommended. If omitted, postio may attempt to connect to the printer
201 using the standard output. If Datakit is involved, the -b option may
202 be ineffective and attempts by postio to impose flow control over data
203 in both directions may not work. The -q option can help if the printer
204 is connected to RADIAN. The -S option is not generally recommended and
205 should be used only if all other attempts to establish a reliable con‐
206 nection fail.
207
208
209
210SunOS 5.11 9 Sep 1996 postio(1)