ByteScout Barcode Suite - VBScript - Set barcode size with barcode sdk - ByteScout

ByteScout Barcode Suite – VBScript – Set barcode size with barcode sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – VBScript – Set barcode size with barcode sdk

How to set barcode size with barcode sdk in VBScript with ByteScout Barcode Suite

Step-by-step tutorial on how to set barcode size with barcode sdk in VBScript

Quickly learn how to set barcode size with barcode sdk in VBScript with this sample source code. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK). It can set barcode size with barcode sdk in VBScript.

The following code snippet for ByteScout Barcode Suite works best when you need to quickly set barcode size with barcode sdk in your VBScript application. Follow the instructions from scratch to work and copy the VBScript code. Use of ByteScout Barcode Suite in VBScript is also described in the documentation included along with the product.

All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.

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

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

FitInto.vbs
      
Set bc = CreateObject("Bytescout.BarCode.Barcode") ' Display information about Code39 symbology msgbox "Easiest way to specify barcode size is to use FitInto_3(width, height, unitOfMeasure) method." & vbCRLF & "Let's generate barcode of 500x300 pixels." ' Set symbology to Code39 bc.Symbology = 1 ' 1 = Code39 symbology type ' Set barcode value to encode bc.Value = "012345" ' Set barcode size by specifying dimensions the barcode will be fit into. ' 3rd parameter is the unit of measure: 0 - Pixel, 1 - Point (1/72 inch), 2 - Inch, 3 - document unit (1/300 inch), 4 - Millimeter, 5 - Centimeter, 6 - Twip(1/20 inch). ' We use 3rd parameter as 0 (Pixel). bc.FitInto_3 500, 300, 0 msgbox "Generated barcode is saved into 'result.png' file" bc.SaveImage "result.png" Set bc = Nothing ' Open the output file in default app Set shell = CreateObject("WScript.Shell") shell.Run "result.png", 1, false Set shell = Nothing

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite 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 Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next