harwey / cups4j

Cups4j Java printing library for CUPS/IPP
http://cups4j.org
GNU Lesser General Public License v3.0
130 stars 64 forks source link

how can i get media source info【tray】 #69

Open yetian12 opened 1 year ago

yetian12 commented 1 year ago

I try to modify ipp-list-of-attributes.xml file , add media-source info like this image then ,in PrinterAttributes file, add ipp header map,like this image run this test, but I cannot get media-source info, please help me

yetian12 commented 1 year ago

and I want to know how can print file choose one tray when printers with many trays. waht should i do

gmuth commented 12 months ago

Not a solution for this library - but maybe a solution for your use case.

IppPrinter of project ipp-client provides member mediaSourceSupported as List<String>

e.g. media-source-supported (1setOf keyword) = auto,by-pass-tray,tray-1,tray-2,tray-3,tray-4

You can specify the tray like this:

ippPrinter.printJob(file,mediaColWithSource("tray-3"))