Class GeneratedBarcode
A barcode generated by IronBarCode.
In addition to exporting the barcode as a graphic, we may also resize it, recolor it and annotate it with this class using fluent notation.
GeneratedBarcodes may be exported as Images, Objects or PDF files. They may also be exported as HTML for use on the web.
Inheritance
Namespace: IronBarCode
Assembly: IronBarCode.dll
Syntax
public class GeneratedBarcode : Object
Properties
BarcodeType
Gets the BarcodeEncoding type of this barcode.
Declaration
public BarcodeEncoding BarcodeType { get; }
Property Value
Type | Description |
---|---|
BarcodeEncoding | The type of the barcode. |
BinaryStream
Returns a System.IO.Stream of the barcode rendered as a Bitmap image.
Declaration
public Stream BinaryStream { get; }
Property Value
Type | Description |
---|---|
System.IO.Stream | The barcode image as a binary stream. |
BinaryValue
Gets the value of the barcode as binary data
Declaration
public byte[] BinaryValue { get; }
Property Value
Type | Description |
---|---|
System.Byte[] | The barcode value as a byte array. |
Height
Gets the final height of the generated barcode image in pixels.
Includes the height of margins and annotations
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The height in px |
Image
Returns the barcode as an IronSoftware.Drawing.AnyBitmap
Declaration
public AnyBitmap Image { get; }
Property Value
Type | Description |
---|---|
IronSoftware.Drawing.AnyBitmap | A IronSoftware.Drawing.AnyBitmap |
Value
Gets the text value if the barcode
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String | The barcode value. |
Width
Gets the final width of the generated barcode image in pixels.
Includes the width of margins and annotations
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The width in px |
Methods
AddAnnotationTextAboveBarcode(String)
Annotates the barcode with any string of text.
the text is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, Font, Color)
Annotates the barcode with any string of text.
the text is rendered above the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, Font FontFace, Color FontColor)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, Font, Color, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, Font FontFace, Color FontColor, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, Font, Color, String, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, Font FontFace, Color FontColor, string FontPath, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, Font, Color, String, Int32, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, Font FontFace, Color FontColor, string FontPath, int TopTextSpacing = 0, int BottomTextSpacing = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TopTextSpacing | The top margin of the annotation text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, Int32, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.Int32 | TopTextSpacing | The top margin of the annotation text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, String, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, string FontPath, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextAboveBarcode(String, String, Int32, Int32)
Annotates the barcode with any string of text.
the text is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextAboveBarcode(string AnnotationText, string FontPath, int TopTextSpacing = 0, int BottomTextSpacing = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TopTextSpacing | The top margin of the annotation text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String)
Annotates the barcode with any string of text.
the text is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, Font, Color)
Annotates the barcode with any string of text.
the text is rendered below the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, Font FontFace, Color FontColor)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, Font, Color, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, Font FontFace, Color FontColor, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, Font, Color, String, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, Font FontFace, Color FontColor, string FontPath, int TextSpacing = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, Font, Color, String, Int32, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, Font FontFace, Color FontColor, string FontPath, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
IronSoftware.Drawing.Font | FontFace | The typeface of the annotation text. |
IronSoftware.Drawing.Color | FontColor | Color of the annotation text. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TopTextSpacing | The top margin of the annotation text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, Int32, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.Int32 | TopTextSpacing | The top margin of the annotation text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, String, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, string FontPath, int TextSpacing = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TextSpacing | The top and bottom spacing of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddAnnotationTextBelowBarcode(String, String, Int32, Int32)
Annotates the barcode with any string of text.
the text is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddAnnotationTextBelowBarcode(string AnnotationText, string FontPath, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | AnnotationText | The annotation text to be displayed. |
System.String | FontPath | Path to the Font of the annotation text. This may be a relative or a full absolute path. |
System.Int32 | TopTextSpacing | The top margin of the annotation text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the annotation text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode()
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode()
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(Font, Color)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(Font FontFace, Color FontColor)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Font | FontFace | The typeface of the barcode value text. |
IronSoftware.Drawing.Color | FontColor | Color of the barcode value text. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(Font, Color, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(Font FontFace, Color FontColor, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Font | FontFace | The typeface of the barcode value text. |
IronSoftware.Drawing.Color | FontColor | Color of the barcode value text. |
System.Int32 | TextSpacing | The top and bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(Font, Color, Int32, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(Font FontFace, Color FontColor, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Font | FontFace | The typeface of the barcode value text. |
IronSoftware.Drawing.Color | FontColor | Color of the barcode value text. |
System.Int32 | TopTextSpacing | The top spacing of the barcode value text in pixels. |
System.Int32 | BottomTextSpacing | The bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TextSpacing | The top and bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(Int32, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TopTextSpacing | The top spacing of the barcode value text in pixels. |
System.Int32 | BottomTextSpacing | The bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(String)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(string FontPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FontPath | Path to the Font of the barcode value text. This may be a relative or a full absolute path. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(String, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(string FontPath, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | FontPath | Path to the Font of the barcode value text. This may be a relative or a full absolute path. |
System.Int32 | TextSpacing | The top and bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextAboveBarcode(String, Int32, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered above the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextAboveBarcode(string FontPath, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | FontPath | Path to the Font of the barcode value text. This may be a relative or a full absolute path. |
System.Int32 | TopTextSpacing | The top spacing of the barcode value text in pixels. |
System.Int32 | BottomTextSpacing | The bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode()
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode()
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(Font, Color)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(Font FontFace, Color FontColor)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Font | FontFace | The typeface of the barcode value text. |
IronSoftware.Drawing.Color | FontColor | Color of the barcode value text. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(Font, Color, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(Font FontFace, Color FontColor, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Font | FontFace | The typeface of the barcode value text. |
IronSoftware.Drawing.Color | FontColor | Color of the barcode value text. |
System.Int32 | TextSpacing | The top and bottom spacing for barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(Font, Color, Int32, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(Font FontFace, Color FontColor, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Font | FontFace | The typeface of the barcode value text. |
IronSoftware.Drawing.Color | FontColor | Color of the barcode value text. |
System.Int32 | TopTextSpacing | The top margin of the barcode value text in pixels. |
System.Int32 | BottomTextSpacing | The bottom of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TextSpacing | The top and bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(Int32, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | TopTextSpacing | The top spacing of the barcode value text in pixels. |
System.Int32 | BottomTextSpacing | The bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(String)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(string FontPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FontPath | Path to the Font of the barcode value text. This may be a relative or a full absolute path. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(String, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(string FontPath, int TextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | FontPath | Path to the Font of the barcode value text. This may be a relative or a full absolute path. |
System.Int32 | TextSpacing | The top and bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
AddBarcodeValueTextBelowBarcode(String, Int32, Int32)
Annotates the barcode with text showing it's value.
the barcode value is rendered below the barcode. Overloads of this method allow for the typeface and font size to be specific in detail.
Declaration
public GeneratedBarcode AddBarcodeValueTextBelowBarcode(string FontPath, int TopTextSpacing, int BottomTextSpacing)
Parameters
Type | Name | Description |
---|---|---|
System.String | FontPath | Path to the Font of the barcode value text. This may be a relative or a full absolute path. |
System.Int32 | TopTextSpacing | The top spacing of the barcode value text in pixels. |
System.Int32 | BottomTextSpacing | The bottom spacing of the barcode value text in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
ChangeBackgroundColor(Color)
Sets the background color behind the barcode.
Declaration
public GeneratedBarcode ChangeBackgroundColor(Color BackgroundColor)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Color | BackgroundColor | Color of the background. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
ChangeBarCodeColor(Color, Boolean)
Sets the barcode color.
Declaration
public GeneratedBarcode ChangeBarCodeColor(Color BarcodeColor, bool ForcedChangeColor = false)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.Color | BarcodeColor | Color of the barcode (foreground). |
System.Boolean | ForcedChangeColor | If ForcedChangeColor is true will skip checking by reading engine. Default is false. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
KeepAspectRatio(Boolean, BarCodeAspectSide)
Keep Aspect Ratio When resizing BarCode
Declaration
public GeneratedBarcode KeepAspectRatio(bool keepAspectRatio, BarCodeAspectSide barCodeAspectSide)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | keepAspectRatio | Is Keep Aspect Ratio. |
BarCodeAspectSide | barCodeAspectSide | Side (Horizontal / Vertical) that need to keep. (Default is Horizontal) |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
ResizeTo(Int32, Int32)
Resizes the Barcode (excluding annotations and margins). This process causes a re-render and is lossless.
Declaration
public GeneratedBarcode ResizeTo(int MaxWidth, int MaxHeight)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | MaxWidth | The maximum width of the barcode in px. May be ignored if the value is too small for the barcode to be read. |
System.Int32 | MaxHeight | The maximum height of the barcode in px. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
ResizeToMil(Double, Double, Int32)
Resize the barcode using the specified 'mil' width (thousandths of an inch)
Declaration
public GeneratedBarcode ResizeToMil(double MilWidth, double InchHeight = 1, int DPI = 96)
Parameters
Type | Name | Description |
---|---|---|
System.Double | MilWidth | The width of the narrowest barcode element, in thousandths of an inch. |
System.Double | InchHeight | The height of the barcode in inch. (Default is 1 inch) |
System.Int32 | DPI | Dots-per-inch (Default is 96) |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsGif(String)
Saves the barcode as a GIF image file.
Declaration
public GeneratedBarcode SaveAsGif(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | The file path for the GIF. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsHtmlFile(String)
Saves the Barcode as fully functional and self-contained HTML file.
The image encoding will automatically match the file extension specified in your ImagePath. Defaults to Bitmap image encoding if ambiguous.
Declaration
public GeneratedBarcode SaveAsHtmlFile(string HtmlFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | HtmlFilePath | The file path where the HTML document will be saved. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
See Also
SaveAsImage(String)
Saves the Barcode as an image file.
The image encoding will automatically match the file extension specified in your ImagePath. Defaults to Bitmap image encoding if ambiguous.
Declaration
public GeneratedBarcode SaveAsImage(string ImagePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | ImagePath | The file path where the image will be saved to disk. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsJpeg(String)
Saves the barcode as a JPEG image file.
Declaration
public GeneratedBarcode SaveAsJpeg(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | The file path for the JPEG. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsPdf(String)
Saves the barcode as a new PDF document.
Declaration
public GeneratedBarcode SaveAsPdf(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | The file path for the PDF. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsPng(String)
Saves the barcode as a PNG image file.
Declaration
public GeneratedBarcode SaveAsPng(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | The file path for the PNG. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsTiff(String)
Saves the barcode as a TIFF image file.
Declaration
public GeneratedBarcode SaveAsTiff(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | The file path for the TIFF. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SaveAsWindowsBitmap(String)
Saves the barcode as a BMP image file.
Declaration
public GeneratedBarcode SaveAsWindowsBitmap(string FilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | FilePath | The file path for the BMP. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SetMargins(Int32)
Sets whitespace margins around the barcode.
Declaration
public GeneratedBarcode SetMargins(int PixelWidth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | PixelWidth | Width of margins in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
SetMargins(Int32, Int32, Int32, Int32)
Sets whitespace margins around the barcode.
Declaration
public GeneratedBarcode SetMargins(int Top, int Right, int Bottom, int Left)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | Top | The top margin in pixels. |
System.Int32 | Right | The right margin in pixels. |
System.Int32 | Bottom | The bottom in pixels. |
System.Int32 | Left | The left margin in pixels. |
Returns
Type | Description |
---|---|
GeneratedBarcode | This instance of GeneratedBarcode allowing for a fluent programming style. |
StampToExistingPdfPage(String, Int32, Int32, Int32, String)
Stamps (draws) the Barcode onto an existing page of an existing PDF document.
Declaration
public GeneratedBarcode StampToExistingPdfPage(string PdfFilePath, int X, int Y, int PageNumber = 1, string Password = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | PdfFilePath | The file path of the PDF which will have the Barcode added to it.. |
System.Int32 | X | The horizontal position of the barcode on the PDF page in pixels |
System.Int32 | Y | The vertical position of the barcode on the PDF page in pixels |
System.Int32 | PageNumber | The page of the PDF to stamp. [One Based] such that the first page is number 1 rather than 0. |
System.String | Password | The PDF encryption or administrator password if this PDF is digitally protected from modification or opening. |
Returns
Type | Description |
---|---|
GeneratedBarcode |
StampToExistingPdfPages(String, Int32, Int32, IEnumerable<Int32>, String)
Stamps (draws) the Barcode onto multiple existing pages of an existing PDF document.
Declaration
public GeneratedBarcode StampToExistingPdfPages(string PdfFilePath, int X, int Y, IEnumerable<int> PageNumbers, string Password = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | PdfFilePath | The file path of the PDF which will have the Barcode added to it.. |
System.Int32 | X | The horizontal position of the barcode on each PDF page in pixels |
System.Int32 | Y | The vertical position of the barcode on each PDF page in pixels |
System.Collections.Generic.IEnumerable<System.Int32> | PageNumbers | The page numbers of the PDF to stamp as an enumeration, list or array. [One Based] such that the first page is number 1 rather than 0. |
System.String | Password | The PDF encryption or administrator password if this PDF is digitally protected from modification or opening. |
Returns
Type | Description |
---|---|
GeneratedBarcode |
ToBitmap()
Returns the barcode as an IronSoftware.Drawing.AnyBitmap
Declaration
public AnyBitmap ToBitmap()
Returns
Type | Description |
---|---|
IronSoftware.Drawing.AnyBitmap | A IronSoftware.Drawing.AnyBitmap |
ToDataUrl()
Converts the barcode to a base64 data URL.
The data URI scheme is a uniform resource identifier (URI) scheme that provides a way to include data in-line in web pages as if they were external resources.
Declaration
public string ToDataUrl()
Returns
Type | Description |
---|---|
System.String | The Data URL as a string. |
See Also
ToGifBinaryData()
Returns the barcode as the binary data for a GIF image.
Declaration
public byte[] ToGifBinaryData()
Returns
Type | Description |
---|---|
System.Byte[] | A byte array |
ToGifStream()
Returns the barcode as a System.IO.MemoryStream of the binary data for a GIF image.
Declaration
public MemoryStream ToGifStream()
Returns
Type | Description |
---|---|
System.IO.MemoryStream | System.IO.Stream |
ToHtmlTag()
Renders the barcode as a HTML image Tag. The tag is fully formed (using a data-url> and can be injected into HTML with no JS, CSS or image dependencies.
Declaration
public string ToHtmlTag()
Returns
Type | Description |
---|---|
System.String | An Html img tag as a string. |
ToImage()
Returns the barcode as an IronSoftware.Drawing.AnyBitmap
Declaration
public AnyBitmap ToImage()
Returns
Type | Description |
---|---|
IronSoftware.Drawing.AnyBitmap | A IronSoftware.Drawing.AnyBitmap |
ToJpegBinaryData()
Returns the barcode as the binary data for a JPEG/JPG image.
Declaration
public byte[] ToJpegBinaryData()
Returns
Type | Description |
---|---|
System.Byte[] | A byte array |
ToJpegStream()
Returns the barcode as a System.IO.MemoryStream of the binary data for a JPEG/JPG image.
Declaration
public MemoryStream ToJpegStream()
Returns
Type | Description |
---|---|
System.IO.MemoryStream | System.IO.Stream |
ToPdfBinaryData()
Returns a 1 page PDF document containing the barcode, as binary data.
Declaration
public byte[] ToPdfBinaryData()
Returns
Type | Description |
---|---|
System.Byte[] | A byte array. |
ToPdfStream()
Returns a binary System.IO.MemoryStream containing a 1 page PDF document containing the barcode, as binary data.
Declaration
public Stream ToPdfStream()
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream |
ToPngBinaryData()
Returns the barcode as the binary data for a PNG image.
Declaration
public byte[] ToPngBinaryData()
Returns
Type | Description |
---|---|
System.Byte[] | A byte array |
ToPngStream()
Returns the barcode as a System.IO.MemoryStream of the binary data for a PNG image.
Declaration
public MemoryStream ToPngStream()
Returns
Type | Description |
---|---|
System.IO.MemoryStream | System.IO.Stream |
ToStream()
Renders the barcode as an image System.IO.Stream
Declaration
public MemoryStream ToStream()
Returns
Type | Description |
---|---|
System.IO.MemoryStream | A System.IO.MemoryStream containing encoded image file data. The default encoding is PNG |
ToStream(AnyBitmap.ImageFormat)
Renders the barcode as an image System.IO.Stream
Declaration
public MemoryStream ToStream(AnyBitmap.ImageFormat ImageFormat)
Parameters
Type | Name | Description |
---|---|---|
IronSoftware.Drawing.AnyBitmap.ImageFormat | ImageFormat | (optional) The image format as a IronSoftware.Drawing.AnyBitmap.ImageFormat. |
Returns
Type | Description |
---|---|
System.IO.MemoryStream | A System.IO.MemoryStream containing encoded image file data |
ToString()
Returns a System.String that represents this GeneratedBarcodes value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
ToTiffBinaryData()
Returns the barcode as the binary data for a TIFF image.
Declaration
public byte[] ToTiffBinaryData()
Returns
Type | Description |
---|---|
System.Byte[] | A byte array |
ToTiffStream()
Returns the barcode as a System.IO.MemoryStream of the binary data as the binary data for a TIFF image.
Declaration
public MemoryStream ToTiffStream()
Returns
Type | Description |
---|---|
System.IO.MemoryStream | System.IO.Stream |
ToWindowsBitmapBinaryData()
Returns the barcode as the binary data for a Bitmap BMP image.
Declaration
public byte[] ToWindowsBitmapBinaryData()
Returns
Type | Description |
---|---|
System.Byte[] | A byte array |
ToWindowsBitmapStream()
Returns the barcode as a System.IO.MemoryStream of the binary data for a Bitmap BMP image.
Declaration
public Stream ToWindowsBitmapStream()
Returns
Type | Description |
---|---|
System.IO.Stream | System.IO.Stream |
Verify(String)
Verifies this barcode is still readable by IronBarCode.
Resizing a barcode to a very small size using unconventional colors may make it unreadable to a machine. This method verifies that a barcode is still fully readable.
Declaration
public bool Verify(string expected = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | expected |
Returns
Type | Description |
---|---|
System.Boolean |
|