OZ e-Form Developer
  • OZ e-Form Concepts
  • 🌈e-Form DEVELOPER
    • Day 1: Welcome On Board
      • About Course
      • Preparations
      • OZ e-Form Overview
    • Day 2: e-Form Design
      • Designer Environments
      • e-Form Layout Structure
      • e-Form Components
      • e-Form From Documents
      • Preview / Export / Save
      • Hands-on Practice
    • Day 3: Dynamic e-Form
      • e-Form Scripting Guide
      • Hands-on Practice
      • Advanced Features
    • Day 4: e-Form Application
      • Server Deployment
      • Viewer In HTML
      • Viewer APIs
      • Prefilling e-Form
      • Submitting e-Form
      • Sending MemoryStream
    • Get Your Certificate
    • Design Guide
      • Dialogue Flow
        • Overview
        • Creating Dialogue Flow
        • Uploading e-Form to Server
        • Running Dialogue Flow
        • Group and Statement
        • Custom Styling
      • Multilingual e-Form
      • Miscellaneous
      • Videosign
        • Videosign User Guide
      • OZ Verifier
        • OZ Verifier Introduction
        • Implementation and Use
        • Requirements
      • HTML5 Editor
        • HTML5 Editor Introduction
        • HTML Editor
        • Requirements and Sample
    • Day 5. Server & Reporting
  • 🌈Server Developer
    • OZ Server Console
    • OZ Scheduler
      • Features
      • Installing OZ Scheduler
      • Scheduler Task
    • Binding & Exporting
      • Overview
      • Export API Example
        • Extract Input Data
        • Export with OZ Server
        • Export with Scheduler
        • Export with Scheduler Task
    • Repository Server
    • Sync Server
      • Overview
      • Installing Sync-Server
        • SSL configration
      • Sample Application
      • Implementation
    • QR Link Mobile Sign
  • 🌈Report Developer
    • Overview
      • About Course
      • Preparation
      • Report Designer Overview
    • Query Design
      • Database Connection
      • Designer Environment
      • Dataset Design
    • Report Design
      • Designer Environment
      • Components
      • Table
      • Master-Detail
      • ODI Parameter
      • CrossTab
      • Chart
  • 🌈MOBILE DEVELOPER
    • Android Native
    • iOS Native
    • TOTO Framework
      • TOTO Overview
      • Sample App Overview
      • Server Application
      • Android Project
  • ⬇️Product Downloads
  • 📚 Product Documentation
  • 📕Technical Guide
  • ⚛️ ReactJS Integration
Powered by GitBook
On this page

Was this helpful?

  1. Server Developer
  2. Binding & Exporting
  3. Export API Example

Extract Input Data

Use OZ Viewer API

OZViewer.GetInformation("INPUT_JSON_ALL")

export.html
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta charset="UTF-8"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" type="text/css"/>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="/html5viewer/ui.dynatree.css" type="text/css"/>
<script type="text/javascript" src="/html5viewer/jquery.dynatree.js" charset="utf-8"></script>
<script type="text/javascript" src="/html5viewer/OZJSViewer.js" charset="utf-8"></script>
<script type="text/javascript" src="/html5viewer/pdf_js/web/compatibility.js"></script>  
<script type="text/javascript" src="/html5viewer/pdf_js/build/pdf.js"></script>
</head>
<body>
<div style="text-align:center">
<form id="form">
    <input type="hidden" id="ozrName" name="ozrName">
    <input type="hidden" id="exportFormat" name="exportFormat">
    <input type="hidden" id="inputData"	name="inputData">
    <span >e-Form Export Request To  </span>
    <input type="button" value="OZViewerExport"	onclick="exportForm('OZViewerExport')" >
    <input type="button" value="export"	onclick="exportForm('export')" >
    <input type="button" value="directExport"	onclick="exportForm('directExport')" >
</form>
</div>
<div id="OZViewer" style="width: 98vw; height: 90vh;">	</div>

<script type="text/javascript" >

var exportFormat = "pdf";
var ozrName = "KYC_Form";

function exportForm(service) {
    if (OZViewer.GetInformation("INPUT_CHECK_VALIDITY") == 'valid') {
	var inputData = OZViewer.GetInformation("INPUT_JSON_ALL");
	$('#ozrName').val(ozrName);
	$('#exportFormat').val(exportFormat);
	$('#inputData').val(inputData);
	var data = $('form').serialize();
	console.log(data);
		
	$.ajax({
	    type : "POST",
	    url : service + ".jsp",
	    data : data,
	    async : false,
	    success : exportCallback,
	    error : function(request, status, error) {
		if (request.status != '0') {
		    alert("code : " + request.status + "\r\nmessage : "	+ request.reponseText + "\r\nerror : " + error);
		}
		alert("Failed to export.");
	    }
        }); 
    }
}
var exportCallback = function(resp){
	console.log(resp);
};

function SetOZParamters_OZViewer()	{	
    var oz = document.getElementById("OZViewer");
    oz.sendToActionScript("connection.servlet", "/oz/server");
    oz.sendToActionScript("connection.reportname","/demo/KYC_Form.ozr");
    return true;
}
start_ozjs("OZViewer", "/html5viewer/");

</script>
</body>
</html>
PreviousExport API ExampleNextExport with OZ Server

Last updated 2 years ago

Was this helpful?

🌈