ByteScout BarCode Generator SDK - VBScript - Set Barcode Size - ByteScout

ByteScout BarCode Generator SDK – VBScript – Set Barcode Size

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – VBScript – Set Barcode Size

How to set barcode size in VBScript and ByteScout Barcode SDK

The tutorial shows how to set barcode size in VBScript

These source code samples are listed and grouped by their programming language and functions they use. ByteScout Barcode SDK: the robost library (Software Development Kit) that is designed for automatic generation of high-quality barcodes for printing, electronic documents and pdf. All popular barcode types are supported from Code 39 and Code 129 to QR Code, UPC, GS1, GS-128, Datamatrix, PDF417, Maxicode and many others. Provides support for full customization of fonts, colors, output and printing sizes. Special tools are included to verify output quality and printing quality. Can add generated barcode into new or existing documents, images and PDF. It can set barcode size in VBScript.

Fast application programming interfaces of ByteScout Barcode SDK for VBScript plus the instruction and the code below will help you quickly learn how to set barcode size. Follow the instructions from the scratch to work and copy the VBScript code. Code testing will allow the function to be tested and work properly with your data.

Free trial version of ByteScout Barcode SDK is available on our website. Documentation and source code samples are included.

Try ByteScout Barcode SDK today: Get 60 Day Free Trial or sign up for Web API

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

Try ByteScout Barcode SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)



Get 60 Day Free Trial or Visit ByteScout Barcode SDK page

Explore ByteScout Barcode SDK documentation


Sign Up for free Web API key

Explore Web API Documentation