2

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?

3

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.

1

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).

  • 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. – peterh says reinstate Monica Jun 19 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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