3. Declare an OZ Viewer object using the <div> tag.
<body style="width:98%;height:94%">
<h4 style="text-align: center;">OZ e-Form in HTML page</h4>
<!-- Divison for OZ Viewer -->
<div id="OZViewer" style="width:98%;height:98%"></div>
4. Set parameters for server connection and OZR file location with SetOZParamters_OZViewer().
5. Sart the viewer with start_ozjs().
<script type="text/javascript" >
var url = "http://" + location.host;
function SetOZParamters_OZViewer(){ // prepare viewer parameters
// get the object from the "OZViewer" <div>
var oz = document.getElementById("OZViewer");
// oz server url(path)
oz.sendToActionScript("connection.servlet", url + "/training/server");
// eform file path (relative to the repository server)
oz.sendToActionScript("connection.reportname","/forcs/john.kim/customer.ozr");
return true;
}
start_ozjs("OZViewer", url + "/html5viewer/"); // run HTML5 JS viewer
</script>
</body>
</html>
Make sure to use the div id OZViewer as below. They must be the same.
6. Save the file and open it with a browser.
Using PDF
If you imported PDF documents or attached PDF files to the report, add code lines below.
<!-- When using a PDF document or attaching a PDF file to a report, load files below.-->
<script type="text/javascript" src="/html5viewer/pdf_js/web/compatibility.js" charset="utf-8"></script>
<script type="text/javascript" src="/html5viewer/pdf_js/build/pdf.js" charset="utf-8"></script>
Mobile UX
For mobile devices, you can use jQuery mobile. Just add references below.