Discussion:
Querying paper size dimensions and margins from IPP printers
Till Kamppeter
2013-01-28 09:15:14 UTC
Permalink
Hi,

I am trying to query capabilities from IPP printers. I can get a list of
supported paper sizes as PWG names when I request "media-supported". Now
I want to pick an arbitrary media name and request the "media-col" for
it. I probably have to do a "Get-Printer-Attributes" operation with
"media-col" in the "requested-attributes", but how do I supply the media
name for which I want to have the "media-col"?

Till
Michael Sweet
2013-01-28 14:14:23 UTC
Permalink
Till,
Post by Till Kamppeter
...
"media-col" in the "requested-attributes", but how do I supply the media
name for which I want to have the "media-col"?
You want to ask for the media-col-database attribute, which gives you all of the supported combinations of size, margins, type, etc.

If that fails, you can ask for media-size-supported (list of all supported dimensions and ranges of dimensions for custom/roll sizes), media-type-supported, etc.

Typically what you want to do it just include requested-attributes="all","media-col-database" to get everything.

(media-col-database is not returned by default for performance reasons, per PWG 5100.3)

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Till Kamppeter
2013-01-28 15:55:58 UTC
Permalink
Post by Michael Sweet
You want to ask for the media-col-database attribute, which gives you all of the supported combinations of size, margins, type, etc.
If that fails, you can ask for media-size-supported (list of all supported dimensions and ranges of dimensions for custom/roll sizes), media-type-supported, etc.
Typically what you want to do it just include requested-attributes="all","media-col-database" to get everything.
(media-col-database is not returned by default for performance reasons, per PWG 5100.3)
When I do this I get more than 200 entries for a printer with ~20
supported paper sizes and two trays. Are these all possible combinations
of paper sizes, paper types, and trays?

Are the units always 100th of a mm?

Is the only way to associate the paper size names, like
"iso_a4_210x297mm", with the dimensions in the "media-col-database" via
the size stated in the paper size name?

Till
Michael Sweet
2013-01-28 16:35:13 UTC
Permalink
Till,
Post by Michael Sweet
You want to ask for the media-col-database attribute, which gives you all of the supported combinations of size, margins, type, etc.
If that fails, you can ask for media-size-supported (list of all supported dimensions and ranges of dimensions for custom/roll sizes), media-type-supported, etc.
Typically what you want to do it just include requested-attributes="all","media-col-database" to get everything.
(media-col-database is not returned by default for performance reasons, per PWG 5100.3)
When I do this I get more than 200 entries for a printer with ~20 supported paper sizes and two trays. Are these all possible combinations of paper sizes, paper types, and trays?
Yes - you'll normally get "number-sizes * number-sources * number-types" values for media-col-database, sometimes more if the printer supports things like media-color, media-weight, etc. This is why you have to ask for media-col-database directly - it is, by far, the largest attribute in IPP.
Are the units always 100th of a mm?
Yes, always.
Is the only way to associate the paper size names, like "iso_a4_210x297mm", with the dimensions in the "media-col-database" via the size stated in the paper size name?
Generally yes, although some printers also support the media-size-name member attribute that provides the PWG media name for the dimensional size. Also, roll and custom media sizes are reported using rangeOfInteger (IPP_TAG_RANGE) values instead of integers (IPP_TAG_INTEGER).

There is also private API in libcups to map to/from PWG names, PPD names, and dimensional sizes. We use this internally in CUPS to support media-col for media selection.

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair
Till Kamppeter
2013-01-28 17:12:44 UTC
Permalink
Post by Michael Sweet
Is the only way to associate the paper size names, like "iso_a4_210x297mm", with the dimensions in the "media-col-database" via the size stated in the paper size name?
Generally yes, although some printers also support the media-size-name member attribute that provides the PWG media name for the dimensional size. Also, roll and custom media sizes are reported using rangeOfInteger (IPP_TAG_RANGE) values instead of integers (IPP_TAG_INTEGER).
There is also private API in libcups to map to/from PWG names, PPD names, and dimensional sizes. We use this internally in CUPS to support media-col for media selection.
As this is a private API I have to copy this code if I want to use it in
cups-filters?

Another question:

I am doing the current tests with a networked inkjet printer, it ntakes
the following input formats:

image/urf
application/vnd.hp-PCL
image/jpeg
application/octet-stream

I want to print to this printer without need of a printer-specific
driver, now application/vnd.hp-PCL is most probably HP's inkjet PCL
which requires the hpcups driver of HPLIP to print in the full quality
of the printer. image/jpeg is the standard JPG format, which can
represent only single-page documents.

If I send a multi-page document as a sequence of JPG images I will
probably get problems like the printer considering it as many jobs and
when I press the cancel button on the printer's front panel only the
current page gets canceled and duplex will not work. Or can I send the
sequence of JPGs as a multi-document job and I get a correctly
duplex-printed output and I can cancel the whole thing with one button
press?

If the image/urf format multi-page? Is it documented somewhere?

What does the following mean:

<key>urf-supported</key>
<array>
<string>CP1</string>
<string>MT1-2-8-9-10-11</string>
<string>OB9</string>
<string>OFU0</string>
<string>PQ3-4-5</string>
<string>RS300-600</string>
<string>SRGB24</string>
<string>W8</string>
<string>DM3</string>
<string>IS1-2</string>
</array>

Till

Loading...