The following examples demonstrate how to set up a PrintParameterList to obtain different transformations when reading spooled file data. In the code segments that follow, assume a spooled file already exists on a system, and the createSpooledFile() method creates an instance of the SpooledFile class representing the spooled file.
// Create a spooled file SpooledFile splF = createSpooledFile(); // Set up print parameter list PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPGIF.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // Create a page input stream from the spooled file PrintObjectPageInputStream is = splF.getPageInputStream(printParms);
// Create a spooled file SpooledFile splF = createSpooledFile(); // Set up print parameter list PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPTIFFG4.WSCST"); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST"); // Create a transformed input stream from the spooled file PrintObjectTransformedInputStream is = splF.getTransformedInputStream(printParms);
// Create a spooled file SpooledFile splF = createSpooledFile(); // Set up print parameter list PrintParameterList printParms = new PrintParameterList(); printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*HP4"); // Create a transformed input stream from the spooled file PrintObjectTransformedInputStream is = splF.getTransformedInputStream(printParms);