×
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.
But I get this when I run it:
" DEFAULT PRINTER:
null argument passed
PrintServiceLookup found 0 printers
Java program completed"
I'm guessing it can't find anything. Can you verify that it finds something on your system? I called it from a submitted RPGLE program first, then tried a direct call using the JAVA cl command. Same result both times.
Can you think what might be missing in my setup given that I have a large number of printers and OUTQs setup on the iSeries.
Paul.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Thorbjørn Ravn Andersen
Sent: 10 October 2011 12:37
To: 'Java Programming on and around the IBM i'
Subject: RE: Printing from Java
Add /QIBM/ProdData/OS400/Java400/ext/ibmjps.jar to your class path.
System.out.println("Name: " + printService.getName());
DocFlavor[] flavors = printService.getSupportedDocFlavors();
for (int i = 0; i < flavors.length; i++) {
DocFlavor flavor = flavors[i];
System.out.println("F " + flavor);
}
Class[] categories =
printService.getSupportedAttributeCategories();
for (int i = 0; i < categories.length; i++) {
Class class1 = categories[i];
System.out.println("A " + class1);
}
}
}
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Paul Bailey
Sent: 10. oktober 2011 12:53
To: JAVA400-L@xxxxxxxxxxxx
Subject: Printing from Java
Hi,
I am trying to print a PDF using Java called from RPGLE. I know there are all sorts of problems with PDF printing but I think I have a potential solution in using the PDFRenderer package from Sun. The problem I am currently having is that the java.awt.print.PrinterJob.getPrinterJob()
method is returning a nullpointer exception.
I'm thinking that I am going about this all wrong as AWT is not really implemented properly on the iSeries. What iSeries print options are available through java400? Can I send a spooled file to (or even use) an OUTQ at all? Or is that side of things totally disconnected when using Java?
Regards,
Paul.
------------------------------------------------------------
Important
This email transmission and any files with it are strictly confidential to the intended recipient and may be legally privileged. Any views or opinions presented are solely those of the author and do not necessarily represent those of BHSF. If you are not the intended recipient, you must not copy, disclose or distribute its contents in any way.
If you have received this e-mail in error, please notify the sender and delete the e-mail from your system.
We have taken steps to ensure this e-mail and attachments are free from any virus but do not accept any responsibility once this e-mail has been transmitted. You should scan any attachments for viruses.
No contract may be concluded on behalf of BHSF Limited by e-mail.
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.