Class BarcodeParameters
Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (26.3.0)
Barcode generation parameters.
[XmlSerialization(Name = "Aspose.BarCode.Reader.Properties.BarcodeParameters")]
public class BarcodeParametersInheritance
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
Aztec
Aztec parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public AztecParameters Aztec { get; }Property Value
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
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
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
Codabar
Codabar parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public CodabarParameters Codabar { get; }Property Value
Codablock
Codablock parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public CodablockParameters Codablock { get; }Property Value
Code128
Code128 parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public Code128Parameters Code128 { get; }Property Value
Code16K
Code16K parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public Code16KParameters Code16K { get; }Property Value
CodeTextParameters
Codetext parameters.
[XmlSerialization(Type = XmlSerializationType.Element, Name = "CodeTextParameters")]
public CodetextParameters CodeTextParameters { get; }Property Value
Coupon
Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.
[XmlSerialization(Type = XmlSerializationType.Element)]
public CouponParameters Coupon { get; }Property Value
DataBar
Databar parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public DataBarParameters DataBar { get; }Property Value
DataMatrix
DataMatrix parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public DataMatrixParameters DataMatrix { get; }Property Value
DotCode
DotCode parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public DotCodeParameters DotCode { get; }Property Value
EnableEscape
EnableEscape is deprecated and ignored. Process escape sequences explicitly (e.g., Regex.Unescape). This property will be removed in future releases.
[Obsolete("EnableEscape is deprecated and ignored. Process escape sequences explicitly (e.g., Regex.Unescape). This property will be removed in future releases.", false)]
public bool EnableEscape { get; set; }Property Value
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
GS1CompositeBar
GS1 Composite Bar parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public GS1CompositeBarParameters GS1CompositeBar { get; set; }Property Value
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
ITF
ITF parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public ITFParameters ITF { get; }Property Value
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
MaxiCode
MaxiCode parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public MaxiCodeParameters MaxiCode { get; }Property Value
Padding
Barcode paddings. Default value: 5pt 5pt 5pt 5pt.
[XmlSerialization(Type = XmlSerializationType.Element)]
public Padding Padding { get; }Property Value
PatchCode
PatchCode parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public PatchCodeParameters PatchCode { get; }Property Value
Pdf417
PDF417 parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public Pdf417Parameters Pdf417 { get; }Property Value
Postal
Postal parameters. Used for Postnet, Planet.
[XmlSerialization(Type = XmlSerializationType.Element)]
public PostalParameters Postal { get; }Property Value
QR
QR, MicroQR and RectMicroQR parameters.
[XmlSerialization(Type = XmlSerializationType.Element)]
public QrParameters QR { get; }Property Value
Supplement
Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.
[XmlSerialization(Type = XmlSerializationType.Element)]
public SupplementParameters Supplement { get; }Property Value
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
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
Exceptions
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; }