Ira,
> On Aug 25, 2017, at 6:32 PM, Ira McDonald <blueroofmusic at gmail.com> wrote:
>> Hi Mike,
>> For Create-Printer it's really nice to have a template-printer Resource
> for each supported service type.
Agreed, and for a sometimes-used admin operation with likely vendor extension attributes, I think it is appropriate.
I also think that we should define the semantics of template resources in general, i.e., the order of precedence used in creation operations:
1. Attributes in request (highest)
2. Attributes in resource
3. Default attributes (lowest)
That makes it clear how a template resource is applied during a create request.
> I agree about the template-job (too heavyweight to configure). But
> we already plan that the HTTP PUT of a font to a well-known URL
> will quietly create a corresponding Resource object for that font.
> Why not do that simple HTTP PUT for job templates?
Well, while we do have HTTP PUT for creating and allocating Printer resources (as defined in IPP INFRA), that interface is also quite limited compared to using the Create-Resource operation since you cannot specify a "resource-name" different from the filename in the PUT. So either the Printer has to pull the "resource-name" value from the file's metadata, e.g., the typeface name, and/or you use the "base name" from the URL, e.g., "http://printer.example.com/ipp/print/resources/Foo%20Bold.otf" has a "resource-name" value of 'Foo Bold'.
For IPP messages we'd be limited to using the base name approach, which means UTF-8 with percent escapes in the URL (ugh).
> Pete's retired from PWG work or he'd be speaking up for Job Templates
> (they're part (in XML at present) of PWG Job Ticket spec). I think the
> MIME type of a Job Template Resource should allow application/ipp
> or text/xml.
*If* an implementation chose to support a PWG PJT (with whichever schema) we need to use a specific MIME media type for it, not just "text/xml". Also, I believe IETF currently wants us to use application-scoped media types for this kind of thing, so that would probably mean registering "application/pwg-pjt+xml".
There is also the issue of schema versions - do we make that part of the media type (a parameter) that can be included in "resource-formats-supported" values?
> Is even the simple HTTP PUT support too much for IPP native job
> templates (i.e., wire-encoded IPP attributes, not PAPI or XML)?
The issue is how hard will it be for the Client to support them? Doing N requests (Get-User/Printer-Resources + a bunch of HTTP GET requests) to get presets (which is all Job Template resources are) is inefficient and complicated compared to looking at a single collection attribute that is returned by the (common) Get-Printer-Attributes request that Clients already do.
I can also say we (Apple) are more likely to support the "job-presets" and "job-triggers" attributes than we are to support Job Template resources - philosophically they are better aligned with how presets and our internal trigger implementations work on macOS, and adding support for them will be easier (since we already have the interface for querying Printer attributes) than if we have to add additional code to query and pull resources. And because there are fewer requests, the time to show the Print UI will remain low.
Many Printers also already support Set-Printer-Attributes, so I think adding support for a couple attributes will be easier than adding all of the resource infrastructure.
_________________________________________________________
Michael Sweet, Senior Printing System Engineer