Class BarcodeParameters

Class BarcodeParameters

Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.2.0)

Barcode generation parameters.

[XmlSerialization(Name = "Aspose.BarCode.Reader.Properties.BarcodeParameters")]
public class BarcodeParameters

Inheritance

objectBarcodeParameters

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

AustralianPost

AustralianPost barcode parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public AustralianPostParameters AustralianPost { get; }

Property Value

AustralianPostParameters

Aztec

Aztec parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public AztecParameters Aztec { get; }

Property Value

AztecParameters

BarColor

Bars color. Default value: Color.Black.

[XmlSerialization(Type = XmlSerializationType.Element)]
public Color BarColor { get; set; }

Property Value

Color

BarHeight

Height of 1D barcodes’ bars in Aspose.BarCode.Generation.Unit value. Ignored if Aspose.BarCode.Generation.BaseGenerationParameters.AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

[XmlSerialization(Type = XmlSerializationType.Element, Name = "BarHeight")]
public Unit BarHeight { get; set; }

Property Value

Unit

BarWidthReduction

Get or sets bars reduction value that is used to compensate ink spread while printing. Default value: 0

public Unit BarWidthReduction { get; set; }

Property Value

Unit

ChecksumAlwaysShow

Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.

[XmlSerialization(Type = XmlSerializationType.Element)]
public bool ChecksumAlwaysShow { get; set; }

Property Value

bool

Codabar

Codabar parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public CodabarParameters Codabar { get; }

Property Value

CodabarParameters

Codablock

Codablock parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public CodablockParameters Codablock { get; }

Property Value

CodablockParameters

Code128

Code128 parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public Code128Parameters Code128 { get; }

Property Value

Code128Parameters

Code16K

Code16K parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public Code16KParameters Code16K { get; }

Property Value

Code16KParameters

CodeTextParameters

Codetext parameters.

[XmlSerialization(Type = XmlSerializationType.Element, Name = "CodeTextParameters")]
public CodetextParameters CodeTextParameters { get; }

Property Value

CodetextParameters

Coupon

Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.

[XmlSerialization(Type = XmlSerializationType.Element)]
public CouponParameters Coupon { get; }

Property Value

CouponParameters

DataBar

Databar parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public DataBarParameters DataBar { get; }

Property Value

DataBarParameters

DataMatrix

DataMatrix parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public DataMatrixParameters DataMatrix { get; }

Property Value

DataMatrixParameters

DotCode

DotCode parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public DotCodeParameters DotCode { get; }

Property Value

DotCodeParameters

EnableEscape

Indicates whether explains the character “" as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, “" will be explained as a special escape character. Otherwise, “" acts as normal characters. Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.

[XmlSerialization(Type = XmlSerializationType.Element)]
public bool EnableEscape { get; set; }

Property Value

bool

FilledBars

Gets or sets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.

[XmlSerialization(Type = XmlSerializationType.Element)]
public bool FilledBars { get; set; }

Property Value

bool

GS1CompositeBar

GS1 Composite Bar parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public GS1CompositeBarParameters GS1CompositeBar { get; set; }

Property Value

GS1CompositeBarParameters

Examples

This sample shows how to create and save a GS1 Composite Bar image. Note that 1D codetext and 2D codetext are separated by symbol ‘|’

var codetext = "(01)03212345678906|(21)A1B2C3D4E5F6G7H8";
  using (var generator = new BarcodeGenerator(EncodeTypes.GS1CompositeBar, codetext))
  {
      generator.Parameters.Barcode.GS1CompositeBar.LinearComponentType = EncodeTypes.GS1Code128;
      generator.Parameters.Barcode.GS1CompositeBar.TwoDComponentType = TwoDComponentType.CC_A;

      // Aspect ratio of 2D component
      generator.Parameters.Barcode.Pdf417.AspectRatio = 3;

      // X-Dimension of 1D and 2D components
      generator.Parameters.Barcode.XDimension.Pixels = 3;

      // Height of 1D component
      generator.Parameters.Barcode.BarHeight.Pixels = 100;

      generator.Save("test.png");
  }

HanXin

HanXin parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public HanXinParameters HanXin { get; }

Property Value

HanXinParameters

ITF

ITF parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public ITFParameters ITF { get; }

Property Value

ITFParameters

IsChecksumEnabled

Enable checksum during generation 1D barcodes.

Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible.

Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar

Checksum always used: Rest symbology

[XmlSerialization(Type = XmlSerializationType.Element)]
public EnableChecksum IsChecksumEnabled { get; set; }

Property Value

EnableChecksum

MaxiCode

MaxiCode parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public MaxiCodeParameters MaxiCode { get; }

Property Value

MaxiCodeParameters

Padding

Barcode paddings. Default value: 5pt 5pt 5pt 5pt.

[XmlSerialization(Type = XmlSerializationType.Element)]
public Padding Padding { get; }

Property Value

Padding

PatchCode

PatchCode parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public PatchCodeParameters PatchCode { get; }

Property Value

PatchCodeParameters

Pdf417

PDF417 parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public Pdf417Parameters Pdf417 { get; }

Property Value

Pdf417Parameters

Postal

Postal parameters. Used for Postnet, Planet.

[XmlSerialization(Type = XmlSerializationType.Element)]
public PostalParameters Postal { get; }

Property Value

PostalParameters

QR

QR, MicroQR and RectMicroQR parameters.

[XmlSerialization(Type = XmlSerializationType.Element)]
public QrParameters QR { get; }

Property Value

QrParameters

Supplement

Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.

[XmlSerialization(Type = XmlSerializationType.Element)]
public SupplementParameters Supplement { get; }

Property Value

SupplementParameters

ThrowExceptionWhenCodeTextIncorrect

Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode’s specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect.

[XmlSerialization(Type = XmlSerializationType.Element)]
public bool ThrowExceptionWhenCodeTextIncorrect { get; set; }

Property Value

bool

WideNarrowRatio

Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39, Code39FullASCII

[XmlSerialization(Type = XmlSerializationType.Element)]
public float WideNarrowRatio { get; set; }

Property Value

float

Exceptions

ArgumentException

The WideNarrowRatio parameter value is less than or equal to 0.

XDimension

x-dimension is the smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if Aspose.BarCode.Generation.BaseGenerationParameters.AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

[XmlSerialization(Type = XmlSerializationType.Element)]
public Unit XDimension { get; set; }

Property Value

Unit

 English