Ghee Teo wrote:
> Hi,
>
> I am asking these following set of questions in relation to the Desktop
> printing task
> http://www.opensolaris.org/os/project/jds/tasks/desktop_printing
> on GTK+ Print Backend for PAPI:
>
> 1. If I set up to acess a remote print queue, such as
> pdub0418dbl:\
>
> :printer-uri-supported=lpd\://dbl-nw.Ireland/printers/pdub0405dbl#Solaris:\
>
> :bsdaddr=dbl-nw.Ireland,pdub0405dbl,Solaris:\
> :description=remote print server:
>
> (My machine is a dhcp client), when I do lpstat -p pdub0418dbl, I only
> got
> $ lpstat -p pdub0418dbl -l 2
> printer pdub0418dbl idle. enabled since Tue Oct 31 16:17:49 2006.
> available.
>
> printer-name=pdub0405dbl
>
> printer-uri-supported=lpd://xxxx.Ireland/printers/pdub0405dbl#Solaris
> printer-state-reasons=no entries
>
> printer-state=3
>
> This is the same result if I use the PAPI libraries call.
> With only these information, it is hard to know what printer
> capabilities does
> this printer supports and to update the GUI accordingly. Is there
> anything
> one can do or assume about these information?
lpadmin(1m) and the printmgr(1m) are fairly conservative in their
selection of protocol to use when talking to the print server. They
assume the lowest common denominator and default to rfc-1179 without
extenstions. The result is that you get a very limited set of
information (see your example above). If the print server is IPP
enabled, you can change the printer-uri-supported to
ipp://xxxx.Ireland/printer/pdub0405dbl and use IPP to gather
information. IPP will provide more information. There is work in
progress to provide the complete set of PPD data as well.
snappy% lpstat -p lpd://abelia/printers/test -l 2
printer lpd://abelia/printers/test disabled since Tue Oct 31 11:14:59
2006. available.
test: stopped: paused
printer-name=test
printer-uri-supported=lpd://abelia/printers/test
printer-state-reasons=test: stopped: paused
printer-state=5
snappy% lpstat -p ipp://abelia/printers/test -l 2
printer ipp://abelia/printers/test disabled since Thu Sep 28 17:29:08
2006. available.
new printer
printer-name=test
printer-uri-supported=ipp://abelia/printers/test
job-sheets-supported=standard
document-format-supported=plain/text
device-uri=/dev/null
lpsched-interface-script=/usr/lib/lp/model/standard_foomatic
lpsched-login-term=false
lpsched-daisy=false
lpsched-printer-type=unknown
lpsched-fault-alert-command=write root
lpsched-fault-alert-threshold=1
lpsched-fault-alert-interval=0
lpsched-cpi-value=0
lpsched-cpi-unit=0
lpsched-lpi-value=0
lpsched-lpi-unit=0
lpsched-plen-value=0
lpsched-plen-unit=0
lpsched-pwid-value=0
lpsched-pwid-unit=0
ppd-file-uri=file://abelia/etc/lp/ppd/test.ppd
lpsched-printer-configure-ppd-uri=file://abelia/etc/lp/model/ppd/system/foomatic/HP/HP-Color_LaserJet_4600-Postscript.ppd.gz
lpsched-ppd-source-path=/etc/lp/model/ppd/system/foomatic/HP/HP-Color_LaserJet_4600-Postscript.ppd.gz
printer-make="HP"
printer-model="HP Color LaserJet 4600"
printer-make-and-model="HP Col. Las.Jet 4600 Postscript"
media-default=Letter
media-supported=Letter,A4,11x17,A3,A5,B5,Env10,EnvC5,EnvDL,EnvISOB5,EnvMonarch,Executive,Legal
PageRegion-default=Letter
PageRegion-supported=Letter,A4,11x17,A3,A5,B5,Env10,EnvC5,EnvDL,EnvISOB5,EnvMonarch,Executive,Legal
lpsched-disable-reason=new printer
lpsched-disable-date=Thu Sep 28 17:29:08 CDT 2006
lpsched-reject-reason=new destination
lpsched-reject-date=Sat Oct 28 05:14:16 CDT 2006
printer-current-time=Tue Oct 31 17:13:15 CST 2006
printer-up-time=1162314795
printer-state=5
printer-state-reasons=paused
printer-is-accepting-jobs=true
printer-is-processing-jobs=false
multiple-document-jobs-supported=true
multiple-document-handling-supported=seperate-documents-colated-copies
pdl-override-supported=not-attempted
job-priority-supported=40
job-priority-default=20
copies-supported=1-65535
copies-default=1
page-ranges-supported=true
number-up-supported=1
number-up-default=1
job-hold-until-supported=no-hold,indefinite
job-hold-until-default=no-hold
document-format-default=application/octet-stream
ipp-versions-supported=1.0,1.1
uri-security-supported=none
uri-authentication-supported=requesting-user-name
multiple-operation-time-out=60
charset-configured=utf-8
charset-supported=utf-8
natural-language-configured=en-us
operations-supported=2,4,5,10,11,6,8,9,16385,16386,16389,16397
snappy%
psm-lpsched.so does some very rudimentary PPD parsing right now for
papiPrinterQuery(). It only supply a small subset of PPD data. Wendy
is working on a more comprehensive set of interfaces and parser for
access to PPD data.
Making lpadmin(1m)/printmgr(1m) auto-detect if IPP support is available
from the print server should be very easy to do at if the print server
is accessible at configuration time.
>
> 2. On the local print queue, we typically have
> number-up-supported=1
> number-up-default=1
>
> Is this really supported on the server? Playing around with it,
> doesn't seems to
> be so. But can this be made supported on the PAPI server side?
If I remember correctly, foomatic can use psnup to support n-up. As a
result, we can probably actually support more than 1 up. The PAPI
lpsched support should determine which number-up-supported values are
valid and report that rather than the hard coded 1. We need to file a
bug on this.
>
> 3. In a previous discussion, I was advised that I have to parse the
> PPD for
> additional information. But it seems if the print queue is on the
> local machine,
> PAPI already parsed the PPD file and present these information through
> the API.
> Why do I need to parse the PPD file then?
>
> If parsing the PPD file is required for the remote queue, there are
> potentially 2 problems
> - How does one know what is printer model the print queue is?
> - What should one do while the print server may have the PPD file but
> the local machine
> has not that PPD file?
Wendy is working on the interface for this. One of the goals it to make
the network as transparent as possible, so effectively, you will be able
to ask for the PPD data from the "queue". Under the covers, it will
locate the PPD file associated with the queue, transfer it if
necessary, and parse it for you. There will probably also be interfaces
for you to do this on your own.
-Norm