Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to send an IPP print job using the ipptool. Using the sample .test files, I can send commands to the printer, but I am unable to successfully use the print-job.test file.

Here's an example using ipptool.

c:\...>ipptool -v ipp://name.local.:631/ipp/printer print-job.test
ipptool: Filename "$filename" on line 21 cannot be read.
ipptool: Filename mapped to "".

It looks like it's failing resolving the variable $filename within the test file so I attempted to hardcode this value in the test file. In this case I get no error, but still no print.

Does anybody have any experience using ipptool to test ipp printing?

share|improve this question

2 Answers 2

Try this line:

c:\...>ipptool -vt -f [name of your URF file] ipp://name.local.:631/ipp/printer print-job.test

and have the URF file in the same location as your .test file. Also, it is recommended to have the ipptool in the same location as well.

share|improve this answer

Edit a copy of your print-job.test file and save it as senloe---print-job.test.

Your edit should replace the variables in the following two lines with hard-coded values:

ATTR mimeMediaType document-format $filetype
FILE $filename

Replace them, for example with:

ATTR mimeMediaType document-format text/plain
FILE senloe---print-job.test

This should send your file senloe---print-job.test as a plain text file to printers.

You'll need to use the following command line (assuming you have CUPS installed locally):

ipptool -v -t ipp://localhost:631/printers/your-real-printername \
       ./senloe---print-job.test

You should see something like the following output:

"./senloe---print-job.test":
   Print-Job:
       attributes-charset (charset) = utf-8
       attributes-natural-language (naturalLanguage) = en
       printer-uri (uri) = ipp://localhost:631/printers/ubuquitech
       requesting-user-name (nameWithoutLanguage) = senloe
       document-format (mimeMediaType) = text/plain
       copies (integer) = 1
   Print file using Print-Job                                      [PASS]
       RECEIVED: 171 bytes in response
       status-code = successful-ok (successful-ok)
       attributes-charset (charset) = utf-8
       attributes-natural-language (naturalLanguage) = en
       job-uri (uri) = ipp://localhost:631/jobs/24
       job-id (integer) = 24
       job-state (enum) = pending
       job-state-reasons (keyword) = none

If this works, the following should also work, now using the original test file print-job.test (which contains the variables) again, and using your edited senloe---print-job.test as the file to be printed:

ipptool -v -t -f senloe---print-job.test                  \
       ipp://localhost:631/printers/your-real-printername \
       ./print-job.test
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.