ByteScout Cloud API Server - Barcode Generator API - VB.NET - Generate Barcode - ByteScout

ByteScout Cloud API Server – Barcode Generator API – VB.NET – Generate Barcode

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – Barcode Generator API – VB.NET – Generate Barcode

How to generate barcode for barcode generator API in VB.NET and ByteScout Cloud API Server

Step By Step Instructions on how to generate barcode for barcode generator API in VB.NET

This page displays the step-by-step instructions and algorithm of how to generate barcode and how to apply it in your application. ByteScout Cloud API Server helps with barcode generator API in VB.NET. ByteScout Cloud API Server is the ready to use Web API Server that can be deployed in less than 30 minutes into your own in-house server or into private cloud server. Can store data on in-house local server based storage or in Amazon AWS S3 bucket. Processing data solely on the server using buil-in ByteScout powered engine, no cloud services are used to process your data!.

The SDK samples displayed below below explain how to quickly make your application do barcode generator API in VB.NET with the help of ByteScout Cloud API Server. For implementation of this functionality, please copy and paste the code below into your app using code editor. Then compile and run your app. You can use these VB.NET sample examples in one or many applications.

Trial version of ByteScout is available for free download from our website. This and other source code samples for VB.NET 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)

Module1.vb
      
Imports System.IO Imports System.Net Imports Newtonsoft.Json.Linq ' Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost". ' If it's not then please replace this with with your hosting url. Module Module1 ' Result file name Const ResultFileName As String = ".\barcode.png" ' Barcode type. Const BarcodeType As String = "Code128" ' Barcode value Const BarcodeValue As String = "qweasd123456" Sub Main() ' Create standard .NET web client instance Dim webClient As WebClient = New WebClient() ' Prepare URL for `Barcode Generator` API call Dim query As String = Uri.EscapeUriString(string.Format( "https://localhost/barcode/generate?name={0}&type={1}&value={2}", Path.GetFileName(ResultFileName), BarcodeType, BarcodeValue)) Try ' Execute request Dim response As String = webClient.DownloadString(query) ' Parse JSON response Dim json As JObject = JObject.Parse(response) If json("error").ToObject(Of Boolean) = False Then ' Get URL of generated barcode image file Dim resultFileURI As string = json("url").ToString() ' Download the image file webClient.DownloadFile(resultFileURI, ResultFileName) Console.WriteLine("Generated barcode saved to ""{0}"" file.", ResultFileName) Else Console.WriteLine(json("message").ToString()) End If Catch ex As WebException Console.WriteLine(ex.ToString()) End Try webClient.Dispose() Console.WriteLine() Console.WriteLine("Press any key...") Console.ReadKey() End Sub End Module

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

packages.config
      
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net40" /> </packages>

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next