Barcode.Draw

Overloads

Draw(Single, ImageFormat)Draw barcode image.
Draw(Single, Single, ImageFormat)Draw barcode image.
Draw(String, Single, ImageFormat)Draw barcode image.
Draw(String, Single, Single, ImageFormat)Draw barcode image.

Draw(Single, ImageFormat)

Draw barcode image.

public Byte[] Draw(float dpi, ImageFormat imageFormat)
Function Draw(dpi As Single, imageFormat As ImageFormat) As Byte()

Parameters

dpi
Single

Image resolution for barcode image.

imageFormat
ImageFormat

Image format for barcode image.

Returns

Byte[]

Image data as byte array.

Licensing Info

This method is a DynamicBarcode Creator feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to output the barcode image to a byte array.

Imports System
Imports ceTe.DynamicBarcode.Creator

Module MyModule

   Sub Main()

        ' Create a barcode object.
        Dim barcode As Code11 = New Code11("12345678", 50)

        ' Save the barcode image to a byte array
        Dim MyBarcodeData As Byte() = barcode.Draw(96, ImageFormat.Png)

   End Sub
End Module
using System;
using ceTe.DynamicBarcode.Creator;

class MyClass
{
    static void Main()
    {
        // Create a barcode object.
        Code11 barcode = new Code11("12345678", 50);

        // Save the barcode image to a byte array
       byte[] barcodeData =  barcode.Draw(96, ImageFormat.Png);
       
    }
}

Draw(Single, Single, ImageFormat)

Draw barcode image.

public Byte[] Draw(float horizontalDpi, float verticalDpi, ImageFormat imageFormat)
Function Draw(horizontalDpi As Single, verticalDpi As Single, imageFormat As ImageFormat) As Byte()

Parameters

horizontalDpi
Single

Horizontal resolution for barcode image.

verticalDpi
Single

Vertical resolution for barcode image.

imageFormat
ImageFormat

Image format for barcode image.

Returns

Byte[]

Image data as byte array.

Licensing Info

This method is a DynamicBarcode Creator feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to output the barcode image to a byte array.

Imports System
Imports ceTe.DynamicBarcode.Creator

Module MyModule

   Sub Main()

        ' Create a barcode object.
        Dim barcode As Code11 = New Code11("12345678", 50)

        ' Save the barcode image to a byte array
        Dim MyBarcodeData As Byte() = barcode.Draw(96, 96, ImageFormat.Png)

   End Sub
End Module
using System;
using ceTe.DynamicBarcode.Creator;

class MyClass
{
    static void Main()
    {
        // Create a barcode object.
        Code11 barcode = new Code11("12345678", 50);

        // Save the barcode image to a byte array
       byte[] barcodeData = barcode.Draw(96, 96, ImageFormat.Png);
    }
}

Draw(String, Single, ImageFormat)

Draw barcode image.

public void Draw(string filePath, float dpi, ImageFormat imageFormat)
Sub Draw(filePath As String, dpi As Single, imageFormat As ImageFormat)

Parameters

filePath
String

Input file path to save image.

dpi
Single

Image resolution for barcode image.

imageFormat
ImageFormat

Image format for barcode image.

Licensing Info

This method is a DynamicBarcode Creator feature. One of the following is required for non-evaluation usage:

Examples

The following example will Draw a Codabar barcode image.

Imports System
Imports ceTe.DynamicBarcode.Creator

Module MyModule

   Sub Main()

        'Create a barcode object.
        Dim barcode As Codabar = New Codabar("A1234A", 100)

        'Draw barcode image.
        barcode.Draw("C:\barcode.png", 96, ImageFormat.Png)
        
   End Sub
End Module
using System;
using ceTe.DynamicBarcode.Creator;

class MyClass
{ 
    static void Main()
    {
        // Create a barcode object.
        Codabar barcode = new Codabar("A1234A", 100);

        // Draw barcode image.
       barcode.Draw(@"C:\barcode.png", 96, ImageFormat.Png);
       
    }
}

Draw(String, Single, Single, ImageFormat)

Draw barcode image.

public void Draw(string filePath, float horizontalDpi, float verticalDpi, ImageFormat imageFormat)
Sub Draw(filePath As String, horizontalDpi As Single, verticalDpi As Single, imageFormat As ImageFormat)

Parameters

filePath
String

Input file path to save image.

horizontalDpi
Single

Horizontal resolution for barcode image.

verticalDpi
Single

Vertical resolution for barcode image.

imageFormat
ImageFormat

Image format for barcode image.

Licensing Info

This method is a DynamicBarcode Creator feature. One of the following is required for non-evaluation usage:

Examples

The following example will Draw a Codabar barcode image.

Imports System
Imports ceTe.DynamicBarcode.Creator

Module MyModule

   Sub Main()

        'Create a barcode object.
        Dim barcode As Codabar = New Codabar("A1234A", 100)

        'Draw barcode image.
        barcode.Draw("C:\barcode.png", 96, 96, ImageFormat.Png)

   End Sub
End Module
using System;
using ceTe.DynamicBarcode.Creator;

class MyClass
{ 
    static void Main()
    {
        // Create a barcode object.
        Codabar barcode = new Codabar("A1234A", 100);

        // Draw barcode image.
       barcode.Draw(@"C:\barcode.png", 96, 96, ImageFormat.Png);
       
    }
}

See Also

Barcode
ceTe.DynamicBarcode.Creator

In this topic