Hi Thorbjørn

add the following parameters :
parms.setParameter(PrintObject.ATTR_MEASMETHOD, Cast("string", "*ROWCOL"));
parms.setParameter(PrintObject.ATTR_PAGELEN, Cast("float", Arguments.LinesPerPage));
parms.setParameter(PrintObject.ATTR_PAGEWIDTH, Cast("float", Arguments.ColsPerPage));
parms.setParameter(PrintObject.ATTR_RECLENGTH, Cast("int", Arguments.ColsPerPage));           
parms.setParameter(PrintObject.ATTR_OVERFLOW, Cast("int", Arguments.LinesPerPage));
parms.setParameter(PrintObject.ATTR_CPI, Cast("float", 10));
parms.setParameter(PrintObject.ATTR_LPI, Cast("float", 6));
parms.setParameter(PrintObject.ATTR_PRTDEVTYPE, Cast("string", "*LINE")); 
//The printer data stream type. Valid values are , *IPDS, *USERASCII, *AFPDS, *LINE.
parms.setParameter(PrintObject.ATTR_PAGE_DEFINITION, Cast("string", "*NONE") );
parms.setParameter(PrintObject.ATTR_ALIGNFORMS, Cast("string", "*FILE") );
//Valid values are *WTR, *FILE, *FIRST
parms.setParameter(PrintObject.ATTR_ALIGN, Cast("string", "*YES") );    

regards
Bob

----- Original Message ----
From: Thorbjørn Ravn Andersen <thunderaxiom@xxxxxxxxx>
To: java400-l@xxxxxxxxxxxx
Sent: Monday, July 7, 2008 12:02:26 PM
Subject: Chainging pagination of spoolfiles

Hi.

I have looked around and created the following snippet for creating an
input stream from a SpooledFile which works well (if read with cp850 for
us) but it is paginated with 64 lines per page.  As you can see I have
tried setting the ATTR_PAGELEN attribute but it does not seem to make
any difference.  Basically I would like no pagination at all, which
probably is set with a very, very long page length, but I am a bit stuck.


    public static InputStream getInputStream(SpooledFile spooledFile)
throws AS400Exception, AS400SecurityException,
            ErrorCompletingRequestException, IOException,
InterruptedException, RequestNotSupportedException {

        PrintParameterList list = new PrintParameterList();
        list.setParameter(SpooledFile.ATTR_MFGTYPE, "*WSCST");
        list.setParameter(SpooledFile.ATTR_WORKSTATION_CUST_OBJECT,
"/QSYS.LIB/QWPDEFAULT.WSCST");
          list.setParameter(SpooledFile.ATTR_PAGELEN, 18F);

          return spooledFile.getTransformedInputStream(list);
    }


Suggestions will be appreciated :)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.