The sample source codes on this page shows how to set wide to narrow ratio in C#. ByteScout Barcode SDK is the fully featured library to generate barcodes. Supports QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix and many other barcode types. Includes various options for barcode generation to ensure output quality, add barcodes to new or existing pdf files and images. It can be used to set wide to narrow ratio using C#.
This rich sample source code in C# for ByteScout Barcode SDK includes the number of functions and options you should do calling the API to set wide to narrow ratio. In your C# project or application you may simply copy & paste the code and then run your app! Enjoy writing a code with ready-to-use sample C# codes.
Free trial version of ByteScout Barcode SDK is available on our website. Documentation and source code samples are included.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using Bytescout.BarCode; namespace Sample { class Program { static void Main(string[] args) { // Create new barcode Barcode barcode = new Barcode(); // Set symbology barcode.Symbology = SymbologyType.Codabar; // Set value barcode.Value = "123456"; // Set wide to narrow ratio barcode.WideToNarrowRatio = 10; // Save barcode to image barcode.SaveImage("result.png"); // Show image in default image viewer Process.Start("result.png"); } } }
60 Day Free Trial or Visit ByteScout Barcode SDK Home Page
Explore ByteScout Barcode SDK Documentation
Explore Samples
Sign Up for ByteScout Barcode SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode SDK Home Page
Explore ByteScout Barcode SDK Documentation
Explore Samples
Sign Up for ByteScout Barcode SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: