axxshodiq / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

Printer not accepting Job #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Expected : Print Successfull. 
Obtained : Printer not Accepting Job.

What version of the product are you using? On what operating system? ,on 
windows XP

Please provide any additional information below.

Original issue reported on code.google.com by cccchi...@gmail.com on 22 Dec 2011 at 7:06

GoogleCodeExporter commented 8 years ago
I have used the jZebra ,but jZebra also throwing the same problem ..Please 
suggest me some solution.

Original comment by cccchi...@gmail.com on 22 Dec 2011 at 7:07

GoogleCodeExporter commented 8 years ago
There is not enough information this bug report.

If you would like to include Java source, attach the .java file, not the .class 
file.

What version of the product are you using?
What are you trying to print?
What type of printer?
Can you supply sample code that you are using?

-Tres

Original comment by tres.fin...@gmail.com on 22 Dec 2011 at 5:43

GoogleCodeExporter commented 8 years ago
sorry for not providing enough info. But i really appreciate your quick reply, 
Actually i am not really using jZebra but using its concept (calling java 
function from java script like that..) I am trying to print couple of images 
from web page using applet. 
the code is attached below..when i run hp.html i got error that Printer is not 
accepting job . Even using jZebra from its sample2.html file i got the same 
error.

Thanks in advance,
Chirag Parmar

Original comment by cccchi...@gmail.com on 27 Dec 2011 at 7:03

Attachments:

GoogleCodeExporter commented 8 years ago
Are you calling print directly?  That is a violation of the java applet 
security.  I start a listener thread from init() and then invoke print from 
there.

Original comment by tres.fin...@gmail.com on 27 Dec 2011 at 2:50

GoogleCodeExporter commented 8 years ago
yes ,I am calling the Print Directly But that ask me for the access of printer 
,i also have created signed applet But still the same error comes ,IS it Bug 
with jdk1.7 ?

and how can i start listener thread from init() can you give me example?

Thank you so much tres for your replies.

I have attached the HP.JAVA file which i am using as applet with HP.HTML , if 
you find suitable time  please look at this. 

Thanks,
Chirag

Original comment by cccchi...@gmail.com on 28 Dec 2011 at 6:08

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Do a printStackTrace on your exception and you'll find the Security Framework 
is throwing the message.

You need to start a thread by the Applet and have external functions pass it 
parameters after it has already started running.

I accomplish this by implementing the Runnable interface and starting a while() 
loop in the overrides run() method.

http://jzebra.googlecode.com/svn/trunk/jZebra/src/jzebra/PrintApplet.java

The result is much more code to do the same thing that you are trying.

Please do not do e.getMessage().  If that's what you want to display to the 
user, that's ok, but you should put a stack trace to the console so that you 
know what's actually causing your error message.

-Tres

Original comment by tres.fin...@gmail.com on 28 Dec 2011 at 2:12

GoogleCodeExporter commented 8 years ago
Thanks tres.
your advice really helped me.

-Chirag

Original comment by cccchi...@gmail.com on 29 Dec 2011 at 2:20

GoogleCodeExporter commented 8 years ago
Closing bug and marking bug as invalid, as bug report has nothing to do with 
jzebra project.

Original comment by tres.fin...@gmail.com on 31 Dec 2011 at 2:20

GoogleCodeExporter commented 8 years ago

Original comment by tres.fin...@gmail.com on 22 Aug 2012 at 6:05