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.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)


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 = ""; var oData = { name: 'barcode.png', type: $("#barcodeType").val(), // Set barcode type (symbology) value: $("#inputValue").val(), // Set barcode value async: true }; // Show loader $("#loader").show(); $.ajax({ url: url, data: oData, 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: 'POST', 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(); } }); }



Get 60 Day Free Trial

See also:


Get Your API Key

See also: