× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I don't know if this will help at all, but here is what I think it should
look like. This is not tested and I have not used any of the network print
classes before.

list.setParameter(SpooledFile.ATTR_MEASMETHOD, "*ROWCOL");
list.setParameter(SpooledFile.ATTR_PAGELEN, 10F);
list.setParameter(SpooledFile.ATTR_PAGEWIDTH, 10F);
list.setParameter(SpooledFile.ATTR_RECLENGTH, 10);
list.setParameter(SpooledFile.ATTR_OVERFLOW, 10);
list.setParameter(SpooledFile.ATTR_CPI, 20F);
list.setParameter(SpooledFile.ATTR_LPI, 20F);
list.setParameter(SpooledFile.ATTR_PRTDEVTYPE, "*LINE");
list.setParameter(SpooledFile.ATTR_PAGE_DEFINITION, "*NONE");
list.setParameter(SpooledFile.ATTR_ALIGNFORMS, "*FILE");
list.setParameter(SpooledFile.ATTR_ALIGN, "*YES");

return spooledFile.getTransformedInputStream(list);

Maybe this link will help a bit on what kind parameters need to be used for
each PrintObject constant.
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/index.jsp?topic=/rzahh/javadoc/com/ibm/as400/access/PrintObject.html

Now that I look at your original post though, it sure looks like that code
should work.

Hope this helps a little at least.
James R. Perkins

On Wed, Jul 9, 2008 at 6:12 AM, Thorbjørn Ravn Andersen <
thunderaxiom@xxxxxxxxx> wrote:

Bob skrev den 08-07-2008 14:43:
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") );

Thanks Bob!

I tried converting the above (is it C#?) to Java by pure guessing and
ended up with

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

// http://archive.midrange.com/java400-l/200807/msg00010.html

list.setParameter(SpooledFile.ATTR_MEASMETHOD, "*ROWCOL");
list.setParameter(SpooledFile.ATTR_PAGELEN, "10");
list.setParameter(SpooledFile.ATTR_PAGEWIDTH, "10");
list.setParameter(SpooledFile.ATTR_RECLENGTH, "10");
list.setParameter(SpooledFile.ATTR_OVERFLOW, "10");
list.setParameter(SpooledFile.ATTR_CPI, "20");
list.setParameter(SpooledFile.ATTR_LPI, "20");
list.setParameter(SpooledFile.ATTR_PRTDEVTYPE, "*LINE");
list.setParameter(SpooledFile.ATTR_PAGE_DEFINITION, "*NONE");
list.setParameter(SpooledFile.ATTR_ALIGNFORMS, "*FILE");
list.setParameter(SpooledFile.ATTR_ALIGN, "*YES");

return spooledFile.getTransformedInputStream(list);

(and also with having an F trailing the float values) but apparently
without any change in the output.

Suggestions anyone?

--
Thorbjørn

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.