<< Click to Display Table of Contents >>
OZPrintCommand Example - HTML5 Viewer
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" type="text/css"/>
<script src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://127.0.0.1:8080/ozrviewer/ui.dynatree.css" type="text/css"/>
<script type="text/javascript" src="http://127.0.0.1:8080/ozrviewer/jquery.dynatree.js" charset="utf-8"></script>
<script type="text/javascript" src="http://127.0.0.1:8080/ozrviewer/OZJSViewer.js" charset="utf-8"></script>
<!-- If you want to run the HTML5SVG viewer please change the OZJSViewer.js to OZJSSVGViewer.js.
<script type="text/javascript" src="http://127.0.0.1:8080/ozrviewer/OZJSSVGViewer.js" charset="utf-8"></script>
-->
<script language="JavaScript">
function OZPrintCommand_OZViewer(msg, code, reportname, printername, printcopy, printpages, printrange, username, printerdrivername, printpagesrange) {
if(code==0) {
alert(msg);
alert(reportname);
alert(printcopy);
alert(printpages);
alert(printrange);
alert(username);
alert(printpagesrange);
}
}
</script>
</head>
<body style="width:98%;height:98%">
<div id="OZViewer" style="width:98%;height:98%"></div>
<script type="text/javascript" >
function SetOZParamters_OZViewer(){
var oz;
oz = document.getElementById("OZViewer");
oz.sendToActionScript("connection.servlet","http://127.0.0.1:8080/oz/server");
oz.sendToActionScript("connection.reportname","sample.ozr");
oz.sendToActionScript("viewer.printcommand","true");
return true;
}
start_ozjs("OZViewer","http://127.0.0.1:8080/ozrviewer/");
</script>
</body>
</html>