menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfCode128BBarcode - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfCode128BBarcode

    Inheritance
    System.Object
    PdfBarcode
    PdfUnidimensionalBarcode
    PdfCode128BBarcode
    Inherited Members
    PdfBarcode.BackColor
    PdfBarcode.BarColor
    PdfBarcode.barHeight
    PdfBarcode.BarHeight
    PdfBarcode.bounds
    PdfBarcode.Bounds
    PdfBarcode.Location
    PdfBarcode.NarrowBarWidth
    PdfBarcode.QuietZone
    PdfBarcode.size
    PdfBarcode.Size
    PdfBarcode.Text
    PdfBarcode.TextColor
    PdfUnidimensionalBarcode.BarcodeToTextGapHeight
    PdfUnidimensionalBarcode.check
    PdfUnidimensionalBarcode.Draw(PdfGraphics)
    PdfUnidimensionalBarcode.Draw(PdfGraphics, PointF)
    PdfUnidimensionalBarcode.Draw(PdfGraphics, PointF, SizeF)
    PdfUnidimensionalBarcode.Draw(PdfGraphics, RectangleF)
    PdfUnidimensionalBarcode.Draw(PdfGraphics, Single, Single, Single, Single)
    PdfUnidimensionalBarcode.Draw(PdfPageBase)
    PdfUnidimensionalBarcode.Draw(PdfPageBase, PointF)
    PdfUnidimensionalBarcode.Draw(PdfPageBase, PointF, SizeF)
    PdfUnidimensionalBarcode.Draw(PdfPageBase, RectangleF)
    PdfUnidimensionalBarcode.Draw(PdfPageBase, Single, Single, Single, Single)
    PdfUnidimensionalBarcode.EnableCheckDigit
    PdfUnidimensionalBarcode.EncodeStartStopSymbols
    PdfUnidimensionalBarcode.Font
    PdfUnidimensionalBarcode.GetExtendedTextValue()
    PdfUnidimensionalBarcode.GetSizeValue()
    PdfUnidimensionalBarcode.PaintRectangle(PdfGraphics, RectangleF)
    PdfUnidimensionalBarcode.PaintRectangle(PdfPageBase, RectangleF)
    PdfUnidimensionalBarcode.PaintRectangleTag(PdfTemplate, RectangleF)
    PdfUnidimensionalBarcode.ShowCheckDigit
    PdfUnidimensionalBarcode.TextAlignment
    PdfUnidimensionalBarcode.TextDisplayLocation
    PdfUnidimensionalBarcode.ToImage()
    PdfUnidimensionalBarcode.ToImage(SizeF)
    PdfUnidimensionalBarcode.Validate(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    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.

    Overrides
    PdfUnidimensionalBarcode.CalculateCheckDigit()

    See Also

    PdfCodabarBarcode
    PdfCode32Barcode
    PdfCode11Barcode
    PdfCode128ABarcode
    PdfCode128CBarcode
    PdfCode39Barcode
    PdfCode39ExtendedBarcode
    PdfCode93Barcode
    PdfCode93ExtendedBarcode
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved