TBarCode Library 11  TBarCode Library 11
ERRCODE _stdcall BCSetOptionsA ( t_BarCode pBarCode,
LPCSTR  szOption 
)

Sets the barcode option string.

The option string consists of at least one name/value pair followed by zero or more name/value pairs separated by space characters.
The format is: name=value{ name=value}.

A name must be a valid predefined option name. Values can be given in the following ways:

  • As Simple Values.
    Simple values are passed as they are. Spaces must be escaped by a preceding "\\". Valid values for boolean options are true and false.
    e.g.: NAME_BOOL=true NAME_NUMBER=123 NAME_DOUBLE=123.45 NAME_TEXT=ABC NAME_WITHSPACE=ABC\ abc
  • As Text Values.
    Text values are surrounded by single quotes. They may contain spaces which don't have to be escaped. Single quotes that occur in the text have to be escaped by a preceding "\\".
    e.g.: NAME_TEXT='ABC' NAME_WITHSPACE='ABC abc' NAME_WITHQUOTE='Robin\'s Nest'
  • As Complex Values.
    Complex values are surrounded by curly braces "{...}". Complex value may consist of other simple, text, or complex values.
    e.g.: NAME_COMPLEX={NAME_TEXT='ABC' NAME_NUMBER=123}

Following options are currently supported:

  • DRAW_PS_Overprint=[bool] - enable/disable overprinting for PostScript output.
  • DRAW_BarWidthReduction_Legacy=[enum] - enable legacy mode for bar width reduction (0 .. disable, 1 .. reduce each module, 2 .. reduce right and bottom).
  • DRAW_BarWidthReduction_Values={x=[double] y=[double] unit=[enum]} - set the bar width reduction separated for horizontal (x) and vertical (y) direction with given unit (see BCSetBarWidthReduction).
  • DRAW_OptResolution=[bool] - optimize resolution (see BCSetOptResolution).
  • DRAW_AutoFontSize=[bool] - enable/disable automatic font sizing.
  • DRAW_PCLMode=[enum] - set the PCL mode (see BCSetPCLMode, e_PCLMode).
  • CHECK_CDMethod=[enum] - set the check digit method (see BCSetCDMethod, e_CDMethod).
  • CHECK_CodaBarIncludeStartStop=[bool] - determine whether to include start and stop character of CodaBar2 into check digit calculation.
  • DATA_TranslateEsc=[bool] - enable/disable translation of escape sequences (see BCSetTranslateEsc).
  • DATA_CodePage=[enum] - set the code page for the barcode data (see BCSetCodePage, e_CodePage).
  • DATA_Format=[string] - set the format string (see BCSetFormatW).
  • MQR_Version=[enum] - set the Micro QR-Code version (see BCSet_MQR_Version, e_MQRVersion).
  • MQR_Mask=[enum] - set the Micro QR-Code mask (see BCSet_MQR_Mask, e_MQRMask).
  • QrCode_Version=[enum] - set the QR-Code version (see BCSet_QR_Version, e_QRVersion).
  • QrCode_Format=[enum] - set the QR-Code format (see BCSet_QR_Format, e_QRFormat).
  • QrCode_FmtAppIndicator=[string] - set the QR-Code format application indicator (see BCSet_QR_FmtAppIndicator).
  • QrCode_ECLevel=[enum] - set the QR-Code error correction level (see BCSet_QR_ECLevel, e_QRECLevel).
  • QrCode_Mask=[enum] - set the QR-Code mask (see BCSet_QR_Mask, e_QRMask).
  • QrCode_KanjiChineseCompaction=[enum] - set the QR-Code compaction mode (see BCSet_QR_KanjiChineseCompaction, e_QRMBCompaction).
  • QrCode_Append={sum=[int] index=[int] parity=[byte]} - set the QR-Code structured append (see BCSet_QR_Append).
  • QrCode_EncodingMode=[enum] - set the QR-Code Encoding Mode (0 .. optimal, 1 .. prefer binary/Byte, 2 .. prefer alphanumeric).
  • QrCode_SizeFactorSwissCross=[double] - set the size factor of the Swiss Cross in the Swiss QR-Code (default=1.0).
  • QrCode_MaskSelection=[enum] - set the mask selection mode (0 .. default, 1 .. actual/2005, 2 .. legacy/JIS).
  • DataMatrix_Size=[enum] - set the Data Matrix Size (see BCSet_DM_Size, e_DMSizes).
  • DataMatrix_Rectangular=[bool] - enforce a rectangular symbol (see BCSet_DM_Rectangular).
  • DataMatrix_Format=[enum] - set the Data Matrix format (see BCSet_DM_Format, e_DMFormat).
  • DataMatrix_Append={sum=[int] index=[int] fileId=[int]} - set the Data Matrix structured append (see BCSet_DM_Append).
  • DataMatrix_EncodingMode=[enum] - set the Data Matrix Encoding Mode (0 .. optimal, 1 .. enforce binary, 2 .. prefer ASCII, 3 .. prefer C40, 4 .. prefer EDIFACT).
  • DataMatrix_ECC144Alternative=[bool] - enable/disable alternative ECC for symbol size 144x144 (1 corresponds with ISO/IEC 16022 ED3, default since v11.17.1)
  • DataMatrix_CaptivaScanner=[bool] - enable/disable CAPTIVA scanner mode.
  • HanXin_Version=[enum] - set the Han Xin version (see BCSet_HanXin_Version, e_HanXinSizes).
  • HanXin_EnforceBinaryEncoding=[bool] - do enforce binary encoding (see BCSet_HanXin_EnforceBinaryEncoding).
  • HanXin_ECLevel=[enum] - set the Han Xin error correction level (see BCSet_HanXin_ECLevel, e_HanXinECLevel).
  • HanXin_Mask=[enum] - set the Han Xin mask (see BCSet_HanXin_Mask, e_HanXinMask).
  • DotCode_Size={mode=[enum] size=[string]} - set the DotCode Size (see BCSet_DotCode_Size, e_DCSizeMode).
  • DotCode_PrintDirection=[enum] - set the DotCode print direction (see BCSet_DotCode_PrintDirection, e_DCPrintDirection).
  • DotCode_EnforceBinaryEncoding=[bool] (deprecated, please use DotCode_PreferredEncoding) - do enforce binary encoding (see BCSet_DotCode_EnforceBinaryEncoding).
  • DotCode_PreferredEncoding=[enum] - set the DotCode preferred encoding mode (0 .. optimal, 1 .. enforce binary, 2 .. prefer Mode A, 3 .. prefer Mode B).
  • DotCode_Format={format=[enum] specifier=[string]} - set the DotCode format (see BCSet_DotCode_Format, e_DCFormat).
  • DotCode_Mask=[enum] - set the DotCode mask (see BCSet_DotCode_Mask, e_DCMask).
  • DotCode_Append={on=<bool> total=<int> index=<int>} - set the DotCode structured append (see BCSet_DotCode_AppendActive, BCSet_DotCode_Append).
  • PDF417_MacroPDF417={fileId=[string] index=[int] last=[bool] count=[int]} - set the most common Macro PDF417 parameters.
  • EanUpc_NotchHeight=[int] - set the EAN/UPC notch height (see BCSetNotchHeight).
  • EanUpc_ShowQZMarker=[bool] - show quiet zone markers (see Format Setting '<').
  • EanUpc_LegacyDraw=[bool] - enable legacy draw mode (without increasing or decreasing the module width).
  • EanUpc_ShowCheckDigitWithAddons=[bool] - show check digits also with add-ons.
  • Code128_LegacyMode=[bool] - enable legacy encoding mode (no extended encoding, mapping of umlauts).
  • Code128_EnforceSubset=[bool] - enforce the requested subset and return an error if data encoding in this mode is not possible.
  • AusPost_UseNTable=[bool] - use N Table (numeric data) for encoding custom data in Australia Post 4-State Customer Barcode 2 and 3
  • AusPost_EnableZeroFormat=[bool] - automatically use FCC 00 if DPID equals '00000000' in Australia Post 4-State Customer Barcode 2 and 3
  • Hibc_Lic_Version=[enum] - set the HIBC LIC standard version (0 .. V2.2, 1 .. V2.4, 2 .. V2.6).
  • Hibc_Pas_Version=[enum] - set the HIBC PAS standard version (0 .. V1.2, 1 .. V1.3).
  • Hibc_Replace0=[bool] - replace '0' in display text by 'Ø'.
  • Comp_CCType=[enum] - set the composite component type (see BCSet2DCompositeComponent, e_CCType).

Valid values for:

  • [bool] (boolean) are true and false.
  • [enum] (enumeration) are integer values in the range of the according enumeration data type. See also "tecbcenum.h".
  • [string] (string) are string/text values.
  • [int] (integer) are integer values.
  • [byte] (byte) are integer values in the range of [0..255].
Parameters:
[in,out]pBarCodePointer to barcode structure.
[in]szOptionOption string.
See also:
BCGetOption()
Return values:
ERRCODEErrOk (0) in case of success. Non-zero if error occurred (e.g. if any of the options was not found).