Bug 411 - Xprint should support OpenPrinting spooler API (PAPI)
Summary: Xprint should support OpenPrinting spooler API (PAPI)
Alias: None
Product: xprint
Classification: Unclassified
Component: Server: Spooler support: Other (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Roland Mainz
QA Contact:
URL: http://www.openprinting.org/
: 408 (view as bug list)
Depends on:
Reported: 2004-04-04 21:35 UTC by Alan Coopersmith
Modified: 2011-09-13 12:56 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Description Alan Coopersmith 2004-04-04 21:35:28 UTC
Xprint should support use of the OpenPrinting spooler API (aka PAPI) for 
communicating with print spoolers in a more robust fashion than the current
method of opening pipes to a variety of lp* commands and trying to parse the
Comment 1 Drew Parsons 2005-02-08 20:10:13 UTC
Debian supports the implementation of this feature.

Ha ha, doesn't that sound officious? I mean I support implementing PAPI.  It
will in one hit deal with a number of limitations that Debian users frequently
gripe over, namely:
  - dynamic listing of printers (running xprehashprinterlist each time the list
changes is not so convenient)
  - dynamic reading of printer properties, in particular printer resolutions
(one user has already reported using several different printers simultaneously,
which makes the standard solution of setting *default-printer-resolution more
difficult than we want)
  - identifying the default printer

By the way, the name "PAPI" is a little unfortunate due to name-clashes with
http://papi.rediris.es/  and http://icl.cs.utk.edu/papi/.  But that's not
Xprint's problem.

I'm on record (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291402) offering
a six-pack of beer to the first person to get this done.
Comment 2 Drew Parsons 2005-02-09 17:34:11 UTC
I've got a test program that gets PAPI working.  I'm using the PAPI
implementation from http://sourceforge.net/projects/openprinting/, in particular
I used the CUPS implementation, papi-lib-cups.

I used the API from http://www.openprinting.org/

Following the examples in the pdf document, it was reasonably straight forward
to get a list of all printers, and printer out the values of all printer
attributes (include multiple values).

The API does not give you a count of the number of printers found, or the number
of attributes.  You've just got to go through them one by one.

There are currently two problems, in terms of what we want for Xprint:

1) resolution values are not returned.
   The API expects "printer-resolution" to be one of the printer attributes, and
      provides PAPI_RESOLUTION facilities.  But, amongst the two dozen odd
printer    attributes returned, "printer-resolution" is not among them.

2) default printer is not identified
   The API provides a filter (PAPI_PRINTER_DEFAULT) to only return the default
printer.  But when it is used, nothing is returned.  I think I was using the
filter correctly.

I suspect these are just bugs in the libpapi implementation, since it is new and
not heavily worked upon.  The internal code gets PAPI resolution data from
libcups, so it's possible libcups is not cooperating instead.

I won't attach the program yet since it's not Xprint specific, it's just a
simple test case.  Maybe when these bugs are cleared, it will be worth posting
the test code.

Comment 3 Alan Coopersmith 2005-10-03 17:03:05 UTC
*** Bug 408 has been marked as a duplicate of this bug. ***
Comment 4 Corbin Simpson 2011-09-13 12:56:19 UTC
Closing WONTFIX because nobody cares about Xprint. Reopen if you plan to address this bug.
Comment 5 Corbin Simpson 2011-09-13 12:56:48 UTC
Once more, with feeling. Apologies for the spam.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.