Class PdfCode128BBarcode
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 PdfCode128BBarcode : PdfUnidimensionalBarcode
Remarks
Only the following symbols are allowed in a Code 128 B barcode:SPACE ! " # $ % ' ( ) * + , - . / 0 12 3 4 5 6 7 8 9 : ; ? @ 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 [ \ ]^ _ ` 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 { | } ~ DEL (\x7F) FNC1 (\xF0) FNC2 (\xF1) FNC3 (\xF2) FNC4 (\xF3) SHIFT (\xF4).
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 PdfCode128BBarcode.
PdfCode128BBarcode code128B = new PdfCode128BBarcode();
//Set the font to code128B.
code128B.Font = font;
//Set the barcode text.
code128B.Text = "CODE128B";
//Draw a barcode in the new Page.
code128B.Draw(page, new PointF(25, 500));
//Save the document to disk.
document.Save("Code128B.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 PdfCode128BBarcode.
Dim code32 As PdfCode128BBarcode = New PdfCode128BBarcode()
'Set the font to code128B.
code128B.Font = font;
'Set the barcode text.
code128B.Text = "Code128B"
'Draw a barcode in the new Page.
code128B.Draw(page, new PointF(25, 500))
'Save the document to disk.
document.Save("Code128B.pdf")
Constructors
PdfCode128BBarcode()
Initializes a new instance of the PdfCode128BBarcode class.
Declaration
public PdfCode128BBarcode()
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 PdfCode128BBarcode.
PdfCode128BBarcode code128B = new PdfCode128BBarcode();
//Set the font to code128B.
code128B.Font = font;
//Set the barcode text.
code128B.Text = "CODE128B";
//Draw a barcode in the new Page.
code128B.Draw(page, new PointF(25, 500));
//Save the document to disk.
document.Save("Code128B.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 PdfCode128BBarcode.
Dim code32 As PdfCode128BBarcode = New PdfCode128BBarcode()
'Set the font to code128B.
code128B.Font = font;
'Set the barcode text.
code128B.Text = "Code128B"
'Draw a barcode in the new Page.
code128B.Draw(page, new PointF(25, 500))
'Save the document to disk.
document.Save("Code128B.pdf")
PdfCode128BBarcode(String)
Initializes a new instance of the PdfCode128BBarcode class.
Declaration
public PdfCode128BBarcode(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 PdfCode128BBarcode.
PdfCode128BBarcode code128B = new PdfCode128BBarcode("Code128B");
//Set the font to code128B.
code128B.Font = font;
//Draw a barcode in the new Page.
code128B.Draw(page, new PointF(25, 500));
//Save the document to disk.
document.Save("Code128B.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 PdfCode128BBarcode.
Dim code32 As PdfCode128BBarcode = New PdfCode128BBarcode("Code128B")
'Set the font to code128B.
code128B.Font = font;
'Draw a barcode in the new Page.
code128B.Draw(page, new PointF(25, 500))
'Save the document to disk.
document.Save("Code128B.pdf")
Methods
CalculateCheckDigit()
Calculates the check digit for this barcode specification.
Declaration
protected override char[] CalculateCheckDigit()
Returns
Type | Description |
---|---|
System.Char[] | The Check digits. |