menu

WPF

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

    Show / Hide Table of Contents

    Enum PdfBarcodeTextAlignment

    Namespace: Syncfusion.Pdf.Barcode
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfBarcodeTextAlignment
    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();
    //Creates a new PdfCode93Barcode.
    PdfCode93Barcode code93 = new PdfCode93Barcode();
    //Set the barcode text alignment
    code93.TextAlignment = PdfBarcodeTextAlignment.Center;
    //Draw a barcode in the new Page.
    code93.Draw(page, new PointF(25, 500));
    //Save document to disk.
    document.Save("Barcode.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()
    'Creates a new PdfCode93Barcode.
    Dim code39 As PdfCode93Barcode = New PdfCode93Barcode()
    'Set the barcode text alignment
    code93.TextAlignment = PdfBarcodeTextAlignment.Center
    'Draw a barcode in the new Page.
    code93.Draw(page, new PointF(25, 500))
    'Save the document.
    document.Save("Barcode.pdf")

    Fields

    Name Description
    Center

    Displays the readable text at the center of the barcode.

    Left

    Displays the readable text on the left side of the barcode.

    Right

    Displays the readable text on the right side of the barcode.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved