ByteScout BarCode Generator SDK - C# - Set Custom Barcode Caption - ByteScout

ByteScout BarCode Generator SDK – C# – Set Custom Barcode Caption

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – C# – Set Custom Barcode Caption

How to set custom barcode caption in C# and ByteScout Barcode SDK

How to code in C# to set custom barcode caption with this step-by-step tutorial

These source code samples are listed and grouped by their programming language and functions they use. What is ByteScout Barcode SDK? It is the robost SDK that generates high quality barcode images and pdf. Can generate all popular types of barcodes from QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix to more exotic barcode types. Fully customizable fonts, colors, print sizes. Includes special functions to ensure output quality, and tools for adding barcodes to new or existing pdf files and images. It can help you to set custom barcode caption in your C# application.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Barcode SDK for set custom barcode caption below and use it in your application. Follow the instructions from the scratch to work and copy the C# code. This basic programming language sample code for C# will do the whole work for you to set custom barcode caption.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.

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

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

Program.cs
      
using System; using System.Collections.Generic; using System.Drawing; 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 custom caption by setting .Caption property (default caption is the barcode value) barcode.Caption = "Custom caption"; // Set caption font barcode.CaptionFont = new Font("Comic Sans MS", 12); // Set caption position barcode.CaptionPosition = CaptionPosition.Above; // Save barcode to image barcode.SaveImage("result.png"); // Show image in default image viewer Process.Start("result.png"); } } }

ON-PREMISE OFFLINE SDK

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

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 SDK Home Page

Explore ByteScout Barcode SDK Documentation

Explore Samples

Sign Up for ByteScout Barcode SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next