3

I am using the comming line ipptool for printing, which is a low-level tool in the CUPS daemon for internet printing.

IPP is a HTTP-based protocol for internet printers, most current LAN-based office printers are supporting it.

I used the following command for print:

ipptool -tv -f /path/to/my.pdf ipp://myprinter.on.mylocal.net/ipp/ printfile.ipp 

Where my printfile.ipp defines the characteristics/capabilities of my printer, as follows:

{ OPERATION Print-Job GROUP operation-attributes-tag ATTR charset attributes-charset utf-8 ATTR language attributes-natural-language en ATTR uri printer-uri $uri FILE $filename } 

What I know for sure:

  1. Single-sided PDF printing is working seamlessly.
  2. The printer is a relative ordinary HP office printer,
  3. Which is capable to print double-sided without any problem (co-workers with Windows can do that).

I found this printfile with google and seems working, however any deeper digging about its exact format and specification resulted only cloudy specs and docs. Even the name of the file format of this IPP file is unclear for me.

How could I make it to print double-sided?

0

2 Answers 2

4

Using ipptool, you can configure a job to use duplex printing by adding

ATTR keyword sides two-sided-long-edge 

or

ATTR keyword sides two-sided-short-edge 

to the job description, depending on the layout you want.

See RFC 2911 for details.

3

While @StephenKitt's answer of course is correct, I want to add a few details:

  1. The line he suggested HAS to appear after the two lines with ATTR charset ... and ATTR language ....

  2. The filename can be anything you want. You could name it, for example, ipp-print-duplex.txt.

  3. The file format specification can be found by reading man ipptoolfile on any Linux system. (It ships as part of any package that also ships ipptool itself.)

  4. Invoke it like this:

    ipptool -t -v -f my.pdf <device-uri> ipp-print-duplex.txt 

    where you use as the <device-uri> value exactly the same string which you get returned when you call ippfind (which should also have been shipped alongside ipptool itself).

4
  • Thank you very much! It helped a lot. Some HP printers have a habit, that they give an error for this setting. However, it can be set up in their webadmin control panel. Commented Jun 19, 2019 at 10:23
  • Looks correct, but when sent to a Xerox Versalink, I get response sides (unsupported) = unsupported, so did not work. Nice to hear if it works with other vendors like HP. Please report. Commented Feb 11, 2021 at 13:01
  • @sekrett: Never heard of Versalink. You sure it supports duplex printing? You could use this command to query all supported print options directly from any IPP-capable device: ipptool -t -v <device-uri> get-printer-attributes.test. Commented Feb 11, 2021 at 17:25
  • Yes, it supports, when I print from Windows or through Cups, but directly does not work, it explicitly refuses. The fun part is get-printer-attributes claims support of sides. Firmware is the latest, in web admin nothing special to configure for IPP. Commented Feb 12, 2021 at 7:19

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.