Xamarin.Android

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfEan8Barcode - Xamarin.Android API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfEan8Barcode

    Represents the PdfEan8 barcode.

    Inheritance
    System.Object
    PdfBarcode
    PdfUnidimensionalBarcode
    PdfEan8Barcode
    Inherited Members
    PdfUnidimensionalBarcode.check
    PdfUnidimensionalBarcode.Validate(String)
    PdfUnidimensionalBarcode.GetSizeValue()
    PdfUnidimensionalBarcode.GetExtendedTextValue()
    PdfUnidimensionalBarcode.CalculateCheckDigit()
    PdfUnidimensionalBarcode.GetTextToEncodeList()
    PdfUnidimensionalBarcode.PaintRectangle(PdfPageBase, RectangleF)
    PdfUnidimensionalBarcode.Font
    PdfUnidimensionalBarcode.TextDisplayLocation
    PdfUnidimensionalBarcode.ShowCheckDigit
    PdfUnidimensionalBarcode.EnableCheckDigit
    PdfUnidimensionalBarcode.BarcodeToTextGapHeight
    PdfUnidimensionalBarcode.TextAlignment
    PdfUnidimensionalBarcode.EncodeStartStopSymbols
    PdfBarcode.bounds
    PdfBarcode.size
    PdfBarcode.barHeight
    PdfBarcode.barHeightEnabled
    PdfBarcode.BackColor
    PdfBarcode.BarColor
    PdfBarcode.TextColor
    PdfBarcode.NarrowBarWidth
    PdfBarcode.Text
    PdfBarcode.Location
    PdfBarcode.QuietZone
    PdfBarcode.BarHeight
    PdfBarcode.Size
    PdfBarcode.Bounds
    Namespace: Syncfusion.Pdf.Barcode
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfEan8Barcode : PdfUnidimensionalBarcode
    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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode();
    //Set the barcode text.
    barcode.Text = "1234567";
    barcode.Location = new PointF(100,100);
    //Draw a barcode in the new Page.
    barcode.Draw(page);
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
    'Set the barcode text.
    barcode.Text = "1234567"
    barcode.Location = new PointF(100,100);
    'Draw a barcode in the new Page.
    barcode.Draw(page)
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")

    Constructors

    PdfEan8Barcode()

    Initializes a new instance of the PdfEan8Barcode class.

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

    PdfEan8Barcode(String)

    Initializes a new instance of the PdfEan8Barcode class.

    Declaration
    public PdfEan8Barcode(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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode("1234567");
    //Set the font to Ean8.
    barcode.Font = font;
    //Draw a barcode in the new Page.
    barcode.Draw(page, new PointF(25, 100));
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode("1234567")
    'Set the font to Ean8.
    barcode.Font = font
    'Draw a barcode in the new Page.
    barcode.Draw(page, new PointF(25, 100))
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")

    Methods

    CheckNumericOnly(String)

    Declaration
    protected bool CheckNumericOnly(string data)
    Parameters
    Type Name Description
    System.String data
    Returns
    Type Description
    System.Boolean

    Draw(PdfPageBase)

    Draws the barcode on the PdfPage.

    Declaration
    public virtual void Draw(PdfPageBase page)
    Parameters
    Type Name Description
    PdfPageBase page

    The PDF page.

    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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode();
    //Set the barcode text.
    barcode.Text = "1234567";
    barcode.Location = new PointF(100,100);
    //Draw a barcode in the new Page.
    barcode.Draw(page);
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
    'Set the barcode text.
    barcode.Text = "1234567"
    barcode.Location = new PointF(100,100);
    'Draw a barcode in the new Page.
    barcode.Draw(page)
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")

    Draw(PdfPageBase, PointF)

    Draws the barcode on the PdfPage at the specified location.

    Declaration
    public virtual void Draw(PdfPageBase page, PointF location)
    Parameters
    Type Name Description
    PdfPageBase page

    The pdf page.

    PointF location

    The barcode location.

    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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode();
    //Set the barcode text.
    barcode.Text = "1234567";
    //Draw a barcode in the new Page.
    barcode.Draw(page, new PointF(25, 100));
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
    'Set the barcode text.
    barcode.Text = "1234567"
    'Draw a barcode in the new Page.
    barcode.Draw(page, New PointF(25, 100))
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")

    Draw(PdfPageBase, PointF, SizeF)

    Draw PdfEan8Barcode based on location and size values.

    Declaration
    public void Draw(PdfPageBase page, PointF location, SizeF size)
    Parameters
    Type Name Description
    PdfPageBase page

    The PDF page.

    PointF location

    The location of the barcode on the PDF page.

    SizeF size

    The size of the barcode.

    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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode();
    //Set the barcode text.
    barcode.Text = "1234567";
    //Draw a barcode in the new Page.
    barcode.Draw(page, new PointF(25, 100), new SizeF(200,200));
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
    'Set the barcode text.
    barcode.Text = "1234567"
    'Draw a barcode in the new Page.
    barcode.Draw(page, New PointF(25, 200), New SizeF(200, 200))
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")

    Draw(PdfPageBase, RectangleF)

    Draw PdfEan8Barcode based on rectangle input values.

    Declaration
    public void Draw(PdfPageBase page, RectangleF rectangle)
    Parameters
    Type Name Description
    PdfPageBase page

    The PDF page.

    RectangleF rectangle

    The bounds of the barcode.

    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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode();
    //Set the barcode text.
    barcode.Text = "1234567";
    //Draw a barcode in the new Page.
    barcode.Draw(page, new RectangleF(25, 100, 200, 200));
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
    'Set the barcode text.
    barcode.Text = "1234567"
    'Draw a barcode in the new Page.
    barcode.Draw(page, New RectangleF(25, 100, 200, 200))
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")

    Draw(PdfPageBase, Single, Single, Single, Single)

    Draw PdfEan8Barcode based on float input values.

    Declaration
    public void Draw(PdfPageBase page, float x, float y, float width, float height)
    Parameters
    Type Name Description
    PdfPageBase page

    The PDF page.

    System.Single x

    The x-coordinate of the upper-left corner of the bounding rectangle.

    System.Single y

    The y-coordinate of the upper-top corner of the bounding rectangle.

    System.Single width

    The width of the bounding rectangle.

    System.Single height

    The height of the bounding rectangle.

    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 PdfEan8Barcode.
    PdfEan8Barcode barcode = new PdfEan8Barcode();
    //Set the barcode text.
    barcode.Text = "1234567";
    //Draw a barcode in the new Page.
    barcode.Draw(page, 25, 100, 200, 200);
    //Save the  document to disk.
    document.Save("Ean8Barcode.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 PdfEan8Barcode.
    Dim barcode As PdfEan8Barcode = New PdfEan8Barcode()
    'Set the barcode text.
    barcode.Text = "1234567"
    'Draw a barcode in the new Page.
    barcode.Draw(page, 25, 100, 200, 200)
    'Save the  document to disk.
    document.Save("Ean8Barcode.pdf")
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved