menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfCode32Barcode - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfCode32Barcode

    Inheritance
    System.Object
    PdfBarcode
    PdfUnidimensionalBarcode
    PdfCode39Barcode
    PdfCode32Barcode
    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.Validate(String)
    Namespace: Syncfusion.Pdf.Barcode
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfCode32Barcode : PdfCode39Barcode
    Remarks

    Only the following symbols are allowed in a Code 32 barcode: 1 2 3 4 5 6 7 8 9 0. The barcode length is 9 digits (8 user defined digits + 1 check digit). Code 32 barcodes are also known as Italian Pharmacode barcodes.

    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 PdfCode32Barcode.
    PdfCode32Barcode code32 = new PdfCode32Barcode();
    //Set the font to code32.
    code32.Font = font;
    //Set the barcode text.
    code32.Text = "01234567";
    //Draw a barcode in the new Page.
    code32.Draw(page, new PointF(25, 500));
    //Save the  document to disk.
    document.Save("Code32.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 PdfCode32Barcode.
    Dim code32 As PdfCode32Barcode = New PdfCode32Barcode()
    'Set the font to code32.
    code32.Font = font
    'Set the barcode text.
    code32.Text = "01234567"
    'Draw a barcode in the new Page.
    code32.Draw(page, new PointF(25, 500))
    'Save the document to disk.
    document.Save("Code32.pdf")

    Constructors

    PdfCode32Barcode()

    Initializes a new instance of the PdfCode32Barcode class.

    Declaration
    public PdfCode32Barcode()
    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 PdfCode32Barcode.
    PdfCode32Barcode code32 = new PdfCode32Barcode();
    //Set the font to code32.
    code32.Font = font;
    //Set the barcode text.
    code32.Text = "01234567";
    //Draw a barcode in the new Page.
    code32.Draw(page, new PointF(25, 500));
    //Save the  document to disk.
    document.Save("Code32.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 PdfCode32Barcode.
    Dim code32 As PdfCode32Barcode = New PdfCode32Barcode()
    'Set the font to code32.
    code32.Font = font
    'Set the barcode text.
    code32.Text = "01234567"
    'Draw a barcode in the new Page.
    code32.Draw(page, new PointF(25, 500))
    'Save the  document to disk.
    document.Save("Code32.pdf")

    PdfCode32Barcode(String)

    Initializes a new instance of the PdfCode32Barcode class.

    Declaration
    public PdfCode32Barcode(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 PdfCode32Barcode.
    PdfCode32Barcode code32 = new PdfCode32Barcode("01234567");
    //Set the font to code32.
    code32.Font = font;
    //Draw a barcode in the new Page.
    code32.Draw(page, new PointF(25, 500));
    //Save the  document to disk.
    document.Save("Code32.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 PdfCode32Barcode.
    Dim code32 As PdfCode32Barcode = New PdfCode32Barcode("01234567")
    'Set the font to code32.
    code32.Font = font
    'Draw a barcode in the new Page.
    code32.Draw(page, new PointF(25, 500))
    'Save the  document to disk.
    document.Save("Code32.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
    PdfCode39Barcode.CalculateCheckDigit()

    GetDataToEncode(String)

    To get the Actual Encoded Text from from original Text..

    Declaration
    protected string GetDataToEncode(string originalData)
    Parameters
    Type Name Description
    System.String originalData

    The original data.

    Returns
    Type Description
    System.String

    original Data

    ObtainBarcodeSymbols()

    Gets the barcode symbols.

    Declaration
    protected string ObtainBarcodeSymbols()
    Returns
    Type Description
    System.String

    Encoded data

    Extension Methods

    PdfBarcodeExtension.ToImage(PdfUnidimensionalBarcode)
    PdfBarcodeExtension.ToImage(PdfUnidimensionalBarcode, SizeF)

    See Also

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