cete.dynamicpdf.pageelements.barcoding.stackedgs1databar
StackedGS1DataBar
- Namespace: ceTe.DynamicPDF.PageElements.BarCoding
- Assemblies: DynamicPDF.CoreSuite.dll
Represents a StackedGS1DataBar barcode.
public class StackedGS1DataBar : TaggablePageElement, ICoordinate, ISerializable
Public Class StackedGS1DataBar
Inherits TaggablePageElement
Implements ICoordinate, ISerializable
Inheritance: Object → PageElement → TaggablePageElement → StackedGS1DataBar
Implements: ICoordinate, ISerializable
Examples
The following example will place a GS1DataBar barcode on the page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.BarCoding
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
' Create a barcode
Dim barCode As StackedGS1DataBar = New StackedGS1DataBar("(01)9889876543210", 50, 50, 50, StackedGS1DataBarType.Stacked)
' Add the barcode to the page
MyPage.Elements.Add(barCode)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.BarCoding;
public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();
// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add( page );
// Create a barcode
StackedGS1DataBar barCode = new StackedGS1DataBar("(01)9889876543210", 50, 50, 50, StackedGS1DataBarType.Stacked);
// Add the barcode to the page
page.Elements.Add( barCode );
// Save the PDF
document.Draw(outputPath);
}
}
Remarks
This class can be used to place a StackedGS1DataBar barcode on a page.
Constructors
StackedGS1DataBar(String, Single, Single, Single, StackedGS1DataBarType)
Initializes a new instance of the StackedGS1DataBar class.
public StackedGS1DataBar(string value, float x, float y, float rowHeight, StackedGS1DataBarType gs1type)
Public Sub New (value As String, x As Single, y As Single, rowHeight As Single, gs1type As StackedGS1DataBarType)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- rowHeight: Single
The row height of the barcode.
- gs1type: StackedGS1DataBarType
The StackedGS1DataBarType of the barcode.
StackedGS1DataBar(String, Single, Single, Single, StackedGS1DataBarType, Boolean)
Initializes a new instance of the StackedGS1DataBar class.
public StackedGS1DataBar(string value, float x, float y, float rowHeight, StackedGS1DataBarType gs1type, bool showText)
Public Sub New (value As String, x As Single, y As Single, rowHeight As Single, gs1type As StackedGS1DataBarType, showText As Boolean)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- rowHeight: Single
The row height of the barcode.
- gs1type: StackedGS1DataBarType
The StackedGS1DataBarType of the barcode.
- showText: Boolean
true to display value of barcode as text. Otherwise, display barcode only.
StackedGS1DataBar(String, Single, Single, Single, StackedGS1DataBarType, Font, Single)
Initializes a new instance of the StackedGS1DataBar class.
public StackedGS1DataBar(string value, float x, float y, float rowHeight, StackedGS1DataBarType gs1type, Font font, float fontSize)
Public Sub New (value As String, x As Single, y As Single, rowHeight As Single, gs1type As StackedGS1DataBarType, font As Font, fontSize As Single)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- rowHeight: Single
The row height of the barcode.
- gs1type: StackedGS1DataBarType
The StackedGS1DataBarType of the barcode.
- font: Font
The font to use when displaying text.
- fontSize: Single
The font size to use when displaying text.
StackedGS1DataBar(String, Single, Single, Single, StackedGS1DataBarType, Single)
Initializes a new instance of the StackedGS1DataBar class.
public StackedGS1DataBar(string value, float x, float y, float rowHeight, StackedGS1DataBarType gs1type, float xDimension)
Public Sub New (value As String, x As Single, y As Single, rowHeight As Single, gs1type As StackedGS1DataBarType, xDimension As Single)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- rowHeight: Single
The row height of the barcode.
- gs1type: StackedGS1DataBarType
The StackedGS1DataBarType of the barcode.
- xDimension: Single
The XDimension of the barcode.
StackedGS1DataBar(String, Single, Single, Single, StackedGS1DataBarType, Single, Boolean)
Initializes a new instance of the StackedGS1DataBar class.
public StackedGS1DataBar(string value, float x, float y, float rowHeight, StackedGS1DataBarType gs1type, float xDimension, bool showText)
Public Sub New (value As String, x As Single, y As Single, rowHeight As Single, gs1type As StackedGS1DataBarType, xDimension As Single, showText As Boolean)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- rowHeight: Single
The row height of the barcode.
- gs1type: StackedGS1DataBarType
The StackedGS1DataBarType of the barcode.
- xDimension: Single
The XDimension of the barcode.
- showText: Boolean
true to display value of barcode as text. Otherwise, display barcode only.
StackedGS1DataBar(String, Single, Single, Single, StackedGS1DataBarType, Single, Font, Single)
Initializes a new instance of the StackedGS1DataBar class.
public StackedGS1DataBar(string value, float x, float y, float rowHeight, StackedGS1DataBarType gs1type, float xDimension, Font font, float fontSize)
Public Sub New (value As String, x As Single, y As Single, rowHeight As Single, gs1type As StackedGS1DataBarType, xDimension As Single, font As Font, fontSize As Single)
Parameters
- value: String
The value of the barcode.
- x: Single
The X coordinate of the barcode.
- y: Single
The Y coordinate of the barcode.
- rowHeight: Single
The row height of the barcode.
- gs1type: StackedGS1DataBarType
The StackedGS1DataBarType of the barcode.
- xDimension: Single
The XDimension of the barcode.
- font: Font
The font to use when displaying text.
- fontSize: Single
The font size to use when displaying text.
Properties
Angle
Gets or sets the angle of the barcode.
public float Angle { get; set; }
Public Property Angle As Single
Property Value
Color
Gets or sets the color for the barcode.
public Color Color { get; set; }
Public Property Color As Color
Property Value
ExpandedStackedSegmentCount
Gets or Sets the segment count of the Expanded Stacked barcode.
public int ExpandedStackedSegmentCount { get; set; }
Public Property ExpandedStackedSegmentCount As Int32
Property Value
Remarks
This is used only for the ExpandedStacked Gs1DataBar type.
Font
Gets or sets the font to use when displaying the text.
public Font Font { get; set; }
Public Property Font As Font
Property Value
FontSize
Gets or sets the font size to use when displaying the text.
public float FontSize { get; set; }
Public Property FontSize As Single
Property Value
ID
Gets or sets the ID of the page element. (Inherited from PageElement)
public string ID { get; set; }
Public Property ID As String
Property Value
IgnoreMargins
Gets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property. (Inherited from PageElement)
public bool IgnoreMargins { get; set; }
Public Property IgnoreMargins As Boolean
Property Value
Examples
The following example will place the Label in the top-left of the page with IgnoreMargin
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();
// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add(page); // Create an Label and place it in page top left with margin ignored
Label label = new Label("I am placed in Page top left with margin ignored", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
label.IgnoreMargin=true; page.Elements.Add(label);
// Save the PDF
document.Draw(outputPath);
}
}
PixelsPerXDimension
Gets or Sets the number of Pixels to write per xDimension
public int PixelsPerXDimension { get; set; }
Public Property PixelsPerXDimension As Int32
Property Value
RelativeTo
Gets and sets placement of the page element on the page. (Inherited from PageElement)
public RelativeTo RelativeTo { get; set; }
Public Property RelativeTo As RelativeTo
Property Value
Examples
The following example will place the Label in the top-left of the page.
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class Example
{
public static void CreatePDF(string outputPath)
{
// Create a PDF Document
Document document = new Document();
// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add(page); // Create an Label and place it in page top left with margin
Label label = new Label("I am placed in Page top left with margin.", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
page.Elements.Add(label);
// Save the PDF
document.Draw(outputPath);
}
}
RowCount
Gets the row count.
public int RowCount { get; }
Public Property RowCount As Int32
Property Value
Remarks
Linear barcode symbol structure is considered as a Row, Seperator patterns count is excluded if present.
RowHeight
Gets or Sets the row height of the Barcode.
public float RowHeight { get; set; }
Public Property RowHeight As Single
Property Value
ShowText
Gets or Sets a boolean indicating whether the text to be displayed.
public bool ShowText { get; set; }
Public Property ShowText As Boolean
Property Value
Tag
Gets or sets the tag of the taggable element. (Inherited from TaggablePageElement)
public Tag Tag { get; set; }
Public Property Tag As Tag
Property Value
TagOrder
Gets or sets the tag order of the taggable element. (Inherited from TaggablePageElement)
public int TagOrder { get; set; }
Public Property TagOrder As Int32
Property Value
TextAlign
Gets or sets the alignment to use when displaying the text.
public Align TextAlign { get; set; }
Public Property TextAlign As Align
Property Value
TextColor
Gets or set the color of the text.
public Color TextColor { get; set; }
Public Property TextColor As Color
Property Value
X
Gets or sets the X coordinate of the barcode.
public float X { get; set; }
Public Property X As Single
Property Value
XDimension
Gets or sets the xDimension of the barcode.
public float XDimension { get; set; }
Public Property XDimension As Single
Property Value
Y
Gets or sets the Y coordinate of the barcode.
public float Y { get; set; }
Public Property Y As Single
Property Value
Methods
Draw(PageWriter)
Draws the StackedGS1DataBar barcode to the given PageWriter object.
public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)
Parameters
- writer: PageWriter
PageWriter object to receive the StackedGS1DataBar barcode's output.
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
GetSymbolHeight()
Returns the height required to display the full barcode.
public float GetSymbolHeight()
Function GetSymbolHeight() As Single
Returns
A value representing the required height.
GetSymbolWidth()
Returns the width required to display the full barcode.
public float GetSymbolWidth()
Function GetSymbolWidth() As Single
Returns
A value representing the required width.
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .