Search Results for

    Show / Hide Table of Contents

    Class Code128GS1Parser

    GS1 Code128 parser that handles all GS1 Application Identifiers, validates data content, and provides comprehensive error handling. Supports multiple input formats and provides detailed parsing results.

    Inheritance
    System.Object
    Code128GS1Parser
    Namespace: IronBarCode
    Assembly: IronBarCode.dll
    Syntax
    public static class Code128GS1Parser : Object

    Methods

    ExtractElements(String)

    Extracts all GS1 elements from a string.

    Declaration
    public static List<ParsedElement> ExtractElements(string input)
    Parameters
    Type Name Description
    System.String input

    The GS1 string to parse.

    Returns
    Type Description
    System.Collections.Generic.List<ParsedElement>

    List of parsed GS1 elements.

    Exceptions
    Type Condition
    IronBarCodeParsingException

    Thrown when the input cannot be parsed successfully due to validation errors.

    Format(String)

    Formats a GS1 string

    Declaration
    public static string Format(string value)
    Parameters
    Type Name Description
    System.String value

    The GS1 string to format.

    Returns
    Type Description
    System.String

    Formatted GS1 string with parentheses.

    Remarks

    This method throws an exception if the input is invalid.

    Exceptions
    Type Condition
    IronBarCodeParsingException

    Thrown when the input cannot be parsed successfully due to validation errors.

    GetEncodingInfo(String, Boolean)

    Gets just the encoding information without full GS1 parsing. Useful for analyzing non-GS1 Code 128 barcodes.

    Declaration
    public static Code128EncodingInfo GetEncodingInfo(string input, bool isGS1 = false)
    Parameters
    Type Name Description
    System.String input

    The barcode data to analyze.

    System.Boolean isGS1

    Whether this is a GS1-128 barcode.

    Returns
    Type Description
    Code128EncodingInfo

    Code128EncodingInfo containing segment information.

    IsValid(String)

    Validates if a string is a valid GS1 format

    Declaration
    public static bool IsValid(string input)
    Parameters
    Type Name Description
    System.String input

    The string to validate.

    Returns
    Type Description
    System.Boolean

    True if valid GS1 format; false otherwise.

    Parse(String)

    Parses and formats a GS1 string, handling multiple input formats and providing comprehensive validation.

    Declaration
    public static ParseResult Parse(string input)
    Parameters
    Type Name Description
    System.String input

    The GS1 string to parse (raw, formatted, or mixed).

    Returns
    Type Description
    ParseResult

    ParseResult containing formatted string, elements, and validation results.

    Remarks

    This method validates the GS1 structure and data content. If any validation errors occur, an IronBarCodeParsingException will be thrown with details about the specific errors.

    Exceptions
    Type Condition
    IronBarCodeParsingException

    Thrown when the input cannot be parsed successfully due to validation errors. The exception contains detailed information about all parsing errors encountered.

    ParseWithEncoding(String, Boolean)

    Parses a GS1 string and includes Code 128 encoding analysis.

    Declaration
    public static ParseResult ParseWithEncoding(string input, bool includeEncoding = true)
    Parameters
    Type Name Description
    System.String input

    The GS1 string to parse.

    System.Boolean includeEncoding

    Whether to include Code 128 encoding segment analysis.

    Returns
    Type Description
    ParseResult

    ParseResult with both logical (AI) and physical (encoding) information.

    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    IronBarcode_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronBarcode