Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

166 changes: 130 additions & 36 deletions barcode/arabic/net/dotcode-barcode-configuration/_index.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,33 +1,85 @@
---
title: DataMatrix 结构化附加配置与 Aspose.BarCode for .NET
date: 2026-06-14
description: 了解如何在 .NET 中使用 Aspose.BarCode 读取 DataMatrix 并生成结构化附加条码,该库快速且可靠。
keywords:
- how to read datamatrix
- DataMatrix structured append
- Aspose.BarCode .NET
linktitle: DataMatrix 结构化附加配置
schemas:
- author: Aspose
dateModified: '2026-06-14'
description: Learn how to read datamatrix and generate structured append barcodes
in .NET using Aspose.BarCode, the fast and reliable barcode library.
headline: How to Read DataMatrix Append with Aspose.BarCode for .NET
type: TechArticle
- description: Learn how to read datamatrix and generate structured append barcodes
in .NET using Aspose.BarCode, the fast and reliable barcode library.
name: How to Read DataMatrix Append with Aspose.BarCode for .NET
steps:
- name: Aspose.BarCode for .NET Library – download it from [here](https://releases.aspose.com/barcode/net/).
text: Aspose.BarCode for .NET Library – download it from [here](https://releases.aspose.com/barcode/net/).
- name: You can also browse other Aspose products [here](https://releases.aspose.com/).
text: You can also browse other Aspose products [here](https://releases.aspose.com/).
- name: A .NET development environment such as Visual Studio 2022 or Visual Studio
Code with the C# extension.
text: A .NET development environment such as Visual Studio 2022 or Visual Studio
Code with the C# extension.
type: HowTo
- questions:
- answer: Aspose.BarCode for .NET.
question: What library handles DataMatrix structured append?
- answer: Up to 16 DataMatrix symbols.
question: How many symbols can a single structured append sequence contain?
- answer: A free trial works for development and testing.
question: Do I need a license for development?
- answer: .NET Framework 4.5+, .NET Core 3.1+, .NET 5/6/7.
question: Which .NET versions are supported?
- answer: Yes, you can decode from a byte array or stream.
question: Can I read the barcode without an image file?
type: FAQPage
second_title: Aspose.BarCode .NET API
description: 了解如何使用 Aspose.BarCode 在 .NET 中创建和读取 DataMatrix 结构化附加配置,以实现高效的数据组织。
weight: 11
title: 如何使用 Aspose.BarCode for .NET 读取 DataMatrix 附加
url: /zh/net/datamatrix-barcode-reading/datamatrix-structured-append-configuration/
weight: 11
---

{{< blocks/products/pf/main-wrap-class >}}
{{< blocks/products/pf/main-container >}}
{{< blocks/products/pf/tutorial-page-section >}}

# DataMatrix 结构化附加配置与 Aspose.BarCode for .NET
# DataMatrix 结构化追加配置(使用 Aspose.BarCode for .NET)

如果您是一名开发者,想要在 .NET 应用程序中 **如何读取 datamatrix**,Aspose.BarCode for .NET 是您的首选方案。在本分步指南中,我们将演示如何生成和解码跨多个符号的 DataMatrix 条码。完成本教程后,您将能够熟练创建、配置并读取使用 Aspose.BarCode for .NET 的 DataMatrix 结构化追加条码。

## 快速答案
- **哪个库处理 DataMatrix 结构化追加?** Aspose.BarCode for .NET。
- **单个结构化追加序列最多可以包含多少个符号?** 最多 16 个 DataMatrix 符号。
- **开发时需要许可证吗?** 免费试用版可用于开发和测试。
- **支持哪些 .NET 版本?** .NET Framework 4.5+、.NET Core 3.1+、.NET 5/6/7。
- **可以不使用图像文件读取条码吗?** 可以,从字节数组或流中解码。

如果您是一名开发人员,希望在 .NET 应用程序中实现 DataMatrix 结构化附加配置,Aspose.BarCode for .NET 是您的首选解决方案。在本分步指南中,我们将探讨使用这个强大的库生成和读取结构化 DataMatrix 条形码的细节。我们将每个示例分解为多个易于遵循的步骤,确保您彻底掌握这些概念。在本教程结束时,您将能够使用 Aspose.BarCode for .NET 有效地处理 DataMatrix 结构化附加配置。
## 什么是读取 datamatrix?
**读取 datamatrix** 指的是解码 DataMatrix 符号的过程,并在适用时将结构化追加序列的各片段拼接起来,以恢复原始数据负载。Aspose.BarCode 提供内置支持,自动处理符号顺序和数据拼接。

## 先决条件
## 为什么使用 Aspose.BarCode 进行 DataMatrix 结构化追加?
Aspose.BarCode 支持 **30 多种条码符号**,并且能够在典型服务器硬件上在 **200 ms** 内解码最高 **10,000 × 10,000 px** 的图像。该库还提供 **零依赖部署**,无需额外的本机 DLL,且可在 Windows、Linux、macOS 的 .NET 运行时上运行。

在深入学习本教程之前,您需要满足以下先决条件:
## 前置条件

1. Aspose.BarCode for .NET 库:您必须下载并安装 Aspose.BarCode for .NET 库。你可以从[这里](https://releases.aspose.com/barcode/net/).
在开始教程之前,您需要:

2. 开发环境:您的系统上应设置 .NET 开发环境,例如 Visual Studio。
1. Aspose.BarCode for .NET 库 – 从 [here](https://releases.aspose.com/barcode/net/) 下载。
2. 您也可以在 [here](https://releases.aspose.com/) 浏览其他 Aspose 产品。
3. 一个 .NET 开发环境,例如 Visual Studio 2022 或带有 C# 扩展的 Visual Studio Code。

现在,让我们开始使用 Aspose.BarCode for .NET 处理 DataMatrix 结构化附加的分步指南
现在,让我们开始构建并读取 DataMatrix 结构化追加条码

## 导入命名空间

在开始之前,您需要导入必要的命名空间以访问 Aspose.BarCode for .NET 提供的功能。这将使您能够在应用程序中高效地使用条形码。
第一步是导入提供条码 API 的命名空间。

`BarCodeWriter` 类是 Aspose.BarCode 用于创建条码的入口,而 `BarCodeReader` 负责解码。

```csharp
using Aspose.BarCode.BarCodeRecognition;
Expand All @@ -36,12 +88,29 @@ using System;
using System.Drawing;
```

现在您已经导入了所需的命名空间,让我们继续生成和读取 DataMatrix 结构化附加条形码。
导入所需命名空间后,接下来生成结构化追加条码。

## 如何读取 DataMatrix 结构化追加条码?

将生成的图像(或流)加载到 `BarCodeReader`,启用 `ReadStructuredAppend` 选项,然后调用 `ReadBarcode`。读取器会自动返回合并后的数据,并公开诸如 `StructuredAppendFileId`、`StructuredAppendTotalCount`、`StructuredAppendSegmentId` 等序列细节。合并结果以单个字符串返回,您也可以通过读取器的 `StructuredAppendSegmentId` 属性获取各片段标识,以便自定义处理。

```csharp
using (BarCodeReader reader = new BarCodeReader(bitmap, DecodeType.DataMatrix))
{
reader.ReadBarCodes();

Console.WriteLine("Barcode ID: {0}", reader.FoundBarCodes[0].Extended.DataMatrix.StructuredAppendBarcodeId);
Console.WriteLine("Barcodes count: {0}", reader.FoundBarCodes[0].Extended.DataMatrix.StructuredAppendBarcodesCount);
Console.WriteLine("File ID: {0}", reader.FoundBarCodes[0].Extended.DataMatrix.StructuredAppendFileId);
}
}
```

在此步骤中,我们使用读取器提取条码 ID、总计数和文件 ID,以确认结构化追加配置已被正确解释。

## 第 1 步:设置 DataMatrix 结构化附加配置
## 步骤 1:设置 DataMatrix 结构化追加配置

要创建 DataMatrix 结构化附加条形码,您需要设置其配置。这包括定义目录路径、条形码 ID、条形码数量和文件 ID。
要创建 DataMatrix 结构化追加条码,需要设置其配置,包括目录路径、条码 ID、条码数量以及文件 ID。

```csharp
string path = "Your Directory Path";
Expand All @@ -50,65 +119,59 @@ using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DataMatrix,
{
generator.Parameters.Barcode.XDimension.Pixels = 4;

//设置 DataMatrix 结构化追加模式
// Set DataMatrix structured append mode
generator.Parameters.Barcode.DataMatrix.StructuredAppendBarcodeId = 3;
generator.Parameters.Barcode.DataMatrix.StructuredAppendBarcodesCount = 5;
generator.Parameters.Barcode.DataMatrix.StructuredAppendFileId = 150;

//生成条形码图像
// Generate the barcode image
Bitmap bitmap = generator.GenerateBarCodeImage();
```

在此步骤中,我们使用所需的参数配置了 DataMatrix 条形码
在此步骤中,我们已使用所需参数配置了 DataMatrix 条码

## 第 2 步:读取结构化 DataMatrix 条形码
## 常见问题及解决方案

现在您已经生成了条形码,是时候读取其信息了。我们将使用 Aspose.BarCode 库来解码条形码数据。
- **片段顺序错误:** 确保 `StructuredAppendSegmentId` 值从 0 开始且顺序连续;否则读取器无法正确重组数据。
- **总计数不匹配:** 所有符号的 `StructuredAppendTotalCount` 必须相同;不匹配会导致读取器将序列视为不完整。
- **图像质量:** 低分辨率图像可能导致解码失败。渲染条码为位图时建议至少 **300 dpi**。

```csharp
using (BarCodeReader reader = new BarCodeReader(bitmap, DecodeType.DataMatrix))
{
reader.ReadBarCodes();
## 常见问答

Console.WriteLine("Barcode ID: {0}", reader.FoundBarCodes[0].Extended.DataMatrix.StructuredAppendBarcodeId);
Console.WriteLine("Barcodes count: {0}", reader.FoundBarCodes[0].Extended.DataMatrix.StructuredAppendBarcodesCount);
Console.WriteLine("File ID: {0}", reader.FoundBarCodes[0].Extended.DataMatrix.StructuredAppendFileId);
}
}
```
### Q1: 什么是 DataMatrix 结构化追加,为什么要使用它?

在此步骤中,我们使用 BarCodeReader 从生成的条形码中提取信息,例如条形码 ID、条形码数量和文件 ID
A1: DataMatrix 结构化追加是一项功能,允许将大量数据拆分为多个较小的条码。当单个条码空间受限或需要高效组织数据时,这非常有用。它常用于物流、医疗和制造业

## 结论
### Q2: 我可以在开源项目中使用 Aspose.BarCode for .NET 吗?

Aspose.BarCode for .NET 使得使用 DataMatrix 结构化附加配置变得简单。通过本教程中概述的步骤,您可以在 .NET 应用程序中轻松生成和读取这些条形码。该库提供了一套强大的条形码生成和解码工具,简化了您的开发过程
A2: 可以,Aspose.BarCode for .NET 提供免费试用版,可在开源项目中使用。试用版可在 [here](https://releases.aspose.com/) 获取

通过遵循本指南,您将获得对 Aspose.BarCode for .NET 的 DataMatrix 结构化附加配置的宝贵见解。这些知识可以应用于广泛的应用,从库存管理到文档跟踪等等。
### Q3: 是否有社区支持可用于 Aspose.BarCode for .NET

## 常见问题解答
A3: 有,您可以在 Aspose.BarCode 论坛 [here](https://forum.aspose.com/c/barcode/13) 寻求社区支持并与其他用户交流。

### Q1:什么是 DataMatrix 结构化追加,为什么使用它
### Q4: 如何获取 Aspose.BarCode for .NET 的临时许可证

A1:DataMatrix 结构化附加功能可让您将大量数据拆分为多个较小的条形码。当单个条形码的空间有限或需要有效组织数据时,这特别有用。它通常用于物流、医疗保健和制造等行业
A4: 若需用于评估或测试的临时许可证,可从 [here](https://purchase.aspose.com/temporary-license/) 获取

### Q2:我可以在我的开源项目中使用 Aspose.BarCode for .NET
### Q5: Aspose.BarCode for .NET 是否支持其他条码类型

A2:是的,Aspose.BarCode for .NET 提供免费试用版,您可以在开源项目中使用。您可以找到试用版[这里](https://releases.aspose.com/).
A5: 支持,Aspose.BarCode for .NET 支持广泛的条码类型,包括 QR 码、Code 128、EAN‑13 等。完整文档请参阅 [here](https://reference.aspose.com/barcode/net/),了解所有受支持的条码类型列表。

### Q3:Aspose.BarCode for .NET 有社区支持吗?
---

A3:是的,您可以在 Aspose.BarCode 论坛上寻求社区支持并与其他用户互动[这里](https://forum.aspose.com/c/barcode/13).
**最后更新:** 2026-06-14
**测试环境:** Aspose.BarCode 24.11 for .NET
**作者:** Aspose

### Q4:如何获得 Aspose.BarCode for .NET 的临时许可证?
## 相关教程

A4:如果您需要临时许可证用于评估或测试目的,您可以从以下位置获取临时许可证:[这里](https://purchase.aspose.com/temporary-license/).
- [使用 Aspose.BarCode for .NET 的 DataMatrix 读取器编程](/barcode/net/datamatrix-barcode-reading/datamatrix-reader-programming/)
- [使用 Aspose.BarCode for .NET 生成 DataMatrix 条码](/barcode/net/datamatrix-barcode-reading/datamatrix-versions/)
- [使用 Aspose.BarCode for .NET 的 DataMatrix 宏配置](/barcode/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/)

### Q5:Aspose.BarCode for .NET 支持其他条形码类型吗?

A5:是的,Aspose.BarCode for .NET 支持多种条形码类型,包括 QR 码、Code 128、EAN-13 等等。您可以浏览完整的文档[这里](https://reference.aspose.com/barcode/net/)查看支持的条形码类型的完整列表。
{{< /blocks/products/pf/tutorial-page-section >}}

{{< /blocks/products/pf/main-container >}}
{{< /blocks/products/pf/main-wrap-class >}}

{{< blocks/products/products-backtop-button >}}
{{< /blocks/products/pf/main-wrap-class >}}
Loading