Closed GoogleCodeExporter closed 8 years ago
Forgot the image of my jQuery files
Original comment by francces...@gmail.com
on 16 Nov 2013 at 9:02
Attachments:
oops...this is all the HTML I'm using for qz-print, left out a couple of lines
<input type="button" onclick="findPrinter()" value="Detect Printer"/><br />
<input id="printer" type="text" value="EPSON TM-T20 Receipt" size="15"/><br />
<input type="button" onclick="printEPL()" value="Print EPL" /><br />
Original comment by francces...@gmail.com
on 16 Nov 2013 at 9:04
Just switched to version qz-print_1.6.2_src that a coligue of my was working
with and changed the code on the page to what is below. Now getting the errors
in the image I attached.
HTML
<asp:Content runat="server" ContentPlaceHolderID="cph">
<table border="1px" cellpadding="5px" cellspacing="0px"><tr>
<td valign="top"><h2>All Printers</h2>
<input type="button" onclick="findPrinter()" value="Detect Printer"/><br />
<applet id="qz" name="QZ Print Plugin" code="qz.PrintApplet.class" archive="qz-print/qz-print.jar" width="50px" height="50px">
<!-- Optional, searches for printer with "zebra" in the name on load -->
<!-- Note: It is recommended to use qz.findPrinter() instead for ajax heavy applications -->
<param name="printer" value="EPSON TM-T20 Receipt"/>
<!-- ALL OF THE CACHE OPTIONS HAVE BEEN REMOVED DUE TO A BUG WITH JAVA 7 UPDATE 25 -->
<!-- Optional, these "cache_" params enable faster loading "caching" of the applet -->
<!-- <param name="cache_option" value="plugin"> -->
<!-- Change "cache_archive" to point to relative URL of qz-print.jar -->
<!-- <param name="cache_archive" value="./qz-print.jar"> -->
<!-- Change "cache_version" to reflect current qz-print version -->
<!-- <param name="cache_version" value="1.4.9.1"> -->
</applet><br />
</td><td valign="top"><h2>Raw Printers Only</h2>
<a href="http://code.google.com/p/jzebra/wiki/WhatIsRawPrinting" target="new">What is Raw Printing?</a><br />
<input type="button" onclick="print()" value="Print" /><br />
</td></tr>
</table>
..............
..............
SCRIPT
<script type="text/javascript">
var qz; // Our main applet
function findPrinter() {
if (qz != null) {
// Searches for locally installed printer with "zebra" in the name
qz.findPrinter("EPSON TM-T20 Receipt");
}
// *Note: monitorFinding() still works but is too complicated and
// outdated. Instead create a JavaScript function called
// "jzebraDoneFinding()" and handle your next steps there.
monitorFinding();
}
function findPrinters() {
if (qz != null) {
// Searches for locally installed printer with "zebra" in the name
qz.findPrinter("\\{dummy printer name for listing\\}");
}
monitorFinding2();
}
...........
...........
Original comment by francces...@gmail.com
on 16 Nov 2013 at 9:36
Attachments:
Second way also still works in IE but Chrome and Firefox throw the error in the
image
Original comment by francces...@gmail.com
on 16 Nov 2013 at 9:40
@franccescalee:
Incompatible magic value is generally a sign that the Jar file is corrupt.
The deployJava() function from Oracle I'm finding has several problems.
Please note, since 1.7.0, your applet tags should look like this:
<applet id="qz" archive="./qz-print.jar" name="QZ Print Plugin"
code="qz.PrintApplet.class" width="55" height="55">
<param name="jnlp_href" value="qz-print_jnlp.jnlp">
<param name="cache_option" value="plugin">
<param name="disable_logging" value="false">
<param name="initial_focus" value="false">
</applet>
Lastly, note that IIS users need to allow JNLP file extensions, Issue 171.
-Tres
Original comment by tres.fin...@gmail.com
on 17 Nov 2013 at 1:46
One more thing... if the browser is complete freezing, it is likely a bug with
Java.
It has been plaguing the project for years, but I've had a hard time
pinpointing it...
- Sometimes it is timing related to when the applet tags are loaded.
- I've read that some versions of jQuery don't play nicely with applets.
- Sometimes the applet is persistent and it crashes the browser on refresh or
back/forward.
- For some its just been caused by an invalid JNLP path
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6668033
http://stackoverflow.com/questions/7885715/java-applet-deadlock-on-chrome-on-win
-7-64-with-either-jre-1-6-0-29-or-1-7-0-1
https://groups.google.com/forum/#!topic/jquery-dev/xnSD5Yyqy_0
Original comment by tres.fin...@gmail.com
on 17 Nov 2013 at 2:03
- Added workaround for possible browser lock-up, documented here:
https://bugs.launchpad.net/ubuntu/+source/firefox-3.0/+bug/331962
One poster suggests this seems to affect many platforms (i.e. Windows) let me
know if this addresses any of the sporadic lock-up issues.
-Tres
Original comment by tres.fin...@gmail.com
on 5 Dec 2013 at 3:47
^--- 1.8.0 and higher. :)
Original comment by tres.fin...@gmail.com
on 5 Dec 2013 at 3:47
Original comment by tres.fin...@gmail.com
on 5 Dec 2013 at 3:49
same problem here (since updating to jquery 1.10.2)
Original comment by andreas....@gmail.com
on 30 Dec 2013 at 3:56
I've had a client suggest changing cache_option to "no" had helped with this
issue. Please test and post your progress.
Original comment by tres.fin...@gmail.com
on 19 Jan 2014 at 4:15
Hi Guys, i have the same issue, my browser freeze when i reload usign f5 or
ctrl + r or use back nav button, after googling around i found this:
<param name="cache_option" value="plugin">
<param name="cache_archive" value="<?php echo base_url(); ?>qz-print.jar">
the problem seems to be solved!
Original comment by MatheusD...@gmail.com
on 28 Jan 2014 at 4:11
@Matheus,
I've had people emailing various work-arounds but none of them seem to be
universal. Any confirmation on this would be fantastic.
To do this via deployJava would look like this:
var parameters = {
jnlp_href: 'qz-print_jnlp.jnlp',
cache_option:'plugin',
cache_archive:'qz-print.jar',
disable_logging:'false',
initial_focus:'false'
};
Caching has caused some troubles with clients when they upgrade, so we've had
mixed feeling and mixed success, so I'd like some more feedback before changing
this in sample.html.
-Tres
Original comment by tres.fin...@gmail.com
on 28 Jan 2014 at 6:40
Original issue reported on code.google.com by
francces...@gmail.com
on 16 Nov 2013 at 9:01