1

我正在尝试将 AFPDS 假脱机文件转换为 TIFF 图像。没问题,除非原始假脱机文件溢出到可打印区域之外。在 iSeries Navigator 中,我可以缩小并查看溢出的内容。我正在拼命寻找一种方法来使用 JT400 工具包做同样的事情。有人有提示吗?

V6R1,简化版代码如下:

    private void readTiffs(SpooledFile spf) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, RequestNotSupportedException{
    PrintParameterList prtParm = new PrintParameterList();
    PrintObjectPageInputStream inpStream = null;

    prtParm.setParameter(PrintObject.ATTR_MFGTYPE,"*WSCST" );
    prtParm.setParameter(PrintObject.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPTIFFPB.WSCST");

    inpStream = spf.getPageInputStream(prtParm);

    if(inpStream != null) {
        byte[] imagebuff = null;
        do{
              imagebuff = new byte[inpStream.available()];
              inpStream.read (imagebuff);

              // we have the TIFF here, but the right side is cut off if the printout overflowed

        } while(inpStream.nextPage());
    }
}   

谢谢,约翰

4

0 回答 0