Barcode Class
Free Trial Web API version Licensing Request A Quote
HAVE QUESTIONS OR NEED HELP?SUBMIT THE SUPPORT REQUEST FORM or write email toSUPPORT@BYTESCOUT.COM
Represents barcode generator.
Inheritance Hierarchy
Bytescout.BarCodeBarcode
Namespace:Bytescout.BarCode
Assembly: Bytescout.BarCode (in Bytescout.BarCode.dll) Version: 7.6.3.1256-master
Syntax
The Barcode type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Barcode | Initializes a new instance of the Barcode class. | |
Barcode(SymbologyType) | Initializes a new instance of the Barcode class. | |
Barcode(String, String) | Initializes and activates a new instance of the Barcode class. | |
Barcode(Barcode, SymbologyType) | Initializes a new instance of the Barcode class. | |
Barcode(SymbologyType, String, String) | Initializes a new instance of the Barcode class. |
Properties
Name | Description | |
---|---|---|
AddChecksum | Gets or sets a value indicating whether checksum should be added to barcode. | |
AddChecksumToCaption | Gets or sets a value indicating whether checksum should be added to barcode caption. | |
AdditionalCaption | Gets or sets the additional barcode caption text to draw. | |
AdditionalCaptionAlignment | Gets or sets text alignment of the additional barcode caption. | |
AdditionalCaptionFont | Gets or sets the font of the additional barcode caption. | |
AdditionalCaptionPosition | Gets or sets the position of the additional caption. | |
Angle | Gets or sets the barcode rotation angle in degrees. | |
BackColor | Gets or sets the color used to draw the barcode background. | |
BarHeight | Gets or sets the height of the barcode bars in pixels. | |
Caption | Gets or sets the barcode caption (by default this is encoded value). | |
CaptionAlignment | Gets or sets the alignment of barcode caption text. | |
CaptionFont | Gets or sets the font of the barcode caption. | |
CaptionPosition | Gets or sets the position of the barcode caption. | |
CutUnusedSpace | Gets or sets a value indicating whether unused space should be cut when drawing or saving barcode images. Unused space is usually a result of calling one of FitInto methods with size greater then needed to draw barcode. | |
DefaultPDFBarCodeX | Gets or sets X coordinate of default barcode position. | |
DefaultPDFBarCodeY | Gets or sets Y coordinate of default barcode position. | |
DefaultPDFPageHeight | Gets or sets the default height of the PDF page. | |
DefaultPDFPageSize | Gets or sets the default size of the PDF page. | |
DefaultPDFPageWidth | Gets or sets the default width of the PDF page. | |
DrawCaption | Gets or sets a value indicating whether to draw the barcode encoded value. | |
DrawCaptionFor2DBarcodes | Gets or sets a value indicating whether to draw the barcode encoded value for 2D barcodes. | |
DrawQuietZones | Gets or sets a value indicating whether to draw quite zones when barcode type supposes such zones. | |
ForeColor | Gets or sets the color used to draw the barcode bars and caption(s). | |
LicenseInfo | Gets license information. | |
Margins | Gets or sets the barcode margins in pixels. | |
NarrowBarWidth | Gets or sets the width of the narrow bar in pixels. | |
Options | Gets or sets the barcode symbology specific options. | |
PreserveMinReadableSize | Gets or sets a value indicating whether to check output size so it's not less than barcode size. Use FitInto() method to fit barcode into a given physical size. | |
ProduceMonochromeImages | Gets or sets a value indicating whether the component should produce monochrome (1-bit, black and white) images. | |
Profiles | Comma-separated list of profiles to apply to the Barcode. Profiles are sets of properties and methods represented as JSON string. Check the source code examples installed with the SDK. | |
RegistrationKey | Gets or sets the key number part of registration information. | |
RegistrationName | Gets or sets the name part of the registration information. | |
RenderingHint | Gets or sets the text rendering quality. | |
ResolutionX | Gets or sets the horizontal resolution of barcode. | |
ResolutionY | Gets or sets the vertical resolution of barcode. | |
RoundDots | Sets whether to generate barcodes with round dots. Works only for QR Code, DataMatrix, and Aztec barcode types. | |
RoundDotsScale | Scale factor for RoundDots in percents. | |
SmoothingMode | Gets or sets the barcode rendering quality. | |
SupplementValue | Gets or sets the supplementary barcode value to encode (used with EAN-13, ISBN and UPC-A barcodes). | |
Symbology | Gets or sets the barcode symbology type. | |
TIFFUse1BitFormat | Obsolete. Gets or sets a value indicating whether TIFF images should be saved as monochrome (1-bit, black and white) images. This property is obsolete since has been superseded with ProduceMonochromeImages property. | |
Value | Gets or sets the barcode value to encode. | |
ValueAsStream | Obsolete. Gets the copy of barcode value as stream. | |
Version | Gets the component version number. | |
WideToNarrowRatio | Gets or sets the width of the wide bar relative to the narrow bar. |
Methods
Name | Description | |
---|---|---|
AddDecorationImage(Image, Int32) | Add decorative image to draw in the center of the barcode. (!) Supported with QR Code only. | |
AddDecorationImage(String, Int32) | Add decorative image to draw in the center of the barcode. (!) Supported with QR Code only. | |
CreateProfile(String) | Creates JSON profile will all Barcode properties with current values. | |
CreateProfile(String, String) | Creates JSON profile will all Barcode properties with current values. | |
Dispose | Releases all resources used by the Barcode | |
Draw(Graphics, Point) | Draws the barcode on Graphics canvas object. | |
Draw(Graphics, Single, Single, UnitOfMeasure) | Draws the barcode. | |
DrawHDC(IntPtr, Int32, Int32) | Draws the barcode on HDC canvas object. | |
DrawHDC(IntPtr, Single, Single, UnitOfMeasure) | Draws the barcode on HDC graphics context. | |
DrawImagesToPDF(Stream, Stream, DrawImagesToPDFCallback) | Utility method allowing to draw any image on specified page of PDF document. | |
DrawImagesToPDF(String, String, DrawImagesToPDFCallback) | Utility method allowing to draw any image on specified page of PDF document. | |
DrawImagesToPDF(Stream, Int32, Image, Point, Stream) | Utility method allowing to draw any image on specified page of PDF document. | |
DrawImagesToPDF(String, Int32, Image, Point, String) | Utility method allowing to draw any image on specified page of PDF document. | |
DrawImagesToPDF(Stream, Int32, Image, Point, Stream, String) | Utility method allowing to draw any image on specified page of PDF document. | |
DrawImagesToPDF(String, Int32, Image, Point, String, String) | Utility method allowing to draw any image on specified page of PDF document. | |
DrawToImage(Stream, Int32, Int32, Int32, Stream) | Draws barcode to image at specified coordinates. | |
DrawToImage(String, Int32, Int32, Int32, String) | Draws barcode to image at specified coordinates. | |
DrawToNewPDF(String) | Creates new PDF document and draws barcode on it. | |
DrawToNewPDF(String, Int32, Int32, Int32, Int32) | Creates new PDF document and draws barcode on it. | |
DrawToPDF(Stream, Int32, Int32, Int32, Stream) | Draws barcode on specified page of PDF document. | |
DrawToPDF(String, Int32, Int32, Int32, String) | Draws barcode on specified page of PDF document. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
FitInto(Size) | IMPORTANT: Call this method AFTER setting the barcode value. Fits the barcode into the area of size specified in pixels. Calling this method will change output size of the barcode. Barcode size will be increased in order to occupy all of the area. | |
FitInto(SizeF, UnitOfMeasure) | IMPORTANT: Call this method AFTER setting the barcode value. Fits the barcode into the area of size specified in units. Calling this method will change output size of the barcode. Barcode size will be increased in order to occupy all of the area. | |
FitInto(Int32, Int32) | IMPORTANT: Call this method AFTER setting the barcode value. Fits the barcode into the area of size specified in pixels. Calling this method will change output size of the barcode. Barcode size will be increased in order to occupy all of the area. | |
FitInto(Single, Single, UnitOfMeasure) | IMPORTANT: Call this method AFTER setting the barcode value. Fits the barcode into the area of size specified in units. Calling this method will change output size of the barcode. Barcode size will be increased in order to occupy all of the area. | |
GetBarHeight | Returns the height of the barcode bars in specified units. | |
GetHashCode | (Inherited from Object.) | |
GetImage | Gets the Image object with the barcode. | |
GetImageBytes | Returns the barcode image as byte array. | |
GetImageBytesEMF | Returns the barcode image in EMF format as byte array. | |
GetImageBytesGIF | Returns the barcode image in GIF format as byte array. | |
GetImageBytesJPG | Returns the barcode image in JPEG format as byte array. | |
GetImageBytesPNG | Returns the barcode image in PNG format as byte array. | |
GetImageBytesTIFF | Returns the barcode image in TIFF format as byte array. | |
GetImageBytesWMF | Returns the barcode image in WMF format as byte array. | |
GetMarginBottom | Retrieves the bottom barcode margin value in specified units. | |
GetMarginLeft | Returns the left barcode margin value in specified units. | |
GetMarginRight | Returns the right barcode margin value in specified units. | |
GetMargins | Returns the barcode margins in specified units. | |
GetMarginTop | Returns the top barcode margin value in specified units. | |
GetMinimalHeight | Returns the height in specified units of the smallest rectangle that can accommodate the barcode. | |
GetMinimalSize | Gets or sets the size of the smallest rectangle in pixels that can accommodate the barcode. | |
GetMinimalSize(UnitOfMeasure) | Returns the size in specified units of the smallest rectangle that can accommodate the barcode. | |
GetMinimalWidth | Returns the width in specified units of the smallest rectangle that can accommodate the barcode. | |
GetNarrowBarWidth | Retrieves the width of the narrow bar in specified units. | |
GetPDFDimensions(Stream) | Returns size of PDF document pages in document units. | |
GetPDFDimensions(String) | Returns size of PDF document pages in document units. | |
GetPdfPageCount(Stream) | Returns count of pages in PDF document. | |
GetPdfPageCount(String) | Returns count of pages in PDF document. | |
GetSupplementaryValueRestrictions | Gets the supplementary value restrictions. | |
GetType | (Inherited from Object.) | |
GetValueRestrictions | Gets the value restrictions for the specified symbology. | |
Is2DSymblogy | Determines whether the symbology is of 2D type. | |
LoadAndApplyProfiles | Loads profiles from JSON string and automatically applies them. Note that profiles containing detection keywords will be deferred until the extraction. | |
LoadProfiles | Loads profiles from file. | |
LoadProfilesFromString | Loads profiles from JSON string. | |
LoadValueFromStream(Stream) | Loads the value from the given stream. Read begins from current position within a stream. All bytes till the end of the stream a considered to be a value's bytes. | |
LoadValueFromStream(Stream, Int32) | Loads the value from the given stream. Read begins from current position within a stream. | |
MemberwiseClone | (Inherited from Object.) | |
OptionsChanged | ||
ProcessMacros | Replaces macro codes with corresponding ASCII control characters. | |
ResetToNonOptimizedDefaults | Resets barcode options and properties to non optimized defaults. | |
RevertToNormalSize | Reverts any changes to barcode size caused by a call to any of FitInto methods. | |
SaveImage(Stream) | Saves the barcode image to specified stream. | |
SaveImage(String) | Saves the barcode image to file. | |
SaveImage(Stream, ImageFormat) | Saves the barcode image to specified stream. | |
SaveImage(String, ImageFormat) | Saves the barcode image to file. | |
SaveImage(Stream, ImageFormat, Size, Int32, Int32) | Saves the image with barcode into given stream. | |
SaveImage(String, ImageFormat, Size, Int32, Int32) | Saves the barcode image to file. | |
SetAdditionalCaptionFont(String, Int32) | Sets the font of the additional barcode caption. | |
SetAdditionalCaptionFont(String, Int32, Boolean, Boolean, Boolean, Boolean, Byte) | Sets the font of the barcode additional caption. | |
SetBackColorRGB | Sets the background color in RGB format. | |
SetBarHeight | Sets the height of the barcode bars in specified units. | |
SetCaptionFont(String, Int32) | Sets the font of the barcode caption. | |
SetCaptionFont(String, Int32, Boolean, Boolean, Boolean, Boolean, Byte) | Sets the font of the barcode caption font. | |
SetCustomCaptionGap | Sets the gap size between the barcode and caption. To reset the gap to default (1/10 of caption font height) set gap to float.NaN. | |
SetForeColorRGB | Sets the fore color in RGB format. | |
SetMargins | Sets the barcode margins in specified units. | |
SetNarrowBarWidth | Sets the width of the narrow bars in specified units. | |
SetSmoothingMode | Sets the barcode rendering quality. | |
ToString | (Inherited from Object.) | |
ValueIsValid(String) | Validates the value using current symbology rules. | |
ValueIsValid(String, Boolean) | Validates the value using current symbology rules. | |
ValueIsValidGS1 | Validates the GS1 value using GS1 rules. |
See Also