By: Yong Wang - wymz
Pls help: problem with printing
2002-10-31 08:13
I am trying to run the new print service sample code and got the following errors:
print:
[echo] **************************************************
[echo] * You need JDK 1.4 or higher to run this sample. *
[echo] * (the current JDK version is 1.4) *
[echo] **************************************************
[java] dori.jasper.engine.JRException: No suitable print service found.
[java] at dori.jasper.engine.export.JRPrintServiceExporter.exportReport (JRPrintServiceExporter.java:239)
[java] at PrintServiceApp.main(PrintServiceApp.java:154)
[java] Java Result: 1
The reason I am trying out this sample is that I want to be able to programmatically print some plain text content but with font/size control just like notepad does. Can this be done with this new feature? Thanks.
---Yong
By: Teodor Danciu - teodord
RE: Pls help: problem with printing
2002-10-31 13:07
Hi,
This is only an informative message for those
who might want to test the sample not having
JDK 1.4 installed.
As you know, the Java Print Service API comes
only with JDK 1.4.
You can remove the <echo> tags in the build.xml
file to get rid of the message.
The exception however, comes from the fact that
the program simply was unable to locate
a registered printer on your system, able to print
given the required properties.
In the original sample, the program tries to locate
a printer capable of printing A4 documents.
Apparently it didn't find any such printer registered
on your system.
Thank you,
Teodor
By: Yong Wang - wymz
RE: Pls help: problem with printing
2002-10-31 13:32
Hi Teodor, I tried the paper size of NA_LETTER and ISO_C6 and still got the same error. One thing I am not clear is the add printer name to the service set. I tried both "XRX4E" and "\\\\MATL1FS01\\XRX4E" and seems to make no difference.
Following is the supported flavors of my printer. I don't see it support PDF natively and naturally I can't use JPS to print. I thought you may have overcome these problems in JasperReport. Thank you for the help.
selected printer \\MATL1FS01\XRX4E
Supported DocFlavors are:
image/gif; class="[B"
image/gif; class="java.io.InputStream"
image/gif; class="java.net.URL"
image/jpeg; class="[B"
image/jpeg; class="java.io.InputStream"
image/jpeg; class="java.net.URL"
image/png; class="[B"
image/png; class="java.io.InputStream"
image/png; class="java.net.URL"
application/x-java-jvm-local-objectref; class="java.awt.print.Pageable"
application/x-java-jvm-local-objectref; class="java.awt.print.Printable"
application/octet-stream; class="[B"
application/octet-stream; class="java.net.URL"
application/octet-stream; class="java.io.InputStream"
application/postscript; class="[B"
application/postscript; class="java.io.InputStream"
application/postscript; class="java.net.URL"
By: Teodor Danciu - teodord
RE: Pls help: problem with printing
2002-10-31 13:47
Hi,
JasperReports does not use document flavor for
the moment because it does not print documents,
but rather 2D grapchis.
So, it does not send PDF to the printer. Not having
the PDF flavor listed is not the problem.
Try to not specify the printer name at all.
Or try to not specify any attributes and see what
available printers it displays in the print dialog,
if it opens it.
Thank you,
Teodor
Pls help: problem with printing
2002-10-31 08:13
I am trying to run the new print service sample code and got the following errors:
print:
[echo] **************************************************
[echo] * You need JDK 1.4 or higher to run this sample. *
[echo] * (the current JDK version is 1.4) *
[echo] **************************************************
[java] dori.jasper.engine.JRException: No suitable print service found.
[java] at dori.jasper.engine.export.JRPrintServiceExporter.exportReport (JRPrintServiceExporter.java:239)
[java] at PrintServiceApp.main(PrintServiceApp.java:154)
[java] Java Result: 1
The reason I am trying out this sample is that I want to be able to programmatically print some plain text content but with font/size control just like notepad does. Can this be done with this new feature? Thanks.
---Yong
By: Teodor Danciu - teodord
RE: Pls help: problem with printing
2002-10-31 13:07
Hi,
This is only an informative message for those
who might want to test the sample not having
JDK 1.4 installed.
As you know, the Java Print Service API comes
only with JDK 1.4.
You can remove the <echo> tags in the build.xml
file to get rid of the message.
The exception however, comes from the fact that
the program simply was unable to locate
a registered printer on your system, able to print
given the required properties.
In the original sample, the program tries to locate
a printer capable of printing A4 documents.
Apparently it didn't find any such printer registered
on your system.
Thank you,
Teodor
By: Yong Wang - wymz
RE: Pls help: problem with printing
2002-10-31 13:32
Hi Teodor, I tried the paper size of NA_LETTER and ISO_C6 and still got the same error. One thing I am not clear is the add printer name to the service set. I tried both "XRX4E" and "\\\\MATL1FS01\\XRX4E" and seems to make no difference.
Following is the supported flavors of my printer. I don't see it support PDF natively and naturally I can't use JPS to print. I thought you may have overcome these problems in JasperReport. Thank you for the help.
selected printer \\MATL1FS01\XRX4E
Supported DocFlavors are:
image/gif; class="[B"
image/gif; class="java.io.InputStream"
image/gif; class="java.net.URL"
image/jpeg; class="[B"
image/jpeg; class="java.io.InputStream"
image/jpeg; class="java.net.URL"
image/png; class="[B"
image/png; class="java.io.InputStream"
image/png; class="java.net.URL"
application/x-java-jvm-local-objectref; class="java.awt.print.Pageable"
application/x-java-jvm-local-objectref; class="java.awt.print.Printable"
application/octet-stream; class="[B"
application/octet-stream; class="java.net.URL"
application/octet-stream; class="java.io.InputStream"
application/postscript; class="[B"
application/postscript; class="java.io.InputStream"
application/postscript; class="java.net.URL"
By: Teodor Danciu - teodord
RE: Pls help: problem with printing
2002-10-31 13:47
Hi,
JasperReports does not use document flavor for
the moment because it does not print documents,
but rather 2D grapchis.
So, it does not send PDF to the printer. Not having
the PDF flavor listed is not the problem.
Try to not specify the printer name at all.
Or try to not specify any attributes and see what
available printers it displays in the print dialog,
if it opens it.
Thank you,
Teodor
0 Answers:
No answers yet