Class PdfCode93Barcode
Inheritance
System.Object
PdfCode93Barcode
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.Pdf.Barcode
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfCode93Barcode : PdfUnidimensionalBarcode
Remarks
Only the following symbols are allowed in a Code 93 barcode: 1 2 3 4 5 6 7 8 9 0 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - . $ / + % SPACE All alphabetic characters are uppercase. If lowercase characters are required, then a Code 93 Extended barcode must be used.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
//Creates a new PdfCode93Barcode.
PdfCode93Barcode code93 = new PdfCode93Barcode();
//Set the font to code93.
code93.Font = font;
//Set the barcode text.
code93.Text = "CODE93";
//Draw a barcode in the new Page.
code93.Draw(page, new PointF(25, 500));
//Save the document to disk.
document.Save("Code93.pdf");
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Create font and font style.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
'Creates a new PdfCode93Barcode.
Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
'Set the font to code93.
code93.Font = font
'Set the barcode text.
code93.Text = "CODE93"
'Draw a barcode in the new Page.
code93.Draw(page, new PointF(25, 500))
'Save the document to disk.
document.Save("code93.pdf")
Constructors
PdfCode93Barcode()
Initializes a new instance of the PdfCode93Barcode class.
Declaration
public PdfCode93Barcode()
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
//Creates a new PdfCode93Barcode.
PdfCode93Barcode code93 = new PdfCode93Barcode();
//Set the font to code93.
code93.Font = font;
//Set the barcode text.
code93.Text = "CODE93";
//Draw a barcode in the new Page.
code93.Draw(page, new PointF(25, 500));
//Save the document to disk.
document.Save("Code93.pdf");
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Create font and font style.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
'Creates a new PdfCode93Barcode.
Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
'Set the font to code93.
code93.Font = font
'Set the barcode text.
code93.Text = "CODE93"
'Draw a barcode in the new Page.
code93.Draw(page, new PointF(25, 500))
'Save the document to disk.
document.Save("code93.pdf")
PdfCode93Barcode(String)
Initializes a new instance of the PdfCode93Barcode class.
Declaration
public PdfCode93Barcode(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The Barcode text. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = document.Pages.Add();
//Create font and font style.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold) ;
//Creates a new PdfCode93Barcode.
PdfCode93Barcode code93 = new PdfCode93Barcode("CODE93");
//Set the font to code93.
code93.Font = font;
//Draw a barcode in the new Page.
code93.Draw(page, new PointF(25, 500));
//Save the document to disk.
document.Save("Code93.pdf");
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Creates a new page and adds it as the last page of the document
Dim page As PdfPage = document.Pages.Add()
'Create font and font style.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 12f, PdfFontStyle.Bold)
'Creates a new PdfCode93Barcode.
Dim code39 As PdfCode93Barcode = New PdfCode93Barcode("CODE93")
'Set the font to code93.
code93.Font = font
'Draw a barcode in the new Page.
code93.Draw(page, new PointF(25, 500))
'Save the document to disk.
document.Save("code93.pdf")
Methods
CalculateCheckDigit()
Calculates the check digit for this barcode specification.
Declaration
protected override char[] CalculateCheckDigit()
Returns
Type | Description |
---|---|
System.Char[] | The Check digits. |
Overrides
GetCheckSumSymbols()
Internal method to calculate the check-digit
Declaration
protected char[] GetCheckSumSymbols()
Returns
Type | Description |
---|---|
System.Char[] | symbols |