Setting Code 39 Barcode Size in C#

C# Code 39 Size Setting

To help users have a better understanding about setting Code 39 image size, OnBarcode provides details of Code 39 size setting in C#. And users can easily adjust Code 39 barcode size with the following OnBarcode products:



How to generate, print barcode using .NET, Java sdk library control with example project source code free download:


Code 39 Structure

  • W : the width of Code 39.
  • Q : the width of the quiet zone; Q min = 10X.
  • I : the width of the intercharacter gap; this is a multiple of X; I min = X.
  • C : the number of encoded Code 39 data characters (including module 43 check character if used).
  • X : the width of Code 39 narrow bar; X min = 1 pixel.
  • N : the wide bar to narrow bar ratio; from 2.0 to 3.0, inclusive.



Setting Code 39 Barcode Size in C#

Basic information you should know

Code 39 barcode width, W (measured in pixel), including quiet zones, can be computed from the expression below:

W = ( C + 2 ) ( 3N + 6 ) X + ( C + 1 ) I + 2Q

Code 39 barcode height is user-defined. So you can adjust the barcode height through Top and Bottom Margin settings in C# Code 39 generator according to your applications.

c# code 128 barcode generator, barcode generator in vb.net code project, code 128 barcode excel macro, reportviewer barcode font, c# code to create barcode, c# ean 13 barcode check digit


Three Situations for Setting Code 39 Barcode Size in C#

Setting Code 39 barcode size in C# Code 39 Generator may have three situations:

Situation 1:

If you want to create a Code 39 with a minimum X, please do as below:
  • Set the minimum value of X.
  • Set the AutoResize option to be false.
  • Customize other properties.
Eg1. Set in C# Code 39 generator:
code39.X = 3;
code39.AutoResize = false;
code39.I = code39.X;
Other properties: default;
The generated Code 39 image is:


Situation 2:

If you want to generate a Code 39 with a fixed barcode image width (W), and try to draw maximum barcode module (X) as possible, please do as follows:
  • Set the fixed value of barcode image width (W).
  • Set the AutoResize option to be true.
  • Customize other properties.
Eg2. Set in C# Code 39 generator:
code39.BarcodeWidth = 250;
code39.BarcodeHeight = 60;
code39.AutoResize = true;
code39.I = code39.X;
Other properties: default;
The generated Code 39 image is:

In the above Code 39 image, the bar module (X) is 2 pixel, which is the maximum bar module.





OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.