]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/man-ipptoolfile.html
Merge pull request #1330 from weblate/weblate-cups-cups
[thirdparty/cups.git] / doc / help / man-ipptoolfile.html
CommitLineData
cc7359ae 1<!DOCTYPE html>
a2326b5b 2<html>
cc7359ae 3 <head>
4e3aaa5e 4 <meta name="creator" content="mantohtml v2.0.2">
cc7359ae
MS
5 <title>ipptoolfile(5)</title>
6 </head>
7 <body>
8 <h1 id="ipptoolfile-5">ipptoolfile(5)</h1>
9 <h2 id="ipptoolfile-5.name">Name</h2>
10<p>ipptoolfile - ipptool file format
11</p>
12 <h2 id="ipptoolfile-5.description">Description</h2>
13<p>The
4e3aaa5e 14<a href="ipptool.html"><strong>ipptool</strong>(1)</a>
cc7359ae 15
f1dd3a39 16program accepts free-form plain text files that describe one or more IPP requests.
cc7359ae 17Comments start with the &quot;#&quot; character and continue to the end of the line.
f1dd3a39 18Each request is enclosed by curly braces, for example:
cc7359ae
MS
19</p>
20 <pre>
a2326b5b
MS
21 # This is a comment
22 {
23 # The name of the test
cc7359ae 24 NAME &quot;Print PDF File&quot;
a2326b5b
MS
25
26 # The request to send
27 OPERATION Print-Job
f1dd3a39 28
a2326b5b
MS
29 GROUP operation-attributes-tag
30 ATTR charset attributes-charset utf-8
31 ATTR language attributes-natural-language en
32 ATTR uri printer-uri $uri
33 ATTR name requesting-user-name $user
f1dd3a39
MS
34 ATTR mimeMediaType document-format application/pdf
35
36 GROUP job-attributes-tag
37 ATTR collection media-col {
cc7359ae 38 # US Letter plain paper from the &quot;main&quot; tray
f1dd3a39
MS
39 MEMBER collection media-size {
40 MEMBER integer x-dimension 21590
41 MEMBER integer y-dimension 27940
42 }
43 MEMBER integer media-top-margin 423
44 MEMBER integer media-bottom-margin 423
45 MEMBER integer media-left-margin 423
46 MEMBER integer media-right-margin 423
cc7359ae
MS
47 MEMBER keyword media-source &quot;main&quot;
48 MEMBER keyword media-type &quot;stationery&quot;
f1dd3a39
MS
49 }
50
51 FILE testfile.pdf
a2326b5b
MS
52
53 # The response to expect
54 STATUS successful-ok
6b13fa61 55 EXPECT job-id OF-TYPE integer WITH-VALUE >0
a2326b5b
MS
56 EXPECT job-uri OF-TYPE uri
57 }
58 {
59 # The name of the test
cc7359ae 60 NAME &quot;Wait for Job to Complete&quot;
a2326b5b
MS
61
62 # The request to send
63 OPERATION Get-Job-Attributes
f1dd3a39 64
a2326b5b
MS
65 GROUP operation-attributes-tag
66 ATTR charset attributes-charset utf-8
67 ATTR language attributes-natural-language en
68 ATTR uri printer-uri $uri
69 ATTR integer job-id $job-id
70 ATTR name requesting-user-name $user
71
72 # The response to expect
73 STATUS successful-ok
6b13fa61 74 EXPECT job-id OF-TYPE integer WITH-VALUE $job-id
a2326b5b 75 EXPECT job-uri OF-TYPE uri
f1dd3a39 76 EXPECT job-state OF-TYPE enum WITH-VALUE >5 REPEAT-NO-MATCH
cc7359ae 77 EXPECT job-originating-user-name OF-TYPE name WITH-VALUE &quot;$user&quot;
f1dd3a39
MS
78
79 # Show the job state until completed...
80 DISPLAY job-state
81 DISPLAY job-state-reasons
a2326b5b
MS
82 }
83</pre>
cc7359ae
MS
84 <h3 id="ipptoolfile-5.description.top-level-directives">Top-Level Directives</h3>
85<p>The following directives can be used outside of a <em>test</em>:
86</p>
87 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>{ </strong><em>test </em><strong>}</strong><br>
88Defines a test.
89</p>
90 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE </strong><em>variable-name value</em><br>
91Defines the named variable to the given value. This is equivalent to specifying <em>-d variable-name=value</em> on the
92<strong>ipptool</strong>(8)
93
6b13fa61 94command-line.
cc7359ae
MS
95</p>
96 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE-DEFAULT </strong><em>variable-name value</em><br>
97Defines the named variable to the given value if it does not already have a value.
98</p>
99 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>FILE-ID &quot;</strong><em>identifier</em><strong>&quot;</strong><br>
100Specifies an identifier string for the current file.
101</p>
102 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IGNORE-ERRORS yes</strong><br>
103</p>
104 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IGNORE-ERRORS no</strong><br>
105Specifies whether, by default,
106<strong>ipptool</strong>(8)
107
6b13fa61 108will ignore errors and continue with subsequent tests.
cc7359ae
MS
109</p>
110 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>INCLUDE &quot;</strong><em>filename</em><strong>&quot;</strong><br>
111</p>
112 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>INCLUDE &lt;</strong><em>filename</em><strong>></strong><br>
113Includes another test file. The first form includes a file relative to the current test file, while the second form includes a file from the
114<strong>ipptool</strong>(8)
115
6b13fa61 116include directory.
cc7359ae
MS
117</p>
118 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>INCLUDE-IF-DEFINED </strong><em>name </em><strong>&quot;</strong><em>filename</em><strong>&quot;</strong><br>
119</p>
120 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>INCLUDE-IF-DEFINED </strong><em>name </em><strong>&lt;</strong><em>filename</em><strong>></strong><br>
121Includes another test file if the named variable is defined. The first form includes a file relative to the current test file, while the second form includes a file from the
122<strong>ipptool</strong>(8)
123
a2326b5b 124include directory.
cc7359ae
MS
125</p>
126 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>INCLUDE-IF-NOT-DEFINED </strong><em>name </em><strong>&quot;</strong><em>filename</em><strong>&quot;</strong><br>
127</p>
128 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>INCLUDE-IF-NOT-DEFINED </strong><em>name </em><strong>&lt;</strong><em>filename</em><strong>></strong><br>
129Includes another test file if the named variable is not defined. The first form includes a file relative to the current test file, while the second form includes a file from the
130<strong>ipptool</strong>(8)
131
6b13fa61 132include directory.
cc7359ae
MS
133</p>
134 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SKIP-IF-DEFINED </strong><em>variable-name</em><br>
135</p>
136 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SKIP-IF-NOT-DEFINED </strong><em>variable-name</em><br>
137Specifies that the remainder of the test file should be skipped when the variable is or is not defined.
138</p>
139 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>STOP-AFTER-INCLUDE-ERROR no</strong><br>
140</p>
141 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>STOP-AFTER-INCLUDE-ERROR yes</strong><br>
142Specifies whether tests will be stopped after an error in an included file.
143</p>
144 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TRANSFER auto</strong><br>
145Specifies that tests will, by default, use &quot;Transfer-Encoding: chunked&quot; for requests with attached files and &quot;Content-Length:&quot; for requests without attached files.
146</p>
147 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TRANSFER chunked</strong><br>
148Specifies that tests will, by default, use the HTTP/1.1 &quot;Transfer-Encoding: chunked&quot; header. This is the default and is equivalent to specifying <em>-c</em> on the
149<strong>ipptool</strong>(8)
150
6b13fa61 151command-line. Support for chunked requests is required for conformance with all versions of IPP.
cc7359ae
MS
152</p>
153 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TRANSFER length</strong><br>
154Specifies that tests will, by default, use the HTTP/1.0 &quot;Content-Length:&quot; header. This is equivalent to specifying <em>-l</em> on the
155<strong>ipptool</strong>(8)
156
6b13fa61 157command-line. Support for content length requests is required for conformance with all versions of IPP.
cc7359ae
MS
158</p>
159 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 1.0</strong><br>
160</p>
161 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 1.1</strong><br>
162</p>
163 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 2.0</strong><br>
164</p>
165 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 2.1</strong><br>
166</p>
167 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 2.2</strong><br>
168Specifies the default IPP version number to use for the tests that follow.
169</p>
170 <h3 id="ipptoolfile-5.description.test-directives">Test Directives</h3>
171<p>The following directives are understood within a <em>test</em>:
172</p>
173 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ATTR </strong><em>out-of-band-tag attribute-name</em><br>
174</p>
2dad30d9
MS
175 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ATTR </strong><em>tag attribute-name value[,...,value]</em><br>
176</p>
177 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ATTR </strong><em>tag attribute-name &quot;value&quot;[,...,&quot;value&quot;]</em><br>
178</p>
179 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ATTR </strong><em>tag attribute-name &lt;hex-value>[,...,&lt;hex-value>]</em><br>
cc7359ae 180Adds an attribute to the test request.
345e10ca 181Out-of-band tags (admin-define, delete-attribute, no-value, not-settable, unknown, unsupported) have no value.
cc7359ae 182Values for other tags are delimited by the comma (&quot;,&quot;) character - escape commas using the &quot;\&quot; character.
f1dd3a39 183Common attributes and values are listed in the IANA IPP registry - see references below.
cc7359ae
MS
184</p>
185 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ATTR collection </strong><em>attribute-name </em><strong>{ MEMBER </strong><em>tag member-name value(s) ... </em><strong>}</strong> [ <em>... </em><strong>,{ </strong><em>... </em><strong>} </strong>]<br>
186Adds a collection attribute to the test request.
f1dd3a39
MS
187Member attributes follow the same syntax as regular attributes and can themselves be nested collections.
188Multiple collection values can be supplied as needed, separated by commas.
cc7359ae
MS
189</p>
190 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COMPRESSION deflate</strong><br>
191</p>
192 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COMPRESSION gzip</strong><br>
193</p>
194 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COMPRESSION none</strong><br>
195Uses the specified compression on the document data following the attributes in a Print-Job or Send-Document request.
196</p>
197 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DELAY </strong><em>seconds</em>[<em>,repeat-seconds</em>]<br>
198Specifies a delay in seconds before this test will be run.
f1dd3a39 199If two values are specified, the second value is used as the delay between repeated tests.
cc7359ae
MS
200</p>
201 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DISPLAY </strong><em>attribute-name</em><br>
202Specifies that value of the named attribute should be output as part of the
a2326b5b 203test report.
cc7359ae
MS
204</p>
205 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>EXPECT </strong><em>attribute-name </em>[ <em>predicate(s) </em>]<br>
206</p>
207 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>EXPECT ?</strong><em>attribute-name predicate(s)</em><br>
208</p>
209 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>EXPECT !</strong><em>attribute-name</em><br>
210Specifies that the response must/may/must not include the named attribute. Additional requirements can be added as predicates - see the &quot;EXPECT PREDICATES&quot; section for more information on predicates. Attribute names can specify member attributes by separating the attribute and member names with the forward slash, for example &quot;media-col/media-size/x-dimension&quot;.
211</p>
212 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>EXPECT-ALL </strong><em>attribute-name </em>[ <em>predicate(s) </em>]<br>
213</p>
214 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>EXPECT-ALL ?</strong><em>attribute-name predicate(s)</em><br>
215Specifies that the response must/may include the named attribute and that all occurrences of that attribute must match the given predicates.
216</p>
217 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>FILE filename</strong><br>
218Specifies a file to include at the end of the request. This is typically used when sending a test print file.
2dad30d9
MS
219</p>
220 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>GENERATE-FILE { </strong><em>parameters</em><strong> }</strong><br>
221Specifies that
222<strong>ipptool</strong>
223should generate PWG or Apple raster data for the printer.
224See the &quot;GENERATE-FILE PARAMETERS&quot; section for information on the parameters you can specify.
cc7359ae
MS
225</p>
226 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>GROUP tag</strong><br>
227Specifies the group tag for subsequent attributes in the request.
228</p>
229 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IGNORE-ERRORS yes</strong><br>
230</p>
231 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IGNORE-ERRORS no</strong><br>
232Specifies whether
233<strong>ipptool</strong>(8)
234
6b13fa61 235will ignore errors and continue with subsequent tests.
cc7359ae
MS
236</p>
237 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>MONITOR-PRINTER-STATE </strong>[ <em>printer-uri </em>] <strong>{ EXPECT </strong><em>attribute-name </em>[ <em>predicate(s) </em>] <strong>}</strong><br>
238Specifies printer state monitoring tests to run in parallel with the test operation.
239The monitoring tests will run until all of the <strong>EXPECT</strong> conditions are satisfied or the primary test operation has completed, whichever occurs first.
240</p>
241 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>NAME &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
242Specifies the human-readable name of the test.
243</p>
244 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>OPERATION </strong><em>operation-code</em><br>
245Specifies the operation to be performed.
246</p>
247 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>PASS-IF-DEFINED </strong><em>variable-name</em><br>
248</p>
249 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>PASS-IF-NOT-DEFINED </strong><em>variable-name</em><br>
250Specifies that the current test should be passed automatically when the variable is or is not defined.
251</p>
252 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>PAUSE &quot;</strong><em>message</em><strong>&quot;</strong><br>
253Displays the provided message and waits for the user to press a key to continue.
254</p>
255 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REQUEST-ID </strong><em>number</em><br>
256</p>
257 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REQUEST-ID random</strong><br>
258Specifies the request-id value to use in the request, either an integer or the word &quot;random&quot; to use a randomly generated value (the default).
259</p>
260 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOURCE </strong><em>path</em><br>
261Specifies an alternate resource path that is used for the HTTP POST request. The default is the resource from the URI provided to the
262<strong>ipptool</strong>(8)
263
6b13fa61 264program.
cc7359ae
MS
265</p>
266 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SKIP-IF-DEFINED </strong><em>variable-name</em><br>
267</p>
268 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SKIP-IF-NOT-DEFINED </strong><em>variable-name</em><br>
269Specifies that the current test should be skipped when the variable is or is not defined.
270</p>
271 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SKIP-PREVIOUS-ERROR yes</strong><br>
272</p>
273 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SKIP-PREVIOUS-ERROR no</strong><br>
274Specifies whether
275<strong>ipptool</strong>(8)
276
6b13fa61 277will skip the current test if the previous test resulted in an error/failure.
cc7359ae
MS
278</p>
279 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>STATUS </strong><em>status-code </em>[ <em>predicate</em> ]<br>
280Specifies an expected response status-code value. Additional requirements can be added as predicates - see the &quot;STATUS PREDICATES&quot; section for more information on predicates.
281</p>
282 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TEST-ID &quot;</strong><em>identifier</em>&quot;<br>
283Specifies an identifier string for the current test.
284</p>
285 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TRANSFER auto</strong><br>
286Specifies that this test will use &quot;Transfer-Encoding: chunked&quot; if it has an attached file or &quot;Content-Length:&quot; otherwise.
287</p>
288 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TRANSFER chunked</strong><br>
289Specifies that this test will use the HTTP/1.1 &quot;Transfer-Encoding: chunked&quot; header.
290</p>
291 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>TRANSFER length</strong><br>
292Specifies that this test will use the HTTP/1.0 &quot;Content-Length:&quot; header.
293</p>
294 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 1.0</strong><br>
295</p>
296 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 1.1</strong><br>
297</p>
298 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 2.0</strong><br>
299</p>
300 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 2.1</strong><br>
301</p>
302 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>VERSION 2.2</strong><br>
303Specifies the IPP version number to use for this test.
304</p>
305 <h3 id="ipptoolfile-5.description.expect-predicates">Expect Predicates</h3>
306<p>The following predicates are understood following the <strong>EXPECT</strong> test directive:
307</p>
308 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COUNT </strong><em>number</em><br>
309Requires the <strong>EXPECT</strong> attribute to have the specified number of values.
310</p>
311 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE-MATCH </strong><em>variable-name</em><br>
312Defines the variable to &quot;1&quot; when the <strong>EXPECT</strong> condition matches.
313A side-effect of this predicate is that this <strong>EXPECT</strong> will never fail a test.
314</p>
315 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE-NO-MATCH </strong><em>variable-name</em><br>
316Defines the variable to &quot;1&quot; when the <strong>EXPECT</strong> condition does not match.
317A side-effect of this predicate is that this <strong>EXPECT</strong> will never fail a test.
318</p>
319 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE-VALUE </strong><em>variable-name</em><br>
320Defines the variable to the value of the attribute when the <strong>EXPECT</strong> condition matches.
321A side-effect of this predicate is that this <strong>EXPECT</strong> will never fail a test.
322</p>
323 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DISPLAY-MATCH </strong><em>&quot;message&quot;</em><br>
324Displays the specified message when the <strong>EXPECT</strong> condition matches.
325</p>
326 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IF-DEFINED </strong><em>variable-name</em><br>
327Makes the <strong>EXPECT</strong> conditions apply only if the specified variable is defined.
328</p>
329 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IF-NOT-DEFINED </strong><em>variable-name</em><br>
330Makes the <strong>EXPECT</strong> conditions apply only if the specified variable is not defined.
331</p>
332 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IN-GROUP </strong><em>tag</em><br>
333Requires the <strong>EXPECT</strong> attribute to be in the specified group tag.
334</p>
335 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>OF-TYPE </strong><em>tag[(limits)|tag|...]</em><br>
336Requires the <strong>EXPECT</strong> attribute to use one of the specified value tag(s).
337Most value tags also support the specification of limits in parenthesis, for example &quot;name(42)&quot; would allow nameWith/WithoutLanguage strings up to 42 octets in length, &quot;name(4:MAX)&quot; would allow nameWith/WithoutLanguage strings between 4 and 255 octets in length, and &quot;integer(-273:MAX)&quot; would allow integers between -273 and 2147483647.
338</p>
339 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REPEAT-LIMIT </strong><em>number</em><br>
340<br>
341Specifies the maximum number of times to repeat if the <strong>REPEAT-MATCH</strong> or <strong>REPEAT-NO-MATCH</strong> predicate is specified. The default value is 1000.
342</p>
343 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REPEAT-MATCH</strong><br>
344</p>
345 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REPEAT-NO-MATCH</strong><br>
346Specifies that the current test should be repeated when the <strong>EXPECT</strong> condition matches or does not match.
347</p>
348 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SAME-COUNT-AS </strong><em>attribute-name</em><br>
349Requires the <strong>EXPECT</strong> attribute to have the same number of values as the specified parallel attribute.
2dad30d9
MS
350</p>
351 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SAVE-CONTENT </strong><em>filespec</em><br>
352</p>
353 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>SAVE-ALL-CONTENT </strong><em>filespec</em><br>
354Saves all &quot;http&quot; or &quot;https&quot; URI values to the specified location.
355The filespec value is a filename or directory path and can contain the special strings &quot;%basename%&quot; to insert the base filename from the URI, &quot;%ext%&quot; to insert the extension from the URI, and &quot;%index%&quot; to insert the value number starting at 1.
356</p>
357 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-CONTENT available</strong><br>
358</p>
359 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-CONTENT available</strong><br>
360Requires that all URI values be accessible.
361A &quot;http&quot; or &quot;https&quot; URI must respond to a GET request while a &quot;ipp&quot; or &quot;ipps&quot; URI must respond to a HEAD request.
362</p>
363 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-CONTENT valid</strong><br>
364</p>
365 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-CONTENT valid</strong><br>
366Requires that all &quot;http&quot; and &quot;https&quot; URI values be accessible and provide valid content.
367Currently
368<strong>ipptool</strong>
369is able to validate CSS, HTML, ICC, IPP, JPEG, PDF, PNG, and Apple .strings files.
370</p>
371 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-CONTENT valid-icon</strong><br>
372</p>
373 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-CONTENT valid-icon</strong><br>
374Requires that all &quot;http&quot; and &quot;https&quot; URI values be accessible and provide valid PNG images for icons - 48x48, 128x128, or 512x512 in size with transparency.
cc7359ae
MS
375</p>
376 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-HOSTNAMES &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
377</p>
378 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-HOSTNAMES &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
379Requires that all URI values contain a matching hostname.
2dad30d9
MS
380</p>
381 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-MIME-TYPES </strong><em>mime/type[,...,mime/type]</em><br>
382</p>
383 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-MIME-TYPES </strong><em>mime/type[,...,mime/type]</em><br>
384Requires that all URI values provide one of the listed MIME media types.
385For non-content tests, the target Printer must respond to HTTP HEAD requests with the MIME media type that would be returned by a GET or POST requests.
386For &quot;http&quot; and &quot;https&quot; content tests,
387<strong>ipptool</strong>
388sends a HTTP GET request.
389For &quot;ipp&quot; and &quot;ipps&quot; content tests,
390<strong>ipptool</strong>
391sends an IPP Get-Printer-Attributes request.
cc7359ae
MS
392</p>
393 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-RESOURCES &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
394</p>
395 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-RESOURCES &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
396Requires that all URI values contain a matching resource (including leading /).
397</p>
398 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-SCHEMES &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
399</p>
400 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-SCHEMES &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
401Requires that all URI values contain a matching scheme.
402</p>
403 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
404Requires that all values of the <strong>EXPECT</strong> attribute match the literal string. Comparisons are case-sensitive.
405</p>
406 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES &lt;</strong><em>number</em><br>
407</p>
408 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES =</strong><em>number</em><br>
409</p>
410 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES ></strong><em>number</em><br>
411</p>
412 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES </strong><em>number</em>[<em>,...,number</em>]<br>
413Requires that all values of the <strong>EXPECT</strong> attribute match the number(s) or numeric comparison. When comparing rangeOfInteger values, the &quot;&lt;&quot; and &quot;>&quot; operators only check the upper bound of the range.
414</p>
415 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES &quot;false&quot;</strong><br>
416</p>
417 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES &quot;true&quot;</strong><br>
418Requires that all values of the <strong>EXPECT</strong> attribute match the boolean value given.
419</p>
420 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
421Requires that all values of the <strong>EXPECT</strong> attribute match the regular expression, which must conform to the POSIX regular expression syntax.
1a2f0160 422Comparisons are case-sensitive.
2dad30d9
MS
423</p>
424 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-ALL-VALUES-FROM </strong><em>attribute-name</em><br>
425Requires that all value(s) of the <strong>EXPECT</strong> attribute matches the value(s) in the specified attribute.
426For example, &quot;EXPECT-ALL media-col-database/media-source WITH-ALL-VALUES-FROM media-source-supported&quot; requires that all the &quot;media-source&quot; values are listed as a value of the &quot;media-source-supported&quot; attribute.
cc7359ae
MS
427</p>
428 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-DISTINCT-VALUES</strong><br>
429Requires that all values of the <strong>EXPECT</strong> attribute are unique.
1a2f0160 430Comparisons are case-sensitive.
a09fa7b5 431Only charset, collection, enum, integer, keyword, mimeMediaType, naturalLanguage, rangeOfInteger, resolution, uriScheme attributes support this predicate.
cc7359ae
MS
432</p>
433 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-HOSTNAME &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
434</p>
435 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-HOSTNAME &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
436Requires that at least one URI value contains a matching hostname.
437</p>
438 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-RESOURCE &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
439</p>
440 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-RESOURCE &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
441Requires that at least one URI value contains a matching resource (including leading /).
442</p>
443 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-SCHEME &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
444</p>
445 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-SCHEME &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
446Requires that at least one URI value contains a matching scheme.
447</p>
448 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE &quot;</strong><em>literal string</em><strong>&quot;</strong><br>
449Requires that at least one value of the <strong>EXPECT</strong> attribute matches the literal string. Comparisons are case-sensitive.
450</p>
451 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE &lt;</strong><em>number</em><br>
452</p>
453 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE =</strong><em>number</em><br>
454</p>
455 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE ></strong><em>number</em><br>
456</p>
457 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE </strong><em>number</em>[<em>,...,number</em>]<br>
458Requires that at least one value of the <strong>EXPECT</strong> attribute matches the number(s) or numeric comparison. When comparing rangeOfInteger values, the &quot;&lt;&quot; and &quot;>&quot; operators only check the upper bound of the range.
459</p>
460 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE &quot;false&quot;</strong><br>
461</p>
462 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE &quot;true&quot;</strong><br>
463Requires that at least one value of the <strong>EXPECT</strong> attribute matches the boolean value given.
464</p>
465 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE &quot;/</strong><em>regular expression</em><strong>/&quot;</strong><br>
466Requires that at least one value of the <strong>EXPECT</strong> attribute matches the regular expression, which must conform to the POSIX regular expression syntax. Comparisons are case-sensitive.
467</p>
468 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>WITH-VALUE-FROM </strong><em>attribute-name</em><br>
469Requires that the value(s) of the <strong>EXPECT</strong> attribute matches the value(s) in the specified attribute.
470For example, &quot;EXPECT job-sheets WITH-VALUE-FROM job-sheets-supported&quot; requires that the &quot;job-sheets&quot; value is listed as a value of the &quot;job-sheets-supported&quot; attribute.
471</p>
472 <h3 id="ipptoolfile-5.description.status-predicates">Status Predicates</h3>
473<p>The following predicates are understood following the <strong>STATUS</strong> test directive:
474</p>
475 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE-MATCH </strong><em>variable-name</em><br>
476Defines the variable to &quot;1&quot; when the <strong>STATUS</strong> matches. A side-effect of this predicate is that this <strong>STATUS</strong> will never fail a test.
477</p>
478 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>DEFINE-NO-MATCH </strong><em>variable-name</em><br>
479Defines the variable to &quot;1&quot; when the <strong>STATUS</strong> does not match. A side-effect of this predicate is that this <strong>STATUS</strong> will never fail a test.
480</p>
481 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IF-DEFINED </strong><em>variable-name</em><br>
482Makes the <strong>STATUS</strong> apply only if the specified variable is defined.
483</p>
484 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>IF-NOT-DEFINED </strong><em>variable-name</em><br>
485Makes the <strong>STATUS</strong> apply only if the specified variable is not defined.
486</p>
487 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REPEAT-LIMIT </strong><em>number</em><br>
488<br>
c277f98c 489Specifies the maximum number of times to repeat. The default value is 1000.
cc7359ae
MS
490</p>
491 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REPEAT-MATCH</strong><br>
492</p>
493 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>REPEAT-NO-MATCH</strong><br>
494Specifies that the current test should be repeated when the response status-code matches or does not match the value specified by the STATUS directive.
495</p>
496 <h3 id="ipptoolfile-5.description.operation-codes">Operation Codes</h3>
497<p>Operation codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of names supported by
498<strong>ipptool</strong>(8):
499
500</p>
501 <pre>
4cdcda51
MS
502 Acknowledge-Document
503 Acknowledge-Identify-Printer
504 Acknowledge-Job
a2326b5b 505 Activate-Printer
4cdcda51
MS
506 Add-Document-Images
507 Allocate-Printer-Resources
508 Cancel-Current-Job
509 Cancel-Job
510 Cancel-Jobs
511 Cancel-My-Jobs
512 Cancel-Resource
513 Cancel-Subscription
514 Close-Job
515 Create-Job
516 Create-Job-Subscriptions
517 Create-Printer
518 Create-Printer-Subscriptions
519 Create-Resource
520 Create-Resource-Subscriptions
521 Create-System-Subscriptions
522 CUPS-Accept-Jobs
a2326b5b
MS
523 CUPS-Accept-Jobs
524 CUPS-Add-Modify-Class
525 CUPS-Add-Modify-Printer
526 CUPS-Authenticate-Job
4cdcda51 527 CUPS-Create-Local-Printer
a2326b5b
MS
528 CUPS-Delete-Class
529 CUPS-Delete-Printer
530 CUPS-Get-Classes
531 CUPS-Get-Default
532 CUPS-Get-Devices
533 CUPS-Get-Document
534 CUPS-Get-PPD
535 CUPS-Get-PPDs
536 CUPS-Get-Printers
537 CUPS-Move-Job
538 CUPS-Reject-Jobs
539 CUPS-Set-Default
a2326b5b 540 Deactivate-Printer
4cdcda51
MS
541 Deallocate-Printer-Resources
542 Delete-Printer
543 Deregister-Output-Device
544 Disable-All-Printers
a2326b5b 545 Disable-Printer
4cdcda51 546 Enable-All-Printers
a2326b5b 547 Enable-Printer
4cdcda51
MS
548 Fetch-Document
549 Fetch-Job
a2326b5b
MS
550 Get-Job-Attributes
551 Get-Jobs
4cdcda51 552 Get-Next-Document-Data
a2326b5b 553 Get-Notifications
4cdcda51 554 Get-Output-Device-Attributes
a2326b5b
MS
555 Get-Printer-Attributes
556 Get-Printer-Support-Files
557 Get-Printer-Supported-Values
4cdcda51 558 Get-Printers
a2326b5b
MS
559 Get-Subscription-Attributes
560 Get-Subscriptions
4cdcda51
MS
561 Get-System-Attributes
562 Get-System-Supported-Values
a2326b5b
MS
563 Hold-Job
564 Hold-New-Jobs
82cc1f9a 565 Identify-Printer
4cdcda51
MS
566 Install-Resource
567 Pause-All-Printers
568 Pause-All-Printers-After-Current-Job
a2326b5b
MS
569 Pause-Printer
570 Pause-Printer-After-Current-Job
571 Print-Job
572 Print-URI
573 Promote-Job
574 Purge-Jobs
4cdcda51 575 Register-Output-Device
a2326b5b
MS
576 Release-Held-New-Jobs
577 Release-Job
578 Renew-Subscription
579 Reprocess-Job
580 Restart-Job
581 Restart-Printer
4cdcda51 582 Restart-System
a2326b5b 583 Resubmit-Job
4cdcda51 584 Resume-All-Printers
a2326b5b
MS
585 Resume-Job
586 Resume-Printer
587 Schedule-Job-After
588 Send-Document
9475ec92 589 Send-Hardcopy-Document
a2326b5b 590 Send-Notifications
4cdcda51 591 Send-Resource-Data
a2326b5b
MS
592 Send-URI
593 Set-Job-Attributes
594 Set-Printer-Attributes
4cdcda51
MS
595 Set-Resource-Attributes
596 Set-System-Attributes
597 Shutdown-All-Printers
598 Shutdown-One-Printer
a2326b5b 599 Shutdown-Printer
4cdcda51
MS
600 Startup-All-Printers
601 Startup-One-Printer
a2326b5b
MS
602 Startup-Printer
603 Suspend-Current-Job
4cdcda51
MS
604 Update-Active-Jobs
605 Update-Document-Status
606 Update-Job-Status
607 Update-Output-Device-Attributes
82cc1f9a 608 Validate-Document
a2326b5b
MS
609 Validate-Job
610</pre>
cc7359ae
MS
611 <h3 id="ipptoolfile-5.description.status-codes">Status Codes</h3>
612<p>Status codes correspond to the hexadecimal numbers (0xHHHH) and names from RFC 8011 and other IPP extension specifications. Here is a complete list of the names supported by
613<strong>ipptool</strong>(8):
614
615</p>
616 <pre>
6b13fa61
MS
617 client-error-account-authorization-failed
618 client-error-account-closed
619 client-error-account-info-needed
620 client-error-account-limit-reached
a2326b5b
MS
621 client-error-attributes-not-settable
622 client-error-attributes-or-values-not-supported
623 client-error-bad-request
624 client-error-charset-not-supported
625 client-error-compression-error
626 client-error-compression-not-supported
627 client-error-conflicting-attributes
628 client-error-document-access-error
629 client-error-document-format-error
630 client-error-document-format-not-supported
82cc1f9a
MS
631 client-error-document-password-error
632 client-error-document-permission-error
633 client-error-document-security-error
634 client-error-document-unprintable-error
a2326b5b
MS
635 client-error-forbidden
636 client-error-gone
637 client-error-ignored-all-notifications
638 client-error-ignored-all-subscriptions
639 client-error-not-authenticated
640 client-error-not-authorized
4cdcda51 641 client-error-not-fetchable
a2326b5b
MS
642 client-error-not-found
643 client-error-not-possible
644 client-error-print-support-file-not-found
645 client-error-request-entity-too-large
646 client-error-request-value-too-long
647 client-error-timeout
648 client-error-too-many-subscriptions
649 client-error-uri-scheme-not-supported
6b13fa61
MS
650 cups-error-account-authorization-failed
651 cups-error-account-closed
652 cups-error-account-info-needed
653 cups-error-account-limit-reached
a2326b5b
MS
654 cups-see-other
655 redirection-other-site
656 server-error-busy
657 server-error-device-error
658 server-error-internal-error
659 server-error-job-canceled
660 server-error-multiple-document-jobs-not-supported
661 server-error-not-accepting-jobs
662 server-error-operation-not-supported
663 server-error-printer-is-deactivated
664 server-error-service-unavailable
665 server-error-temporary-error
666 server-error-version-not-supported
667 successful-ok
668 successful-ok-but-cancel-subscription
669 successful-ok-conflicting-attributes
670 successful-ok-events-complete
671 successful-ok-ignored-notifications
672 successful-ok-ignored-or-substituted-attributes
673 successful-ok-ignored-subscriptions
674 successful-ok-too-many-events
675</pre>
cc7359ae
MS
676 <h3 id="ipptoolfile-5.description.tags">Tags</h3>
677<p>Value and group tags correspond to the names from RFC 8011 and other IPP extension specifications. Here are the group tags:
678</p>
679 <pre>
6b13fa61 680 document-attributes-tag
a2326b5b 681 event-notification-attributes-tag
4cdcda51
MS
682 job | job-attributes-tag
683 operation | operation-attributes-tag
684 printer | printer-attributes-tag
685 resource-attributes-tag
a2326b5b 686 subscription-attributes-tag
4cdcda51 687 system-attributes-tag
a2326b5b
MS
688 unsupported-attributes-tag
689</pre>
cc7359ae
MS
690 <p>Here are the value tags:
691</p>
692 <pre>
a2326b5b
MS
693 admin-define
694 boolean
695 charset
4cdcda51 696 collection | begCollection
a2326b5b
MS
697 dateTime
698 default
699 delete-attribute
700 enum
701 integer
702 keyword
4cdcda51
MS
703 language | naturalLanguage
704 mimetype | mimeMediaType
705 name | nameWithLanguage | nameWithoutLanguage
a2326b5b
MS
706 no-value
707 not-settable
708 octetString
709 rangeOfInteger
710 resolution
4cdcda51 711 text | textWithLanguage | textWithoutLanguage
a2326b5b
MS
712 unknown
713 unsupported
714 uri
715 uriScheme
716</pre>
cc7359ae
MS
717 <h3 id="ipptoolfile-5.description.variables">Variables</h3>
718<p>The
719<strong>ipptool</strong>(8)
720
721program maintains a list of variables that can be used in any literal string or attribute value by specifying &quot;<em>$variable-name</em>&quot;. Aside from variables defined using the <em>-d</em> option or <strong>DEFINE</strong> directive, the following pre-defined variables are available:
722</p>
723 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$$</strong><br>
724Inserts a single &quot;$&quot; character.
725</p>
726 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$ENV[</strong><em>name</em><strong>]</strong><br>
727Inserts the value of the named environment variable, or an empty string if the environment variable is not defined.
2dad30d9
MS
728</p>
729 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$basename</strong><br>
730Inserts the base filename (without directory path) of the path provided to
731<strong>ipptool</strong>(8)
732
733with the <em>-f</em> option.
cc7359ae
MS
734</p>
735 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$date-current</strong><br>
736Inserts the current date and time using the ISO-8601 format (&quot;yyyy-mm-ddThh:mm:ssZ&quot;).
737</p>
738 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$date-start</strong><br>
739Inserts the starting date and time using the ISO-8601 format (&quot;yyyy-mm-ddThh:mm:ssZ&quot;).
740</p>
741 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$filename</strong><br>
742Inserts the filename provided to
743<strong>ipptool</strong>(8)
744
745with the <em>-f</em> option.
746</p>
747 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$filetype</strong><br>
748Inserts the MIME media type for the filename provided to
749<strong>ipptool</strong>(8)
750
751with the <em>-f</em> option.
752</p>
753 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$hostname</strong><br>
754Inserts the hostname from the URI provided to
755<strong>ipptool</strong>(8).
756
757</p>
758 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$job-id</strong><br>
759Inserts the last &quot;job-id&quot; attribute value returned in a test response or 0 if no &quot;job-id&quot; attribute has been seen.
760</p>
761 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$job-uri</strong><br>
762Inserts the last &quot;job-uri&quot; attribute value returned in a test response or an empty string if no &quot;job-uri&quot; attribute has been seen.
763</p>
764 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$notify-subscription-id</strong><br>
765Inserts the last &quot;notify-subscription-id&quot; attribute value returned in a test response or 0 if no &quot;notify-subscription-id&quot; attribute has been seen.
766</p>
767 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$port</strong><br>
768Inserts the port number from the URI provided to
769<strong>ipptool</strong>(8).
770
771</p>
772 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$resource</strong><br>
773Inserts the resource path from the URI provided to
774<strong>ipptool</strong>(8).
775
776</p>
777 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$scheme</strong><br>
778Inserts the scheme from the URI provided to
779<strong>ipptool</strong>(8).
780
781</p>
782 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$uri</strong><br>
783Inserts the URI provided to
784<strong>ipptool</strong>(8).
785
786</p>
787 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$uriuser</strong><br>
788Inserts the username from the URI provided to
789<strong>ipptool</strong>(8),
790
6b13fa61 791if any.
cc7359ae
MS
792</p>
793 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>$user</strong><br>
794Inserts the current user's login name.
795</p>
2dad30d9
MS
796 <h2 id="ipptoolfile-5.generate-file-parameters">Generate-File Parameters</h2>
797<p>The
798<strong>GENERATE-FILE</strong>
799directive dynamically generates raster pages for the destination printer.
800Each page consists of a black border and the text &quot;TEST-PAGE ####&quot; repeated in the interior in several shades of gray and colors.
801The following parameters are supported:
802</p>
803 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COLORSPACE auto</strong><br>
804</p>
805 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COLORSPACE bi-level</strong><br>
806</p>
807 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COLORSPACE color</strong><br>
808</p>
809 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COLORSPACE monochrome</strong><br>
810</p>
811 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>COLORSPACE </strong><em>colorspace_bits</em><br>
812Specifies the output color space and bit depth.
813&quot;auto&quot; chooses an available combination with preference for full color, &quot;bi-level&quot; chooses a B&amp;W (bitmap) color space, &quot;color&quot; chooses a full color combination, and &quot;monochrome&quot; chooses a grayscale combination.
814Otherwise, the value must be one of the registered IPP &quot;pwg-raster-document-type-supported&quot; keywords.
815<em>NOTE:</em> The &quot;device N&quot; color spaces are not current supported.
816</p>
817 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>FORMAT image/pwg-raster</strong><br>
818</p>
819 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>FORMAT image/urf</strong><br>
820Specifies the raster format to use, either &quot;image/pwg-raster&quot; (PWG Raster) or &quot;image/urf&quot; (Apple Raster).
821The default is &quot;image/urf&quot; if supported, &quot;image/pwg-raster&quot; otherwise.
822</p>
823 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>MEDIA default</strong><br>
824</p>
825 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>MEDIA ready</strong><br>
826</p>
827 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>MEDIA </strong><em>media-size-name</em><br>
828Specifies the output media size.
829&quot;default&quot; uses the printer's default media size while &quot;ready&quot; uses the first ready (loaded) media reported by the printer.
830Other media size names must conform the PWG self-describing media size format.
831</p>
832 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>NUM-COPIES </strong><em>copies</em><br>
833Specifies the number of copies to produce.
834The default is 1 copy.
835</p>
836 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>NUM-PAGES </strong><em>pages</em><br>
837Specifies the number of pages to produce.
838The default is 1 page for single-sided output and 2 pages for double-sided output.
839</p>
840 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ORIENTATION landscape</strong><br>
841</p>
842 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ORIENTATION portrait</strong><br>
843</p>
844 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ORIENTATION reverse-landscape</strong><br>
845</p>
846 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ORIENTATION reverse-portrait</strong><br>
847Specifies the orientation of the output.
848The default is &quot;portrait&quot;.
849</p>
850 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION default</strong><br>
851</p>
852 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION max</strong><br>
853</p>
854 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION min</strong><br>
855</p>
856 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION </strong><em>resolution</em><strong>dpcm</strong><br>
857</p>
858 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION </strong><em>horzontal</em><strong>x</strong><em>vertical</em><strong>dpcm</strong><br>
859</p>
860 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION </strong><em>resolution</em><strong>dpi</strong><br>
861</p>
862 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>RESOLUTION </strong><em>horizontal</em><strong>x</strong><em>vertical</em><strong>dpi</strong><br>
863Specifies the output resolution using the printer's supported resolutions or as specified in dots per inch or dots per centimeter.
864&quot;default&quot; uses the median resolution of the printer and is the default, &quot;min&quot; uses the lowest resolution of the printer, and &quot;max&quot; uses the highest resolution of the printer.
865</p>
866 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong> SIDES one-sided</strong><br>
867</p>
868 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong> SIDES two-sided-long-edge</strong><br>
869</p>
870 <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong> SIDES two-sided-short-edge</strong><br>
871Specifies whether to print on one or both sides of the media.
872The default is &quot;two-sided-long-edge&quot; for portrait output and &quot;two-sided-short-edge&quot; for landscape output when supported by the printer, otherwise &quot;one-sided&quot; is used.
873</p>
874 <h2 id="ipptoolfile-5.examples">Examples</h2>
875<p>Query the &quot;foo-default&quot; and &quot;foo-supported&quot; Printer Description attributes and validate that all of its values are 'bar', 'baz', or 'none':
876</p>
877 <pre>{
878 NAME &quot;Validate 'foo' Attribute&quot;
879 OPERATION Get-Printer-Attributes
880 GROUP operation-attributes-tag
881 ATTR charset attributes-charset utf-8
882 ATTR language attributes-natural-language en
883 ATTR uri printer-uri $uri
884 ATTR keyword requested-attributes foo-default,foo-supported
885 EXPECT foo-default OF-TYPE keyword IN-GROUP printer-attributes-tag
886 COUNT 1 WITH-VALUE &quot;/^(bar|baz|none)$$/&quot;
887 EXPECT foo-supported OF-TYPE keyword IN-GROUP printer-attributes-tag
888 WITH-ALL-VALUES &quot;/^(bar|baz|none)$$/&quot;
889}
890</pre>
891<p>Query the &quot;media-col-ready&quot; Printer Status attribute and validate that the collection values contain &quot;media-size&quot; and &quot;media-source&quot; member attributes:
892</p>
893 <pre>{
894 NAME &quot;Validate 'foo' Attribute&quot;
895 OPERATION Get-Printer-Attributes
896 GROUP operation-attributes-tag
897 ATTR charset attributes-charset utf-8
898 ATTR language attributes-natural-language en
899 ATTR uri printer-uri $uri
900 ATTR keyword requested-attributes media-col-ready
901 EXPECT media-col-ready OF-TYPE collection IN-GROUP printer-attributes-tag
902 EXPECT-ALL media-col-ready/media-size OF-TYPE collection COUNT 1
903 EXPECT-ALL media-col-ready/media-size/x-dimension OF-TYPE integer(1:MAX) COUNT 1
904 EXPECT-ALL media-col-ready/media-size/y-dimension OF-TYPE integer(0:MAX) COUNT 1
905 EXPECT-ALL media-col-ready/media-source OF-TYPE keyword|name COUNT 1
906}
907</pre>
cc7359ae 908 <h2 id="ipptoolfile-5.see-also">See Also</h2>
4e3aaa5e 909<a href="ipptool.html"><p><strong>ipptool</strong>(1)</a>
cc7359ae 910
2dad30d9
MS
911</p>
912 <p>IANA IPP Registry (<a href="https://www.iana.org/assignments/ipp-registrations">https://www.iana.org/assignments/ipp-registrations</a>)
913</p>
914 <p>PWG Internet Printing Protocol Workgroup (<a href="https://www.pwg.org/ipp">https://www.pwg.org/ipp</a>)
915</p>
916 <p>PWG 5101.1-2023: PWG Media Standardized Names v2.1 (<a href="https://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn21-20230915-5101.1.pdf">https://ftp.pwg.org/pub/pwg/candidates/cs-pwgmsn21-20230915-5101.1.pdf</a>)
917</p>
918 <p>RFC 8011 (<a href="https://datatracker.ietf.org/doc/html/rfc8011">https://datatracker.ietf.org/doc/html/rfc8011</a>)
cc7359ae
MS
919</p>
920 <h2 id="ipptoolfile-5.copyright">Copyright</h2>
76b6aade 921<p>Copyright &copy; 2021-2024 by OpenPrinting.
cc7359ae 922 </body>
a2326b5b 923</html>