How to generate barcode (jquery) async API for barcode generator API in JavaScript and Web API

How to generate barcode (jquery) async API in JavaScript with easy ByteScout code samples to make barcode generator API. Step-by-step tutorial

The documentation is designed to help you to implement the features on your side. Web API was made to help with barcode generator API in JavaScript. Web API is the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

JavaScript code samples for JavaScript developers help to speed up the application’s code writing when using Web API. For implimentation of this functionality, please copy and paste code below into your app using code editor. Then compile and run your app. Use of Web API in JavaScript is also explained in the documentation included along with the product.

Trial version of ByteScout is available for free download from our website. This and other source code samples for JavaScript and other programming languages are available.

Try Web API today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

var apiKey = ""; $(document).ready(function () { $("#resultBlock").hide(); $("#errorBlock").hide(); }); $(document).on("click", "#submit", function () { apiKey = $("#apiKey").val().trim(); //Get your API key by registering at var url = ""; url += "&type=" + $("#barcodeType").val(); // Set barcode type (symbology) url += "&value=" + $("#inputValue").val(); // Set barcode value url += "&async=True"; // Set async // Show loader $("#loader").show(); $.ajax({ url: url, type: "GET", headers: { "x-api-key": apiKey }, }) .done(function (data, textStatus, jqXHR) { if (data.error) { $("#errorBlock").show(); $("#error").html(data.message); $("#loader").hide(); } else { checkIfJobIsCompleted(data.jobId, data.url); } }) .fail(function (jqXHR, textStatus, errorThrown) { $("#errorBlock").show(); $("#error").html("Request failed. Please check you use the correct API key."); $("#loader").hide(); }); }); function checkIfJobIsCompleted(jobId, resultFileUrl) { $.ajax({ url: '' + jobId, type: 'GET', headers: { 'x-api-key': apiKey }, // passing our api key success: function (jobResult) { $("#status").html(jobResult.status + ' &nbsp;&nbsp;&nbsp; <img src="ajax-loader.gif" />'); if (jobResult.status == "working") { // Check again after 3 seconds setTimeout(function(){ checkIfJobIsCompleted(jobId, resultFileUrl); }, 3000); } else if (jobResult.status == "success") { $("#resultBlock").show(); $("#image").attr("src", resultFileUrl); } $("#loader").hide(); }, error: function(){ $("#errorBlock").show(); $("#error").html("Request failed. Please check you use the correct API key."); $("#loader").hide(); } }); }

Try Web API today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit Web API Home Page

Explore Web API Documentation

Get Web API Free Training


Get Your Free API Key

Explore Web API Documentation

Related Samples: