API Reference
Class
QrCodeEncoder
Encodes standards-aware QR codes.
Inheritance
- Object
- QrCodeEncoder
Methods
EncodeBytes 2 overloads
public static QrCode EncodeBytes(Byte[] data, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null, Nullable<Int32> eciAssignmentNumber = null) #Returns:
QrCodeEncodes an arbitrary byte payload (QR byte mode).
Parameters
- data System.Byte[]
- Bytes to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
- eciAssignmentNumber System.Nullable{System.Int32} = null
- Optional ECI assignment number to emit before the payload.
public static QrCode EncodeBytes(ReadOnlySpan<Byte> data, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null, Nullable<Int32> eciAssignmentNumber = null) #Returns:
QrCodeEncodes an arbitrary byte payload (QR byte mode).
Parameters
- data System.ReadOnlySpan{System.Byte}
- Bytes to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
- eciAssignmentNumber System.Nullable{System.Int32} = null
- Optional ECI assignment number to emit before the payload.
public static QrCode EncodeGs1(String elementString, QrEncodingOptions options = null) #Returns:
QrCodeEncodes a GS1 element string using FNC1 in first position.
Parameters
- elementString System.String
- GS1 element string without human-readable parentheses.
- options CodeGlyphX.QrEncodingOptions = null
- Optional QR encoding options. The FNC1 mode is set to first position.
public static QrCode EncodeKanji(String text, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null) #Returns:
QrCodeEncodes a QR Kanji-mode payload (Shift-JIS JIS X 0208).
Parameters
- text System.String
- Kanji text payload to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
EncodeStructuredAppend 2 overloads
public static QrCode[] EncodeStructuredAppend(IReadOnlyList<String> parts, QrEncodingOptions options = null) #Returns:
QrCode[]Encodes two through sixteen pre-split text parts as a QR structured-append sequence.
Parameters
- parts System.Collections.Generic.IReadOnlyList{System.String}
- Ordered payload parts (2..16).
- options CodeGlyphX.QrEncodingOptions = null
- Optional encoding options shared by every symbol.
public static QrCode[] EncodeStructuredAppend(IReadOnlyList<Byte[]> parts, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null, Nullable<Int32> eciAssignmentNumber = null) #Returns:
QrCode[]Encodes two through sixteen pre-split binary parts as a QR structured-append sequence.
Parameters
- parts System.Collections.Generic.IReadOnlyList{System.Byte[]}
- Ordered binary payload parts (2..16).
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level shared by every symbol.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen per symbol.
- eciAssignmentNumber System.Nullable{System.Int32} = null
- Optional ECI assignment number emitted before each byte payload.
EncodeText 3 overloads
public static QrCode EncodeText(String text, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null) #Returns:
QrCodeEncodes a UTF-8 text payload as a QR code.
Parameters
- text System.String
- Text payload to encode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
public static QrCode EncodeText(String text, QrTextEncoding encoding, QrErrorCorrectionLevel ecc = M, Int32 minVersion = 1, Int32 maxVersion = 40, Nullable<Int32> forceMask = null, Boolean includeEci = true) #Returns:
QrCodeEncodes a text payload using a specific QR text encoding (optionally with ECI).
Parameters
- text System.String
- Text payload to encode.
- encoding CodeGlyphX.QrTextEncoding
- Encoding to use for QR byte mode.
- ecc CodeGlyphX.QrErrorCorrectionLevel = M
- Error correction level.
- minVersion System.Int32 = 1
- Minimum allowed QR version (1..40).
- maxVersion System.Int32 = 40
- Maximum allowed QR version (1..40).
- forceMask System.Nullable{System.Int32} = null
- Optional forced mask (0..7). When null, the best mask is chosen.
- includeEci System.Boolean = true
- When true, emits an ECI header for non-default encodings.
public static QrCode EncodeText(String text, QrEncodingOptions options) #Returns:
QrCodeEncodes text using standards-aware segment optimization and the supplied options.
Parameters
- text System.String
- Text payload to encode.
- options CodeGlyphX.QrEncodingOptions
- Encoding, version, ECI, FNC1, and optimization options.