ByteScout BarCode Generator SDK - C# - Set Barcode Margins - ByteScout

ByteScout BarCode Generator SDK – C# – Set Barcode Margins

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

How to set barcode margins in C# and ByteScout Barcode SDK

How to set barcode margins in C#

Learn how to set barcode margins in C# with this source code sample. 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 margins in C#.

This code snippet below for ByteScout Barcode SDK works best when you need to quickly set barcode margins in your C# application. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! This basic programming language sample code for C# will do the whole work for you to set barcode margins.

You can download free trial version of ByteScout Barcode SDK from our website to see and try many others source code samples for C#.

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

Program.cs
      
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 new margins barcode.Margins = new Margins(0, 0, 100, 100); // Save barcode to image barcode.SaveImage("result.png"); // Show image in default image viewer Process.Start("result.png"); } } }

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

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout Barcode SDK page

Explore ByteScout Barcode SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next