I am trying to print a spool file from the IBM AS400 / System I. Creating a spool file and printing works fine.
However changing the Source drawer does not seem to any any effect. Printer has 5 trays set up. Tried all numbers from 1 to 5.
There's a DTM software to print DTM documents, it has the ability to choose which tray to go after. So the printer settings should be right
Selecting tray though cups works.
Any help with this would be appreciated
Things that I have tried so far:
- Setting
ATTR_DRWRSEP
attribute to different ones - Setting
ATTR_FORM_DEFINITION
to one with defined drawer - Setting different printer *.FILE that has drawers mapped to tray 2
- Setting *.WSCST with drawers mapped to tray 2
- Running as a different user with more privileges
Jruby code:
# Create printer
printer = com.ibm.as400.access.PrinterFile.new(as400, '/QSYS.LIB/PRINTER3.FILE')
# Set parameters
params = com.ibm.as400.access.PrintParameterList.new
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_OUTPUT_QUEUE, '/QSYS.LIB/QUSRSYS.LIB/PRINTER3.OUTQ')
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_DRWRSEP, 2)
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_HOLD, '*YES')
params.setParameter(com.ibm.as400.access.PrintObject::ATTR_WORKSTATION_CUST_OBJECT, '/QSYS.LIB/QGPL.LIB/DRAWER2.WSCST')
# Write pdf to spooled
out = com.ibm.as400.access.SpooledFileOutputStream.new(as400, params, printer, nil)
out.write(pdf.to_java_bytes)
out.close
# Returns the spool file in AS400
out.getSpooledFile