From fe03664fb51c6fb59d97707ba4e18c458fac5d75 Mon Sep 17 00:00:00 2001 From: Muhammad Adil Date: Fri, 31 Jul 2026 06:31:04 +0000 Subject: [PATCH] Add 3 barcode net tutorials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Categories: compact-pdf417-encoding, one-dimensional-barcode-types Source: AI Search API Tutorials: - How to Generate PDF417 Barcode Image in C# with Aspose - Read barcode from image – C# barcode reader example - Read Multiple Barcodes C# – Complete Guide with PDF417 Auto-generated by Professionalize.Tutorials Agent --- .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 176 +++++++++++ .../_index.md | 254 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 3 +- .../_index.md | 275 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 174 +++++++++++ .../_index.md | 250 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 279 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 263 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 265 ++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 10 +- .../_index.md | 176 +++++++++++ .../_index.md | 265 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 278 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 187 ++++++++++++ .../og-image.png | Bin 0 -> 53712 bytes .../_index.md | 265 ++++++++++++++++ .../og-image.png | Bin 0 -> 52723 bytes .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 279 +++++++++++++++++ .../og-image.png | Bin 0 -> 49150 bytes .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 265 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 281 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 277 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 10 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 283 ++++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 4 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 277 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 174 +++++++++++ .../_index.md | 261 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 279 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 279 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 3 +- .../_index.md | 279 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 265 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 281 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 174 +++++++++++ .../_index.md | 263 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 279 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 174 +++++++++++ .../_index.md | 263 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 277 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 176 +++++++++++ .../_index.md | 261 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 280 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 281 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 174 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 8 +- .../_index.md | 282 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 176 +++++++++++ .../_index.md | 265 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 16 +- .../_index.md | 283 ++++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 176 +++++++++++ .../_index.md | 266 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 277 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 6 +- .../_index.md | 172 +++++++++++ .../_index.md | 264 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 6 +- .../_index.md | 277 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 10 +- .../_index.md | 176 +++++++++++ .../_index.md | 263 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 6 +- .../_index.md | 278 +++++++++++++++++ .../net/compact-pdf417-encoding/_index.md | 8 +- .../_index.md | 175 +++++++++++ .../_index.md | 265 ++++++++++++++++ .../one-dimensional-barcode-types/_index.md | 4 +- .../_index.md | 277 +++++++++++++++++ 118 files changed, 16730 insertions(+), 57 deletions(-) create mode 100644 barcode/arabic/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/arabic/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/arabic/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/chinese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/chinese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/chinese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/czech/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/czech/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/czech/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/dutch/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/dutch/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/dutch/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/og-image.png create mode 100644 barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/og-image.png create mode 100644 barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/og-image.png create mode 100644 barcode/french/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/french/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/french/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/german/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/german/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/german/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/greek/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/greek/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/greek/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/hindi/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/hindi/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/hindi/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/hongkong/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/hongkong/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/hongkong/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/hungarian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/hungarian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/hungarian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/indonesian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/indonesian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/indonesian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/italian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/italian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/italian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/japanese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/japanese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/japanese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/korean/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/korean/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/korean/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/polish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/polish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/polish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/portuguese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/portuguese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/portuguese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/russian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/russian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/russian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/spanish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/spanish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/spanish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/swedish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/swedish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/swedish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/thai/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/thai/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/thai/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/turkish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/turkish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/turkish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md create mode 100644 barcode/vietnamese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md create mode 100644 barcode/vietnamese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md create mode 100644 barcode/vietnamese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md diff --git a/barcode/arabic/net/compact-pdf417-encoding/_index.md b/barcode/arabic/net/compact-pdf417-encoding/_index.md index 6b447ecb2..8130d7b94 100644 --- a/barcode/arabic/net/compact-pdf417-encoding/_index.md +++ b/barcode/arabic/net/compact-pdf417-encoding/_index.md @@ -84,6 +84,10 @@ PDF417 المدمج هو رمز ثنائي الأبعاد عالي السعة ي ## دروس ترميز PDF417 المدمج ### [إنشاء باركودات PDF417 المدمجة](./compact-pdf417-basic-configuration/) تعلم كيفية إنشاء باركودات PDF417 المدمجة باستخدام Aspose.BarCode for .NET. دليل شامل مع تعليمات خطوة بخطوة وأمثلة شفرة. +### [كيفية إنشاء صورة باركود PDF417 في C# باستخدام Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +دليل خطوة بخطوة لإنشاء صورة باركود PDF417 باستخدام C# ومكتبة Aspose.BarCode. +### [قراءة عدة باركودات C# – دليل شامل مع PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +دليل شامل لقراءة عدة باركودات PDF417 باستخدام C# ومكتبة Aspose.BarCode. ## الأسئلة المتكررة @@ -113,4 +117,4 @@ PDF417 المدمج هو رمز ثنائي الأبعاد عالي السعة ي {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/arabic/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/arabic/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..a51b32b46 --- /dev/null +++ b/barcode/arabic/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: كيفية إنشاء صورة باركود PDF417 في C# باستخدام Aspose. تعلّم خطوة بخطوة + كيفية إنشاء الباركود باستخدام Aspose، وضبط بيانات MacroPDF417 الوصفية، وحفظه كملف + PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: ar +lastmod: 2026-07-30 +og_description: كيفية إنشاء صورة باركود PDF417 في C# باستخدام Aspose. اتبع هذا الدليل + الكامل لإنشاء باركود باستخدام Aspose، وتكوين بيانات تعريف MacroPDF417، وإخراج ملف + PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: كيفية إنشاء صورة باركود PDF417 في C# باستخدام Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: كيفية إنشاء صورة باركود PDF417 في C# باستخدام Aspose +url: /ar/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# كيفية إنشاء صورة باركود PDF417 في C# باستخدام Aspose + +إنشاء صورة باركود PDF417 في C# باستخدام Aspose يمثل عائقًا شائعًا لأي شخص يتعامل مع ترميز البيانات عالية الكثافة. في هذا الدليل سنستعرض كل خطوة — إعداد المولد، تعديل بيانات MacroPDF417 الوصفية، وأخيرًا حفظ ملف PNG واضح. + +إذا سبق لك أن حاولت **generate barcode image c#** وانتهى الأمر بلوحة فارغة أو مسح غير قابل للقراءة، فأنت لست وحدك. الخبر السار هو أن Aspose.BarCode يجعل العملية بأكملها شبه خالية من المتاعب، وبنهاية هذا المقال ستتمكن من **create barcode with Aspose** لأي سير عمل مؤسسي. + +## ما ستتعلمه + +- تثبيت وإضافة مرجع لمكتبة Aspose.BarCode لـ .NET. +- تهيئة مولد PDF417 ببيانات مخصصة. +- تطبيق الحقول الخاصة بـ MacroPDF417 مثل معرف الملف، معرف الجزء، والطابع الزمني. +- تصدير النتيجة إلى صورة PNG يمكنك تضمينها في التقارير أو التطبيقات المحمولة. +- نصائح لاستكشاف الأخطاء الشائعة (مثل عرض الوحدة غير الصحيح، أو الأجزاء المفقودة). + +لا يلزم أي خبرة سابقة في MacroPDF417؛ ففهم أساسي لـ C# و Visual Studio يكفي. + +## المتطلبات المسبقة + +| المتطلب | السبب | +|-------------|--------| +| .NET 6.0 أو أحدث | الإصدار الحالي طويل الدعم (LTS)، مدعوم بالكامل من قبل Aspose | +| Visual Studio 2022 (أو أي بيئة تطوير) | لتجميع وتشغيل العينة | +| Aspose.BarCode for .NET (NuGet) | يوفر `BarcodeGenerator` ودعم PDF417 | + +يمكنك إضافة المكتبة عبر NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +الآن بعد وضع الأساس، دعنا نتعمق في الشيفرة. + +## كيفية إنشاء صورة باركود PDF417 في C# – الإعداد + +أول شيء نقوم به هو إنشاء كائن `BarcodeGenerator` لنوع الترميز **MacroPdf417**. هذا الكائن يحتوي على جميع خيارات التكوين، من حجم الوحدة إلى البيانات الوصفية الغنية التي يتوقعها MacroPDF417. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **لماذا هذا مهم:** `EncodeTypes.MacroPdf417` يخبر Aspose بإنتاج باركود PDF417 يمكن تقسيمه إلى عدة أجزاء — وهو أمر ضروري للملفات الكبيرة أو المعالجة الدفعية. + +## تكوين المظهر الأساسي + +يبدأ الباركود القابل للقراءة بالإعدادات البصرية الصحيحة. يتحكم `XDimension` في عرض كل وحدة (المربعات الصغيرة السوداء/البيضاء)، بينما يحدد `Columns` عدد الأعمدة التي يغطيها الباركود. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **نصيحة:** إذا كان الباركود يبدو كثيفًا جدًا على طابعة الإيصالات، قم بزيادة `XDimension` إلى `3` أو `4`. +- **مشكلة محتملة:** ضبط `Columns` منخفضًا جدًا قد يؤدي إلى تجاوز الباركود حدود الصورة، مما ينتج مسحًا غير قابل للقراءة. + +## تعيين البيانات الوصفية الخاصة بـ MacroPDF417 + +يتيح لك MacroPDF417 تضمين معلومات على مستوى الملف مباشرةً داخل الباركود. هذا مثالي لتتبع شحنات المستندات الكبيرة أو تقسيم ملف عبر عدة مسحات. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**ما الذي يفعله كل حقل:** + +| الخاصية | الوصف | +|----------|-------------| +| `MacroPdf417FileID` | معرف فريد للملف بأكمله. | +| `MacroPdf417SegmentID` | فهرس الجزء الحالي (يبدأ من 0). | +| `MacroPdf417SegmentsCount` | العدد الكلي للأجزاء التي يُقسم إليها الملف. | +| `MacroPdf417FileName` | اسم قابل للقراءة البشرية، مفيد لسجلات التدقيق. | +| `MacroPdf417Checksum` | CRC 16‑بت للتحقق من سلامة البيانات. | +| `MacroPdf417FileSize` | حجم الملف الأصلي بالبايت، يساعد المستقبلين على تخصيص الذاكرة. | +| `MacroPdf417TimeStamp` | التاريخ/الوقت عندما تم إنشاء الملف. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | سلاسل اختيارية لتحديد المرسل/المستقبل. | +| `MacroPdf417Terminator` | يحدد آخر جزء؛ مطلوب للتشفير الصحيح. | + +> **لماذا العناء؟** بدون هذه الحقول، لا يستطيع الماسح قراءة سوى البيانات الخام، دون السياق. إضافة البيانات الوصفية يعني أن النظام المستقبل يمكنه إعادة تجميع الملف الأصلي تلقائيًا. + +## حفظ الباركود كملف PNG + +بمجرد تكوين المولد بالكامل، حفظ الصورة يصبح سطرًا واحدًا: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **تنسيق الملف:** PNG غير مضغوط، مما يضمن بقاء كل وحدة حادة للماسحات. +- **بديل:** استخدم `BarCodeImageFormat.Jpeg` إذا كنت بحاجة إلى حجم ملف أصغر، لكن توقع فقدانًا طفيفًا في قابلية القراءة. + +### النتيجة المتوقعة + +بعد تشغيل المقتطف، ستجد `MacroPdf417Meta.png` في المجلد المحدد. يجب أن يبدو مشابهًا للرسمة أدناه: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="كيفية إنشاء صورة باركود PDF417 في C#"} + +تحتوي الصورة على شبكة كثيفة من المربعات السوداء والبيضاء، مع الحمولة المشفرة والبيانات الوصفية لـ MacroPDF417 مدمجة. + +## مثال كامل يعمل + +فيما يلي البرنامج الكامل الجاهز للنسخ واللصق. يتم تجميعه مع أي مشروع .NET 6+ ويتطلب فقط حزمة Aspose.BarCode من NuGet. + + + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مصدر يتضمن أمثلة شيفرة كاملة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [كيفية إنشاء باركود – PDF417 مضغوط باستخدام Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [كيفية إنشاء باركود DataMatrix (ECC 200) باستخدام Aspose.BarCode لـ .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [كيفية إنشاء باركود Aztec بنسبة أبعاد مخصصة باستخدام Aspose.BarCode لـ .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/arabic/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/arabic/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..cd392baea --- /dev/null +++ b/barcode/arabic/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,254 @@ +--- +category: general +date: 2026-07-30 +description: قراءة عدة باركودات باستخدام C# و Aspose.BarCode. تعلم خطوة بخطوة كيفية + فك تشفير PDF417، واكتشاف الوضع المضغوط، ومعالجة العديد من الباركودات في صورة واحدة. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: ar +lastmod: 2026-07-30 +og_description: قراءة عدة باركودات باستخدام C# و Aspose.BarCode. يوضح هذا الدليل كيفية + فك تشفير جميع الباركودات في صورة، والتحقق من وضع الضغط، وتكاملها مع تطبيقات .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: قراءة عدة رموز شريطية C# – دليل كامل لـ PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: قراءة عدة رموز شريطية C# – دليل كامل مع PDF417 +url: /ar/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# قراءة عدة باركودات C# – دليل كامل مع PDF417 + +هل تساءلت يومًا كيف **read multiple barcodes C#** من صورة واحدة؟ ربما لديك مجموعة من ملصقات الشحن، أو مجموعة تذاكر، أو مستند PDF417 يحتوي على عدة رموز في صورة واحدة. في عملي اليومي، واجهت هذا التحدي بالضبط—حتى اكتشفت `BarCodeReader` من Aspose.BarCode. سيوضح لك هذا الدليل كيفية فك تشفير كل باركود في الصورة، ومعرفة ما إذا كان كل PDF417 في وضع مضغوط (مقتطع)، ومعالجة النتائج بشكل نظيف. + +سنضيف أيضًا بعض النصائح الإضافية—مثل ما يجب فعله عندما تحتوي الصورة على رموز باركود مختلفة، أو عندما لا تُعيد عملية المسح أي نتائج. في النهاية ستحصل على تطبيق كونسول جاهز للتشغيل **reads multiple barcodes C#** كالمحترفين. + +## ما ستحتاجه + +- **.NET 6.0** SDK أو أحدث (الكود يعمل أيضًا مع .NET Framework 4.6+، لكن .NET 6 هو الخيار المثالي). +- حزمة NuGet **Aspose.BarCode for .NET** (`Install-Package Aspose.BarCode`). +- صورة عينة تحتوي على باركودات **PDF417**—يفضل أن تكون مزيجًا من الرموز المضغوطة والكاملة. يستخدم الدليل `CompactPdf417.png`، لكن أي ملف PNG/JPEG سيعمل. +- بيئة التطوير المتكاملة المفضلة لديك (Visual Studio، Rider، أو VS Code). + +هذا كل شيء—لا حاجة إلى DLL إضافية، ولا تبعيات أصلية. Aspose.BarCode هو كود مُدار بالكامل، لذا يمكنك إضافته إلى أي مشروع .NET. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*قراءة عدة باركودات C# – لقطة شاشة للكونسول تعرض حالة الوضع المضغوط لباركودات PDF417.* + +## الخطوة 1 – تثبيت وإضافة مرجع لمكتبة BarCodeReader C# Library + +أولًا، تحتاج إلى الفئة **BarCodeReader C#** التي تقوم بعملية فك الترميز. افتح الطرفية (أو وحدة تحكم مدير الحزم) وشغّل: + +```powershell +dotnet add package Aspose.BarCode +``` + +أو، إذا كنت داخل مدير NuGet في Visual Studio، ابحث عن *Aspose.BarCode* واضغط **Install**. سيقوم ذلك بتنزيل أحدث نسخة مستقرة (حتى يوليو 2026 هي 23.9)، والتي تدعم PDF417، QR، DataMatrix، والعديد من الرموز الأخرى. + +لماذا هذا مهم: المكتبة تُجرد عنك عبء معالجة الصور، وتصحيح الأخطاء، والتعرف على الرموز. يمكنك كتابة ماسح خاص بك، لكنك ستقضي أسابيع في معالجة الحالات الطرفية. Aspose توفر لك **C# barcode library** مُختبرة في المعارك وتم تحديثها لتعمل مع بيئات .NET الحديثة. + +## الخطوة 2 – إعداد مشروع كونسول بسيط + +أنشئ تطبيق كونسول جديد حتى نتمكن من التركيز على منطق الباركود دون أي تشويش واجهة المستخدم: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +استبدل ملف `Program.cs` المُولد بالمثال الكامل أدناه. يمكنك الإبقاء على مساحة الاسم الافتراضية أو إعادة تسميتها—لا حاجة لأي تعديل خاص. + +## الخطوة 3 – كتابة تنفيذ كامل لـ “Read Multiple Barcodes C#” + +فيما يلي عينة كود **كاملة وقابلة للتنفيذ**. تغطي جميع الخطوات الأربعة من المقتطف الأصلي، وتضيف معالجة الأخطاء، وتطبع تشخيصات مفيدة. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### لماذا يعمل هذا الكود + +- **`BarCodeReader`** هو العنصر الأساسي من واجهة **BarCodeReader C#** API. يفتح الصورة، يطبق المعالجة المسبقة، ويبحث عن الرموز من النوع الذي تحدده. +- **`ReadBarCodes()`** تُعيد مصفوفة، وليس نتيجة واحدة فقط. هذا هو المفتاح لـ **reading multiple barcodes C#**—الطريقة تجمع تلقائيًا كل التطابقات التي تجدها. +- **`result.Extended.Pdf417.IsTruncated`** يخبرنا ما إذا كان PDF417 في وضع *مضغوط* (المعروف أيضًا بالمقتطع). هذه العلامة موجودة فقط لـ PDF417، لذا نستخدم عامل الشرطية null (`?.`) لتجنب الاستثناءات إذا ظهرت رموز أخرى. +- حلقة `foreach` تطبع كلًا من النص المفكك وحالة الضغط، مما يمنحك فحصًا سريعًا للمنطق. + +## الخطوة 4 – التعامل مع أنواع باركود مختلفة (اختياري) + +إذا كانت صورتك قد تحتوي على أكثر من PDF417، ما عليك سوى تغيير الوسيط الثاني لـ `BarCodeReader` إلى `DecodeType.AllSupported`. تبقى الحلقة نفسها، لكن سيتعين عليك الحماية من أن يكون `result.Extended` فارغًا للرموز غير PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +هذا التعديل البسيط يحول **C# barcode library** إلى ماسح شامل، مثالي للدفعات التي تحتوي على رموز مختلطة. + +## الخطوة 5 – الحالات الطرفية ونصائح الممارسات الأفضل + +### 1️⃣ عدم اكتشاف أي باركود + +إذا أعادت `ReadBarCodes()` مصفوفة فارغة، فإن أكثر الأسباب شيوعًا هي: + +- مسار الملف غير صحيح أو عدم وجود أذونات قراءة. +- جودة الصورة منخفضة جدًا (ضبابية، تباين منخفض). فكر في المعالجة المسبقة باستخدام `reader.ImagePreprocessingOptions` (مثال: `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ صور ضخمة جدًا + +معالجة صورة بحجم 10 MP قد تستهلك الكثير من الذاكرة. يمكنك تحديد منطقة الفحص: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ أمان الخيوط (Thread‑Safety) + +`BarCodeReader` يطبق `IDisposable` وهو **ليس** آمنًا للاستخدام عبر الخيوط. أنشئ نسخًا منفصلة لكل خيط إذا كنت تحتاج إلى معالجة متوازية. + +### 4️⃣ الترخيص + +Aspose.BarCode يعمل في وضع التجربة مباشرةً، لكنك سترى علامة مائية على صورة الإخراج. للإنتاج، قم بتعيين الترخيص مبكرًا: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ التسجيل (Logging) + +عند دمج هذا في خدمة أكبر، استبدل `Console.WriteLine` بمسجل منظم (Serilog، NLog). بهذه الطريقة يمكنك التقاط `CodeText`، `CodeType`، و `IsTruncated` كحقول للتحليلات اللاحقة. + +## ملخص المثال الكامل القابل للتنفيذ + +بجمع كل ما سبق، إليك البرنامج *الكامل* الذي يمكنك نسخه ولصقه في `Program.cs`: + + + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مصدر يتضمن أمثلة كود كاملة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [كيفية إنشاء باركودات PDF417 – ترميز PDF417 مضغوط](/barcode/english/net/compact-pdf417-encoding/) +- [كيفية إنشاء باركود – PDF417 مضغوط باستخدام Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [كيفية قراءة باركودات DataMatrix باستخدام Aspose.BarCode لـ .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/arabic/net/one-dimensional-barcode-types/_index.md b/barcode/arabic/net/one-dimensional-barcode-types/_index.md index 704801638..7de94441b 100644 --- a/barcode/arabic/net/one-dimensional-barcode-types/_index.md +++ b/barcode/arabic/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,7 @@ url: /ar/net/one-dimensional-barcode-types/ تعرف على كيفية التعامل مع الاستثناءات أثناء إنشاء رموز شريطية أحادية البعد باستخدام Aspose.BarCode لـ .NET. يضمن هذا الدليل التفصيلي حلول الباركود التي تتحمل الأخطاء. نبدأ الآن! ### [تكوين ذو نسبة واسعة وضيقة أحادية البعد](./one-dimensional-wide-narrow-ratio-configuration/) قم بإنشاء رموز شريطية مخصصة بسهولة باستخدام Aspose.BarCode لـ .NET. دليل خطوة بخطوة لتكوين نسبة واسعة وضيقة أحادية البعد. +### [قراءة الباركود من صورة – مثال قارئ الباركود C#](./read-barcode-from-image-c-barcode-reader-example/) ## خاتمة @@ -89,4 +90,4 @@ url: /ar/net/one-dimensional-barcode-types/ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/arabic/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/arabic/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..394ec85b9 --- /dev/null +++ b/barcode/arabic/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,275 @@ +--- +category: general +date: 2026-07-30 +description: قراءة الباركود من صورة باستخدام Aspose.BarCode لـ .NET – مثال كامل لقراءة + الباركود بلغة C# يوضح كيفية فك تشفير باركود Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: ar +lastmod: 2026-07-30 +og_description: قراءة الباركود من الصورة باستخدام Aspose.BarCode لـ .NET. هذا المثال + خطوة بخطوة لقراءة الباركود بلغة C# يوضح كيفية استخراج جميع بيانات تعريف Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: قراءة الباركود من الصورة – مثال كامل لقارئ الباركود بلغة C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: قراءة الباركود من الصورة – مثال قارئ باركود C# +url: /ar/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# قراءة الباركود من الصورة – مثال قارئ باركود C# + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +تخيل أنك قمت للتو بمسح بطاقة شحن، أو بطاقة صعود، أو هوية حكومية تحتوي على جزء Macro PDF417. تريد استخراج معرف الملف، عدد الأقسام، الطوابع الزمنية، وربما حتى اسم المرسل—كل ذلك دون مغادرة الكود الخاص بك. هذا بالضبط ما سنحققه، وسنقوم بذلك بطريقة سهلة للنسخ واللصق في مشروعك الخاص. + +--- + +## ما ستتعلمه + +- كيفية إضافة حزمة Aspose.BarCode NuGet إلى مشروع .NET. +- كيفية فتح ملف صورة يحتوي على باركود Macro PDF417. +- كيفية التكرار على نتائج **قراءة الباركود من الصورة** والوصول إلى كل حقل موسع. +- نصائح للتعامل مع أقسام متعددة، والتحقق من صحة المجموعات الاختبارية، وحل المشكلات الشائعة. + +بنهاية هذا الدليل ستحصل على تطبيق كونسول يعمل ويطبع جميع بيانات تعريف Macro PDF417، جاهز للتكامل مع أنظمة أكبر مثل متتبعات المخزون أو خطوط إدارة المستندات. + +--- + +## المتطلبات المسبقة + +قبل أن نبدأ، تأكد من أن لديك ما يلي: + +| المتطلب | سبب الأهمية | +|-------------|----------------| +| .NET 6.0 SDK or later (any recent version works) | يوفر بيئة التشغيل لتطبيق الكونسول. | +| Visual Studio 2022 (or VS Code with C# extension) | يجعل التحرير وتصحيح الأخطاء سهلًا. | +| Aspose.BarCode for .NET (free trial or licensed) | المكتبة التي تقوم فعليًا بفك تشفير الباركود. | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | المصدر الذي سنقرأ منه. | + +إذا لم يكن لديك Aspose.BarCode بالفعل، يمكنك الحصول عليه من NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +هذا السطر الواحد يثبت كل ما تحتاجه، بما في ذلك `BarCodeReader` و`DecodeType` ومجموعة الخصائص الغنية `Extended` التي سنستكشفها. + +--- + +## الخطوة 1 – إعداد المشروع واستيراد المكتبة + +أنشئ مشروع كونسول جديد (أو ضع الشيفرة في مشروع موجود). توجيهات `using` ضرورية؛ فهي تجلب فئات الباركود إلى النطاق. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **نصيحة احترافية:** إذا كنت تستخدم Visual Studio، سيقترح IDE إضافة توجيهات `using` المفقودة تلقائيًا—فقط اضغط *Ctrl+.`*. + +--- + +## الخطوة 2 – إعداد مسار الصورة + +كتابة مسار مطلق ثابت تعمل للعرض السريع، لكن في بيئة الإنتاج ربما تقبل وسيط سطر أو إعداد تكوين. للتوضيح سنبقيه بسيطًا: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **سبب أهمية ذلك:** يتوقع `BarCodeReader` موقع ملف صالح؛ مسار غير صحيح يسبب استثناء `FileNotFoundException` قبل بدء أي فك تشفير. + +--- + +## الخطوة 3 – **قراءة الباركود من الصورة** واستخراج تفاصيل Macro PDF417 + +الآن يأتي قلب **مثال قارئ باركود C#**. سننشئ `BarCodeReader` مع علامة `DecodeType.MacroPdf417`، نمر عبر جميع النتائج (قد يكون هناك أكثر من باركود في صورة واحدة)، ونطبع كل خاصية موسعة. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### ما يفعله الكود (السبب، ليس فقط الطريقة) + +1. **كتلة `using`** – تضمن تحرير الموارد الأصلية (مقابض الملفات، ذاكرة المفكّك الأصلية) فورًا بعد العملية. تخطي ذلك قد يؤدي إلى ملفات مقفلة على Windows. +2. **`DecodeType.MacroPdf417`** – يخبر Aspose بالبحث تحديدًا عن رموز Macro PDF417؛ الأنواع الأخرى من الباركود تُتجاهل، مما يسرّع عملية المسح. +3. **`ReadBarCodes()`** – تُعيد مجموعة لأن الصورة قد تحتوي على عدة أقسام Macro PDF417 (تخيل مستندًا متعدد الصفحات مقسّمًا عبر عدة باركودات). +4. **`macroResult.Extended?.Pdf417`** – كائن `Extended` يمكن أن يكون فارغًا؛ عامل التنقل الآمن (`?.`) يمنع استثناء `NullReferenceException` إذا كان الباركود يفتقر إلى بيانات موسعة. +5. **طباعة كل حقل** – يمنحك رؤية لمعرف الملف، ترتيب الأقسام، التحقق من المجموع الاختباري، والحقول النصية الاختيارية مثل المرسل أو المستلم. + +--- + +## الخطوة 4 – تشغيل التطبيق والتحقق من المخرجات + +قم بتجميع البرنامج وتنفيذه: + +```bash +dotnet run +``` + +إذا تم ربط كل شيء بشكل صحيح، يجب أن ترى شيئًا مشابهًا لما يلي في الكونسول الخاص بك: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **ملاحظة:** القيم الدقيقة تعتمد على الباركود الذي تقوم بفك تشفيره. إذا حصلت على “No Macro PDF417 extension data found”، تحقق مرة أخرى من أن الصورة تحتوي فعلاً على رمز Macro PDF417 وأنك تستخدم `DecodeType` الصحيح. + +--- + +## التعامل مع أقسام متعددة والتحقق (متقدم) + +تم تصميم Macro PDF417 للحمولات الكبيرة من البيانات المقسمة عبر عدة رموز. عندما تواجه أكثر من قسم، عادةً ما تحتاج إلى: + +1. **جمع جميع الأقسام** في قاموس مفتاحه هو `SegmentID`. +2. **ترتيب**ها حسب `SegmentID` لإعادة تجميع الملف الأصلي. +3. **التحقق** من `Checksum` مقابل الحمولة المدمجة (يقوم Aspose بذلك داخليًا، لكن يمكنك إعادة تشغيل CRC إذا كنت تحتاج إلى أمان إضافي). + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +ستحتاج إلى تنفيذ `AssembleSegments` و`VerifyChecksum` بناءً على تنسيق الحمولة الخاص بك—غالبًا ما يكون مجرد دمج مصفوفة بايت متبوعًا بفحص CRC‑16. + +--- + +## المشكلات الشائعة وكيفية تجنبها + +| العرض | السبب المحتمل | الحل | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | الصورة تحتوي على PDF417 عادي، وليس نسخة Macro. | استخدم `DecodeType.Pdf417` بدلاً من ذلك، أو تحقق من باركود المصدر. | +| No output at all | `imagePath` غير صحيح أو الملف غير قابل للوصول. | تحقق مرة أخرى من مسار الملف؛ تأكد من أن التطبيق لديه أذونات القراءة. | +| Exception “Object disposed” | محاولة استخدام `reader` بعد كتلة `using`. | احتفظ بجميع المعالجة داخل الـ ` | + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات التي تم توضيحها في هذا الدليل. كل مصدر يتضمن أمثلة شاملة من الشيفرة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [برمجة قارئ DataMatrix باستخدام Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [تهيئة قارئ DotCode باستخدام Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [كيفية قراءة باركودات DataMatrix باستخدام Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/chinese/net/compact-pdf417-encoding/_index.md b/barcode/chinese/net/compact-pdf417-encoding/_index.md index 165dd64a9..2c49a8a07 100644 --- a/barcode/chinese/net/compact-pdf417-encoding/_index.md +++ b/barcode/chinese/net/compact-pdf417-encoding/_index.md @@ -85,7 +85,9 @@ Aspose.BarCode 允许您设置 `Pdf417ErrorCorrectionLevel` 属性(0‑8)。 ### [创建紧凑 PDF417 条形码](./compact-pdf417-basic-configuration/) -了解如何使用 Aspose.BarCode for .NET 生成紧凑 PDF417 条形码。提供完整的分步指南和代码示例。 +### [使用 Aspose 在 C# 中生成 PDF417 条码图像](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) + +### [读取多个条码 C# – 完整指南(含 PDF417)](./read-multiple-barcodes-c-complete-guide-with-pdf417/) ## 常见问题 @@ -115,4 +117,4 @@ Aspose.BarCode 允许您设置 `Pdf417ErrorCorrectionLevel` 属性(0‑8)。 {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/chinese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/chinese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..ab599596a --- /dev/null +++ b/barcode/chinese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,174 @@ +--- +category: general +date: 2026-07-30 +description: 如何使用 Aspose 在 C# 中生成 PDF417 条形码图像。一步一步学习如何使用 Aspose 创建条形码、设置 MacroPDF417 + 元数据并保存为 PNG。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: zh +lastmod: 2026-07-30 +og_description: 如何使用 Aspose 在 C# 中生成 PDF417 条形码图像。请遵循本完整指南,使用 Aspose 创建条形码,配置 MacroPDF417 + 元数据,并输出 PNG 文件。 +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: 如何使用 Aspose 在 C# 中生成 PDF417 条形码图像 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: 如何使用 Aspose 在 C# 中生成 PDF417 条形码图像 +url: /zh/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何使用 Aspose 在 C# 中生成 PDF417 条形码图像 + +如何使用 Aspose 在 C# 中生成 PDF417 条形码图像是处理高密度数据编码时常见的难题。在本指南中,我们将逐步演示——设置生成器、调整 MacroPDF417 元数据,最后保存为清晰的 PNG 文件。 + +如果你曾尝试 **generate barcode image c#** 却得到空白画布或无法读取的扫描结果,你并不孤单。好消息是 Aspose.BarCode 让整个过程几乎无痛,阅读完本文后,你就能 **create barcode with Aspose**,满足任何企业工作流的需求。 + +## 你将学到 + +- 安装并引用 Aspose.BarCode for .NET 库。 +- 使用自定义负载初始化 PDF417 生成器。 +- 应用 MacroPDF417 特有的字段,如文件 ID、段 ID 和时间戳。 +- 将结果导出为 PNG 图像,可嵌入报表或移动应用。 +- 常见问题的排查技巧(例如模块宽度错误、缺少段等)。 + +无需事先了解 MacroPDF417;只要具备 C# 和 Visual Studio 的基础即可。 + +## 前置条件 + +| 要求 | 原因 | +|------|------| +| .NET 6.0 或更高版本 | 当前 LTS 版本,Aspose 完全支持 | +| Visual Studio 2022(或任意 IDE) | 用于编译和运行示例 | +| Aspose.BarCode for .NET(NuGet) | 提供 `BarcodeGenerator` 与 PDF417 支持 | + +可以通过 NuGet 添加库: + +```bash +dotnet add package Aspose.BarCode +``` + +现在基础工作已经完成,让我们进入代码实现。 + +## 如何在 C# 中生成 PDF417 条形码图像 – 环境搭建 + +我们首先创建一个 `BarcodeGenerator` 实例,使用 **MacroPdf417** 编码类型。该对象保存所有配置选项,从模块尺寸到 MacroPDF417 所需的丰富元数据。 + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **为何重要:** `EncodeTypes.MacroPdf417` 告诉 Aspose 生成可拆分为多个段的 PDF417 条形码——这对于大文件或批量处理是必备的。 + +## 配置基本外观 + +可读的条形码需要合适的视觉设置。`XDimension` 控制每个模块(小黑白方块)的宽度,而 `Columns` 决定条形码跨越的列数。 + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **提示:** 如果在收据打印机上条形码显得过于密集,可将 `XDimension` 调高至 `3` 或 `4`。 +- **陷阱:** 将 `Columns` 设置得过低会导致条形码超出图像边界,产生不可读取的扫描结果。 + +## 设置 MacroPDF417 特定元数据 + +MacroPDF417 允许直接在条形码中嵌入文件级信息。这对于跟踪大型文档传输或将文件拆分为多个扫描非常适用。 + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**各字段作用说明:** + +| 属性 | 描述 | +|------|------| +| `MacroPdf417FileID` | 整个文件的唯一标识符。 | +| `MacroPdf417SegmentID` | 当前段的索引(从 0 开始)。 | +| `MacroPdf417SegmentsCount` | 文件被拆分的总段数。 | +| `MacroPdf417FileName` | 人类可读的文件名,便于审计日志。 | +| `MacroPdf417Checksum` | 用于数据完整性校验的 16 位 CRC。 | +| `MacroPdf417FileSize` | 原始文件大小(字节),帮助接收方分配缓冲区。 | +| `MacroPdf417TimeStamp` | 文件生成的日期/时间。 | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | 可选的发送方/接收方标识字符串。 | +| `MacroPdf417Terminator` | 标记最后一个段;解码时必需。 | + +> **为什么要这样做?** 没有这些字段,扫描器只能读取原始数据,无法获取上下文信息。添加元数据后,接收系统可以自动重组原始文件。 + +## 将条形码保存为 PNG + +生成器配置完成后,保存图像只需一行代码: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **文件格式:** PNG 为无损格式,确保每个模块在扫描时保持清晰。 +- **可选方案:** 如需更小的文件体积,可使用 `BarCodeImageFormat.Jpeg`,但可读性会略有下降。 + +### 预期输出 + +运行代码片段后,你会在指定文件夹中看到 `MacroPdf417Meta.png`。它应类似下图所示: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="如何在 C# 中生成 PDF417 条形码图像"} + +该图像包含密集的黑白方格网格,内部嵌入了负载数据和 MacroPDF417 元数据。 + +## 完整可运行示例 + +下面是完整的、可直接复制粘贴的程序。它可在任何 .NET 6+ 项目中编译,只需引用 Aspose.BarCode NuGet 包。 + + + +## 接下来你应该学习什么? + +以下教程涵盖与本指南技术紧密相关的主题,帮助你在自己的项目中进一步掌握 API 功能并探索替代实现方式。每个资源均提供完整的可运行代码示例和逐步解释。 + +- [如何使用 Aspose.BarCode 创建紧凑型 PDF417 条形码](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [如何使用 Aspose.BarCode for .NET 生成 DataMatrix 条形码(ECC 200)](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [如何使用 Aspose.BarCode for .NET 生成自定义宽高比的 Aztec 条形码](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/chinese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/chinese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..b4b95f1e6 --- /dev/null +++ b/barcode/chinese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,250 @@ +--- +category: general +date: 2026-07-30 +description: 使用 Aspose.BarCode 在 C# 中读取多个条形码。一步步学习如何解码 PDF417、检测紧凑模式,以及在同一图像中处理多个条形码。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: zh +lastmod: 2026-07-30 +og_description: 使用 Aspose.BarCode 在 C# 中读取多个条形码。本指南展示如何解码图像中的所有条形码、检查紧凑模式,并将其集成到 .NET + 应用程序中。 +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: 读取多个条形码 C# – PDF417 完整教程 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: C# 读取多个条码 – 包含 PDF417 的完整指南 +url: /zh/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 读取多个条形码 C# – PDF417 完整指南 + +有没有想过如何 **读取多个条形码 C#**,一次性从同一张图片中获取?也许你手头有一批运单标签、票据拼贴,或是将多个代码压缩在一张图片中的 PDF417 文档。在我的日常工作中,我正是碰到了这种情况——直到我发现了 Aspose.BarCode 的 `BarCodeReader`。本教程将手把手教你如何解码图像中的每一个条形码,判断每个 PDF417 是否处于紧凑(截断)模式,并干净利落地处理结果。 + +我们还会顺带提供一些小技巧——比如图像中出现不同条码符号时该怎么做,或者扫描没有返回任何结果时的处理方式。阅读完本教程后,你将拥有一个可直接运行的控制台应用,能够 **读取多个条形码 C#**,如同专业人士一般。 + +## 你需要准备的环境 + +在开始之前,请确保你的机器上具备以下条件: + +- **.NET 6.0** SDK 或更高版本(代码同样支持 .NET Framework 4.6+,但 .NET 6 是最佳选择)。 +- **Aspose.BarCode for .NET** NuGet 包(`Install-Package Aspose.BarCode`)。 +- 一张包含 **PDF417** 条码的示例图片——最好是同时包含紧凑和完整尺寸符号的。教程使用 `CompactPdf417.png`,但任何 PNG/JPEG 都可以。 +- 你喜欢的 IDE(Visual Studio、Rider 或 VS Code)。 + +就这些——无需额外的 DLL,也不需要本地依赖。Aspose.BarCode 完全基于托管代码,你可以把它直接放进任何 .NET 项目中。 + +![读取多个条形码 C# 控制台输出](image.png "读取多个条形码 C# – 控制台显示 PDF417 条形码的紧凑模式状态") + +*图片说明:读取多个条形码 C# – 控制台显示 PDF417 条形码的紧凑模式状态的截图。* + +## 第一步 – 安装并引用 BarCodeReader C# 库 + +首先,你需要 **BarCodeReader C#** 类来完成解码工作。打开终端(或 Package Manager Console),运行: + +```powershell +dotnet add package Aspose.BarCode +``` + +或者,在 Visual Studio 的 NuGet 管理器中搜索 *Aspose.BarCode* 并点击 **Install**。这会拉取最新的稳定版本(截至 2026 年 7 月为 23.9),支持 PDF417、QR、DataMatrix 以及数十种其他符号。 + +为什么这很重要:该库将图像处理、错误纠正和符号识别的繁重工作抽象出来。你完全可以自己实现扫描器,但那会耗费数周时间去处理各种边缘情况。Aspose 为你提供了经过实战检验的 **C# 条形码库**,并已针对现代 .NET 运行时进行了更新。 + +## 第二步 – 创建最小化的控制台项目 + +新建一个控制台应用,以便我们专注于条码逻辑而不受 UI 干扰: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +用下面的完整示例替换生成的 `Program.cs`。可以保留默认命名空间,也可以自行重命名——没有特殊要求。 + +## 第三步 – 编写完整的 “读取多个条形码 C#” 实现 + +下面是一段 **完整、可运行** 的代码示例。它涵盖了原始片段的全部四个步骤,加入了错误处理,并输出有用的诊断信息。 + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### 代码为何可行 + +- **`BarCodeReader`** 是 **BarCodeReader C#** API 的核心。它打开图像、执行预处理,并搜索你指定类型的符号。 +- **`ReadBarCodes()`** 返回的是数组,而不是单一结果。这正是实现 **读取多个条形码 C#** 的关键——该方法会自动收集所有匹配项。 +- **`result.Extended.Pdf417.IsTruncated`** 用来判断 PDF417 是否处于 *紧凑*(即截断)模式。该标志仅在 PDF417 中存在,因此我们使用空条件运算符 (`?.`) 来防止在出现其他符号时抛出异常。 +- `foreach` 循环同时打印解码文本和紧凑状态,让你快速进行 sanity check。 + +## 第四步 – 处理不同条码类型(可选) + +如果你的图像可能包含除 PDF417 之外的其他符号,只需将 `BarCodeReader` 的第二个参数改为 `DecodeType.AllSupported`。循环保持不变,但需要对非 PDF417 符号的 `result.Extended` 为 null 的情况进行防护: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +这一个小改动即可把你的 **C# 条形码库** 变成通用扫描器,完美适用于混合符号批次。 + +## 第五步 – 边缘情况与最佳实践提示 + +### 1️⃣ 未检测到条码 +如果 `ReadBarCodes()` 返回空数组,最常见的原因包括: + +- 文件路径错误或缺少读取权限。 +- 图像质量过低(模糊、对比度低)。可以使用 `reader.ImagePreprocessingOptions` 进行预处理(例如 `reader.ImagePreprocessingOptions.Denoise = true;`)。 + +### 2️⃣ 超大图像 +处理 10 MP 照片会占用大量内存。你可以限制扫描区域: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ 线程安全 +`BarCodeReader` 实现了 `IDisposable`,且 **不** 具备线程安全性。如果需要并行处理,请为每个线程创建独立实例。 + +### 4️⃣ 许可证 +Aspose.BarCode 开箱即用为试用模式,但输出图像上会出现水印。正式生产环境请尽早设置许可证: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ 日志记录 +将此代码集成到更大的服务时,建议用结构化日志框架(Serilog、NLog)替换 `Console.WriteLine`。这样可以将 `CodeText`、`CodeType`、`IsTruncated` 等字段记录下来,供后续分析使用。 + +## 完整工作示例回顾 + +将所有内容组合在一起,下面是可以直接复制粘贴到 `Program.cs` 的 *完整* 程序: + + + +## 接下来该学习什么? + +以下教程涵盖了与本指南紧密相关的主题,帮助你在掌握本篇技术要点的基础上,进一步探索 API 的其他功能并尝试不同的实现方式。 + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/chinese/net/one-dimensional-barcode-types/_index.md b/barcode/chinese/net/one-dimensional-barcode-types/_index.md index 78607b4f1..882ebd983 100644 --- a/barcode/chinese/net/one-dimensional-barcode-types/_index.md +++ b/barcode/chinese/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ url: /zh/net/one-dimensional-barcode-types/ 了解如何使用 Aspose.BarCode for .NET 生成一维条形码时处理异常。本分步指南可确保条码解决方案具有容错性。现在就开始! ### [一维宽窄比配置](./one-dimensional-wide-narrow-ratio-configuration/) 使用 Aspose.BarCode for .NET 轻松生成自定义条形码。一维宽窄比配置的分步指南。 +### [读取条码(图像) – C# 条码读取示例](./read-barcode-from-image-c-barcode-reader-example/) +了解如何使用 Aspose.BarCode 在 .NET 中读取图像中的条码。 ## 结论 @@ -89,4 +91,4 @@ url: /zh/net/one-dimensional-barcode-types/ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/chinese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/chinese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..9d8c0e1f2 --- /dev/null +++ b/barcode/chinese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,279 @@ +--- +category: general +date: 2026-07-30 +description: 使用 Aspose.BarCode for .NET 从图像读取条形码 – 一个完整的 C# 条形码读取示例,展示如何解码 Macro PDF417 + 条码。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: zh +lastmod: 2026-07-30 +og_description: 使用 Aspose.BarCode for .NET 从图像读取条形码。此分步 C# 条形码读取示例展示了如何提取所有 Macro + PDF417 元数据。 +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: 从图像读取条形码 – 完整的 C# 条形码读取示例 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: 从图像读取条形码 – C# 条形码读取示例 +url: /zh/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 从图像读取条形码 – C# 条形码读取器示例 + +需要在 C# 应用程序中**从图像读取条形码**吗?您来对地方了。在本教程中,我们将演示一个完整的 *c# barcode reader example*,该示例使用 Aspose.BarCode for .NET 库来解码 Macro PDF417 条形码并提取标准提供的所有扩展信息。 + +想象一下,您刚刚扫描了一张运输标签、登机牌或嵌入了 Macro PDF417 段的政府身份证。您想提取文件 ID、段计数、时间戳,甚至发送者的姓名——全部在代码中完成。这正是我们要实现的目标,并且我们会以一种可以直接复制粘贴到您项目中的方式来完成。 + +--- + +## 您将学到 + +- 如何向 .NET 项目添加 Aspose.BarCode NuGet 包。 +- 如何打开包含 Macro PDF417 条形码的图像文件。 +- 如何遍历**从图像读取条形码**的结果并访问每个扩展字段。 +- 处理多个段、验证校验和以及排查常见问题的技巧。 + +通过本指南,您将拥有一个可工作的控制台应用,打印出所有 Macro PDF417 元数据,随时可以集成到库存跟踪器或文档管理流水线等更大的系统中。 + +--- + +## 前提条件 + +在开始之前,请确保您具备以下条件: + +| 要求 | 为什么重要 | +|------|------------| +| .NET 6.0 SDK 或更高版本(任何近期版本均可) | 为控制台应用提供运行时。 | +| Visual Studio 2022(或带 C# 扩展的 VS Code) | 让编辑和调试变得轻松。 | +| Aspose.BarCode for .NET(免费试用或已授权) | 实际解码条形码的库。 | +| 包含 Macro PDF417 条形码的图像文件(`MacroPdf417Meta.png`) | 我们将读取的来源。 | + +如果您还没有 Aspose.BarCode,可以从 NuGet 获取: + +```bash +dotnet add package Aspose.BarCode +``` + +这行代码会安装您所需的所有内容,包括 `BarCodeReader`、`DecodeType` 以及我们将要探讨的丰富 `Extended` 属性集。 + +--- + +## 第一步 – 设置项目并导入库 + +创建一个全新的控制台项目(或将代码放入已有项目)。`using` 指令是必需的,它们将条形码类引入作用域。 + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** 如果您使用 Visual Studio,IDE 会自动提示添加缺失的 `using` 语句——只需按 *Ctrl+.`*。 + +--- + +## 第二步 – 准备图像路径 + +硬编码绝对路径适用于快速演示,但在生产环境中您可能会接受命令行参数或配置设置。为保持清晰,这里我们使用最简单的方式: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** `BarCodeReader` 需要一个有效的文件位置;路径错误会在任何解码开始前抛出 `FileNotFoundException`。 + +--- + +## 第三步 – **从图像读取条形码** 并提取 Macro PDF417 详细信息 + +现在进入 **c# barcode reader example** 的核心。我们将使用 `DecodeType.MacroPdf417` 标志实例化 `BarCodeReader`,遍历所有结果(单张图像中可能有多个条形码),并打印每个扩展属性。 + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### 代码的作用(为什么,而不仅仅是怎么做) + +1. **`using` 块** – 确保本机资源(文件句柄、原生解码器内存)在操作完成后立即释放。跳过此步骤可能导致 Windows 上的文件被锁定。 +2. **`DecodeType.MacroPdf417`** – 告诉 Aspose 专门查找 Macro PDF417 符号;其他条形码类型将被忽略,从而加快扫描速度。 +3. **`ReadBarCodes()`** – 返回一个集合,因为图像可能包含多个 Macro PDF417 段(比如跨多个条形码的多页文档)。 +4. **`macroResult.Extended?.Pdf417`** – `Extended` 对象可能为 null;安全导航运算符 (`?.`) 可防止在条形码缺少扩展数据时抛出 `NullReferenceException`。 +5. **打印每个字段** – 让您看到文件标识符、段顺序、校验和验证以及发送者或收件人等可选文本字段。 + +--- + +## 第四步 – 运行应用并验证输出 + +编译并执行程序: + +```bash +dotnet run +``` + +如果一切配置正确,您应该在控制台中看到类似如下的输出: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** 精确的数值取决于您解码的条形码。如果出现 “No Macro PDF417 extension data found”,请再次确认图像确实包含 Macro PDF417 代码,并且使用了正确的 `DecodeType`。 + +--- + +## 处理多个段和验证(高级) + +Macro PDF417 旨在将大数据负载拆分到多个符号中。当您遇到多个段时,通常需要: + +1. **收集所有段**到以 `SegmentID` 为键的字典中。 +2. **按 `SegmentID` 排序**以重新组装原始文件。 +3. **验证** `Checksum` 与拼接后的负载是否匹配(Aspose 在内部已完成此操作,但如果需要额外安全性,可以重新运行 CRC)。 + +下面给出一个快速示例: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +您需要根据自己的负载格式实现 `AssembleSegments` 和 `VerifyChecksum`——通常只需将字节数组拼接后进行 CRC‑16 校验即可。 + +--- + +## 常见陷阱及避免方法 + +| 症状 | 可能原因 | 解决方案 | +|------|----------|----------| +| 从 `macroResult.Extended` 返回 `null` | 图像包含普通 PDF417,而非 Macro 版本。 | 改用 `DecodeType.Pdf417`,或确认源条形码。 | +| 完全没有输出 | `imagePath` 错误或文件不可访问。 | 再次检查文件路径;确保应用具有读取权限。 | +| 异常 “Object disposed” | 在 `using` 块之后尝试使用 `reader`。 | 将所有处理保持在 ` + +--- + +## 接下来您应该学习什么? + +以下教程涵盖与本指南技术紧密相关的主题,帮助您在已有技巧的基础上进一步提升。每篇资源都提供完整可运行的代码示例和逐步解释,帮助您掌握更多 API 功能,并在自己的项目中探索替代实现方案。 + +- [使用 Aspose.BarCode for .NET 的 DataMatrix 读取器编程](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [使用 Aspose.BarCode for .NET 的 DotCode 读取器初始化](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [如何使用 Aspose.BarCode for .NET 读取 DataMatrix 条形码](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/czech/net/compact-pdf417-encoding/_index.md b/barcode/czech/net/compact-pdf417-encoding/_index.md index 29de108a1..6b277c2ea 100644 --- a/barcode/czech/net/compact-pdf417-encoding/_index.md +++ b/barcode/czech/net/compact-pdf417-encoding/_index.md @@ -86,6 +86,12 @@ Mimo základy, zde jsou některé praktické tipy pro zefektivnění vašeho pra ### [Vytváření Compact PDF417 čárových kódů](./compact-pdf417-basic-configuration/) Naučte se generovat Compact PDF417 čárové kódy pomocí Aspose.BarCode pro .NET. Kompletní průvodce s krok‑za‑krokem instrukcemi a ukázkami kódu. +### [Jak vygenerovat obrázek čárového kódu PDF417 v C# s Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Naučte se generovat obrázek PDF417 čárového kódu v C# pomocí Aspose. + +### [Čtení více čárových kódů v C# – Kompletní průvodce s PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Naučte se, jak pomocí Aspose.BarCode načíst více čárových kódů najednou v C# s podporou PDF417. + ## Často kladené otázky **Q:** Jaké je maximální množství dat, která mohu uložit do Compact PDF417 čárového kódu? @@ -114,4 +120,4 @@ Naučte se generovat Compact PDF417 čárové kódy pomocí Aspose.BarCode pro . {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/czech/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/czech/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..ebd3410ff --- /dev/null +++ b/barcode/czech/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Jak vygenerovat obrázek čárového kódu PDF417 v C# s Aspose. Naučte se + krok za krokem, jak vytvořit čárový kód pomocí Aspose, nastavit metadata MacroPDF417 + a uložit jako PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: cs +lastmod: 2026-07-30 +og_description: Jak vygenerovat obrázek čárového kódu PDF417 v C# s Aspose. Postupujte + podle tohoto kompletního návodu, vytvořte čárový kód pomocí Aspose, nakonfigurujte + metadata MacroPDF417 a exportujte soubor PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Jak vygenerovat obrázek čárového kódu PDF417 v C# s Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Jak vygenerovat obrázek čárového kódu PDF417 v C# s Aspose +url: /cs/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak vygenerovat obrázek PDF417 čárového kódu v C# pomocí Aspose + +Vygenerovat obrázek PDF417 čárového kódu v C# s Aspose je častou překážkou pro každého, kdo pracuje s kódováním dat vysoké hustoty. V tomto průvodci projdeme každý krok – nastavení generátoru, úpravu metadat MacroPDF417 a nakonec uložení ostrého PNG souboru. + +Pokud jste někdy zkusili **generate barcode image c#** a skončili s prázdným plátnem nebo nečitelné skenování, nejste sami. Dobrou zprávou je, že Aspose.BarCode dělá celý proces téměř bezbolestným a na konci tohoto článku budete schopni **create barcode with Aspose** pro jakýkoli podnikový workflow. + +## Co se naučíte + +- Nainstalovat a odkazovat knihovnu Aspose.BarCode pro .NET. +- Inicializovat PDF417 generátor s vlastním payloadem. +- Použít specifická pole MacroPDF417, jako je ID souboru, ID segmentu a časové razítko. +- Exportovat výsledek do PNG obrázku, který můžete vložit do reportů nebo mobilních aplikací. +- Tipy pro řešení běžných problémů (např. špatná šířka modulu, chybějící segmenty). + +Žádná předchozí zkušenost s MacroPDF417 není vyžadována; základní znalost C# a Visual Studia bude stačit. + +## Požadavky + +| Požadavek | Důvod | +|-------------|--------| +| .NET 6.0 nebo novější | Aktuální LTS verze, plně podporovaná Aspose | +| Visual Studio 2022 (nebo jakékoli IDE) | Pro kompilaci a spuštění ukázky | +| Aspose.BarCode pro .NET (NuGet) | Poskytuje `BarcodeGenerator` a podporu PDF417 | + +Knihovnu můžete přidat přes NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Nyní, když je základ položen, ponořme se do kódu. + +## Jak vygenerovat obrázek PDF417 čárového kódu v C# – Nastavení + +Prvním krokem je vytvořit instanci `BarcodeGenerator` pro typ kódování **MacroPdf417**. Tento objekt obsahuje všechny konfigurační možnosti, od velikosti modulu po bohatá metadata, která MacroPDF417 očekává. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Proč je to důležité:** `EncodeTypes.MacroPdf417` říká Aspose, aby vytvořil PDF417 čárový kód, který lze rozdělit do více segmentů – nezbytné pro velké soubory nebo dávkové zpracování. + +## Nastavení základního vzhledu + +Čitelný čárový kód začíná správným vizuálním nastavením. `XDimension` řídí šířku každého modulu (malých černých/bílých čtverečků), zatímco `Columns` určuje, kolik sloupců čárový kód zabírá. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tip:** Pokud čárový kód vypadá na tiskárně účtenek příliš hustě, zvyšte `XDimension` na `3` nebo `4`. +- **Nevýhoda:** Nastavení `Columns` na příliš nízkou hodnotu může způsobit, že čárový kód přesáhne hranice obrázku, což vede k nečitelné skenování. + +## Nastavení specifických metadat MacroPDF417 + +MacroPDF417 vám umožňuje vložit informace na úrovni souboru přímo do čárového kódu. To je ideální pro sledování velkých zásilek dokumentů nebo rozdělení souboru na několik skenů. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Co každé pole dělá:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | Jedinečný identifikátor celého souboru. | +| `MacroPdf417SegmentID` | Index aktuálního segmentu (začíná od 0). | +| `MacroPdf417SegmentsCount` | Celkový počet segmentů, na které je soubor rozdělen. | +| `MacroPdf417FileName` | Lidsky čitelný název, užitečný pro auditní záznamy. | +| `MacroPdf417Checksum` | 16‑bitový CRC pro ověření integrity dat. | +| `MacroPdf417FileSize` | Původní velikost souboru v bajtech, pomáhá příjemcům alokovat buffery. | +| `MacroPdf417TimeStamp` | Datum/čas, kdy byl soubor vygenerován. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Volitelné řetězce pro identifikaci odesílatele/příjemce. | +| `MacroPdf417Terminator` | Označuje poslední segment; vyžadováno pro správné dekódování. | + +> **Proč se tím zabývat?** Bez těchto polí může skener přečíst jen surová data, ne kontext. Přidání metadat umožní přijímacímu systému automaticky znovu sestavit původní soubor. + +## Uložení čárového kódu jako PNG + +Jakmile je generátor plně nakonfigurován, uložení obrázku je jednorázový řádek: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Formát souboru:** PNG je bezztrátový, zajišťuje, že každý modul zůstane ostrý pro skenery. +- **Alternativa:** Použijte `BarCodeImageFormat.Jpeg`, pokud potřebujete menší velikost souboru, ale očekávejte mírný pokles čitelnosti. + +### Očekávaný výstup + +Po spuštění úryvku najdete `MacroPdf417Meta.png` ve specifikovaném adresáři. Měl by vypadat podobně jako ilustrace níže: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Jak vygenerovat obrázek PDF417 čárového kódu v C#"} + +Obrázek obsahuje hustou mřížku černých a bílých čtverečků, s vloženým kódovaným payloadem a metadaty MacroPDF417. + +## Úplný funkční příklad + +Níže je kompletní program připravený ke zkopírování. Kompiluje se s libovolným .NET 6+ projektem a vyžaduje pouze NuGet balíček Aspose.BarCode. + + + +## Co byste se měli naučit dál? + +Následující tutoriály pokrývají úzce související témata, která staví na technikách předvedených v tomto průvodci. Každý zdroj obsahuje kompletní funkční kódové příklady s podrobnými vysvětleními, které vám pomohou zvládnout další funkce API a prozkoumat alternativní implementační přístupy ve vašich projektech. + +- [Jak vytvořit čárový kód – Kompaktní PDF417 s Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Jak generovat DataMatrix čárové kódy (ECC 200) s Aspose.BarCode pro .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Jak generovat Aztec čárový kód s vlastním poměrem stran pomocí Aspose.BarCode pro .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/czech/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/czech/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..72d2abc15 --- /dev/null +++ b/barcode/czech/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-07-30 +description: Čtěte více čárových kódů v C# pomocí Aspose.BarCode. Naučte se krok za + krokem, jak dekódovat PDF417, detekovat kompaktní režim a zpracovat mnoho čárových + kódů na jednom obrázku. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: cs +lastmod: 2026-07-30 +og_description: Čtěte více čárových kódů v C# pomocí Aspose.BarCode. Tento průvodce + vám ukáže, jak dekódovat všechny čárové kódy na obrázku, zkontrolovat kompaktní + režim a integrovat je do .NET aplikací. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Čtení více čárových kódů v C# – Kompletní tutoriál pro PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Čtení více čárových kódů v C# – kompletní průvodce s PDF417 +url: /cs/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Čtení více čárových kódů C# – Kompletní průvodce s PDF417 + +Už jste se někdy zamýšleli, jak **read multiple barcodes C#** z jedné obrázkové souboru? Možná máte hromadu přepravních štítků, koláž vstupenek nebo dokument PDF417, který v jednom obrázku obsahuje několik kódů. Ve své každodenní práci jsem narazil právě na tuto překážku — až jsem objevil `BarCodeReader` od Aspose.BarCode. Tento tutoriál vás provede dekódováním každého čárového kódu na obrázku, určením, zda je každý PDF417 v kompaktním (zkráceném) režimu, a čistým zpracováním výsledků. + +Přidáme také několik užitečných tipů — například co dělat, když obrázek obsahuje různé symbologie čárových kódů, nebo když sken nevrátí žádné výsledky. Na konci budete mít připravenou konzolovou aplikaci, která **reads multiple barcodes C#** jako profesionál. + +## Co budete potřebovat + +- **.NET 6.0** SDK nebo novější (kód funguje také s .NET Framework 4.6+, ale .NET 6 je ideální). +- **Aspose.BarCode for .NET** NuGet balíček (`Install-Package Aspose.BarCode`). +- Vzorek obrázku, který obsahuje **PDF417** čárové kódy — ideálně takový, který kombinuje kompaktní i plno‑velikostní symboly. V tutoriálu používáme `CompactPdf417.png`, ale funguje jakýkoli PNG/JPEG. +- Vaše oblíbené IDE (Visual Studio, Rider nebo VS Code). + +To je vše — žádné další DLL, žádné nativní závislosti. Aspose.BarCode je čistý spravovaný kód, takže jej můžete vložit do libovolného .NET projektu. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Alt text: Read multiple barcodes C# – snímek konzole zobrazující stav kompaktního režimu pro PDF417 čárové kódy.* + +## Krok 1 – Instalace a odkaz na knihovnu BarCodeReader C# Library + +Nejprve potřebujete třídu **BarCodeReader C#**, která provádí dekódování. Otevřete terminál (nebo Package Manager Console) a spusťte: + +```powershell +dotnet add package Aspose.BarCode +``` + +Nebo, pokud jste ve správci NuGet ve Visual Studiu, stačí vyhledat *Aspose.BarCode* a kliknout **Install**. Tím se stáhne nejnovější stabilní verze (k červenci 2026 je to 23.9), která podporuje PDF417, QR, DataMatrix a desítky dalších symbologií. + +Proč je to důležité: knihovna abstrahuje těžkou práci s zpracováním obrazu, korekcí chyb a rozpoznáváním symbolů. Můžete si napsat vlastní skener, ale strávíte týdny řešením okrajových případů. Aspose vám poskytuje osvědčenou **C# barcode library**, která je aktualizovaná pro moderní .NET runtime. + +## Krok 2 – Nastavení minimálního konzolového projektu + +Vytvořte nový konzolový projekt, abychom se mohli soustředit jen na logiku čárových kódů bez rušivých UI prvků: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Nahraďte vygenerovaný soubor `Program.cs` kompletním příkladem níže. Klidně ponechte výchozí jmenný prostor nebo jej přejmenujte — není potřeba nic speciálního. + +## Krok 3 – Napište kompletní implementaci “Read Multiple Barcodes C#” + +Níže je **kompletní, spustitelný** ukázkový kód. Pokrývá všechny čtyři kroky z původního úryvku, přidává ošetření chyb a tiskne užitečnou diagnostiku. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Proč tento kód funguje + +- **`BarCodeReader`** je hlavní komponenta z **BarCodeReader C#** API. Otevírá obrázek, provádí předzpracování a hledá symboly zadaného typu. +- **`ReadBarCodes()`** vrací pole, ne jen jediný výsledek. To je klíč k **reading multiple barcodes C#** — metoda automaticky shromažďuje všechny nalezené shody. +- **`result.Extended.Pdf417.IsTruncated`** nám říká, zda je PDF417 v *kompaktním* (také zkráceném) režimu. Tento příznak existuje jen pro PDF417, proto používáme operátor podmíněného přístupu (`?.`), abychom se vyhnuli výjimkám, pokud se objeví jiná symbologie. +- Smyčka `foreach` vypisuje jak dekódovaný text, tak stav kompaktnosti, což poskytuje rychlou kontrolu správnosti. + +## Krok 4 – Zpracování různých typů čárových kódů (volitelné) + +Pokud váš obrázek může obsahovat i jiné typy než PDF417, stačí změnit druhý argument `BarCodeReader` na `DecodeType.AllSupported`. Smyčka zůstane stejná, ale budete muset ošetřit možnost, že `result.Extended` bude u ne‑PDF417 symbolů `null`: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Tento malý úprava promění vaši **C# barcode library** na univerzální skener, ideální pro dávky s mixovanými symbologiemi. + +## Krok 5 – Okrajové případy a tipy pro nejlepší praxi + +### 1️⃣ Žádné čárové kódy nebyly detekovány +Pokud `ReadBarCodes()` vrátí prázdné pole, nejčastější příčiny jsou: + +- Špatná cesta k souboru nebo chybějící oprávnění ke čtení. +- Příliš nízká kvalita obrazu (rozmazání, nízký kontrast). Zvažte předzpracování pomocí `reader.ImagePreprocessingOptions` (např. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Extrémně velké obrázky +Zpracování 10 MP fotografie může být náročné na paměť. Můžete omezit oblast skenování: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Bezpečnost vláken +`BarCodeReader` implementuje `IDisposable` a **není** thread‑safe. Vytvořte samostatné instance pro každý vlákno, pokud potřebujete paralelní zpracování. + +### 4️⃣ Licencování +Aspose.BarCode funguje v režimu trial bez další konfigurace, ale na výstupním obrázku uvidíte vodoznak. Pro produkční nasazení nastavte licenci co nejdříve: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logování +Když tento kód integrujete do větší služby, nahraďte `Console.WriteLine` strukturovaným loggerem (Serilog, NLog). Tím získáte možnost zachytit `CodeText`, `CodeType` a `IsTruncated` jako samostatná pole pro následnou analytiku. + +## Kompletní funkční příklad – shrnutí + +Spojením všech částí získáte *celý* program, který můžete zkopírovat a vložit do `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Co byste se měli naučit dál? + +Následující tutoriály pokrývají úzce související témata, která staví na technikách předvedených v tomto průvodci. Každý zdroj obsahuje kompletní funkční ukázky kódu s krok‑za‑krokem vysvětlením, aby vám pomohl zvládnout další funkce API a prozkoumat alternativní přístupy ve vlastních projektech. + +- [Jak generovat PDF417 čárové kódy – Kompaktní PDF417 kódování](/barcode/english/net/compact-pdf417-encoding/) +- [Jak vytvořit čárový kód – Kompaktní PDF417 s Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Jak číst DataMatrix čárové kódy s Aspose.BarCode pro .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/czech/net/one-dimensional-barcode-types/_index.md b/barcode/czech/net/one-dimensional-barcode-types/_index.md index 7d07268a4..bab2e8750 100644 --- a/barcode/czech/net/one-dimensional-barcode-types/_index.md +++ b/barcode/czech/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ vydělávejte, jak generovat čárové kódy v .NET s Aspose.BarCode pro .NET. T Naučte se, jak zacházet s výjimkami při generování jednorozměrných čárových kódů pomocí Aspose.BarCode for .NET. Tento průvodce krok za krokem zajišťuje řešení čárových kódů odolné proti chybám. Začněte hned! ### [Konfigurace jednorozměrného širokoúhlého poměru](./one-dimensional-wide-narrow-ratio-configuration/) Snadno generujte přizpůsobené čárové kódy pomocí Aspose.BarCode pro .NET. Průvodce krok za krokem pro jednorozměrnou konfiguraci širokého a úzkého poměru. +### [Čtení čárového kódu z obrázku – příklad čtečky čárových kódů v C#](./read-barcode-from-image-c-barcode-reader-example/) +Naučte se načíst čárový kód z obrázku v C# pomocí Aspose.BarCode čtečky. ## Závěr @@ -89,4 +91,4 @@ tímto článkem získáte nejen znalosti o různých typech jednorozměrných {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/czech/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/czech/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..de5a90d4e --- /dev/null +++ b/barcode/czech/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Načtěte čárový kód z obrázku pomocí Aspose.BarCode pro .NET – kompletní + příklad čtečky čárových kódů v C#, který ukazuje, jak dekódovat makro PDF417 čárové + kódy. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: cs +lastmod: 2026-07-30 +og_description: Načtěte čárový kód z obrázku pomocí Aspose.BarCode pro .NET. Tento + krok‑za‑krokem příklad čtečky čárových kódů v C# ukazuje, jak extrahovat všechna + metadata Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Číst čárový kód z obrázku – Kompletní příklad čtečky čárových kódů v C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Načíst čárový kód z obrázku – příklad čtečky čárových kódů v C# +url: /cs/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Čtení čárového kódu z obrázku – příklad čtečky čárových kódů v C# + +Potřebujete **číst čárový kód z obrázku** v aplikaci C#? Jste na správném místě. V tomto tutoriálu projdeme kompletní *příklad čtečky čárových kódů v C#*, který používá knihovnu Aspose.BarCode pro .NET k dekódování Macro PDF417 čárového kódu a získání všech rozšířených informací, které standard poskytuje. + +Představte si, že jste právě naskenovali přepravní štítek, palubní vstupenku nebo vládní průkaz, který obsahuje segment Macro PDF417. Chcete získat ID souboru, počet segmentů, časová razítka a možná i jméno odesílatele – a to vše bez opuštění kódu. Přesně tohle dosáhneme a uděláme to tak, aby to šlo snadno zkopírovat a vložit do vašeho vlastního projektu. + +--- + +## Co se naučíte + +- Jak přidat NuGet balíček Aspose.BarCode do .NET projektu. +- Jak otevřít soubor obrázku, který obsahuje Macro PDF417 čárový kód. +- Jak iterovat přes výsledky **číst čárový kód z obrázku** a přistupovat ke každému rozšířenému poli. +- Tipy pro práci s více segmenty, ověřování kontrolních součtů a řešení běžných problémů. + +Na konci tohoto průvodce budete mít funkční konzolovou aplikaci, která vypíše veškerá metadata Macro PDF417, připravená k integraci do větších systémů, jako jsou sledovače zásob nebo pipeline pro správu dokumentů. + +## Požadavky + +Než se pustíme dál, ujistěte se, že máte následující: + +| Požadavek | Proč je důležitý | +|-------------|----------------| +| .NET 6.0 SDK nebo novější (funguje jakákoli recentní verze) | Poskytuje runtime pro konzolovou aplikaci. | +| Visual Studio 2022 (nebo VS Code s rozšířením C#) | Umožňuje snadné editování a ladění. | +| Aspose.BarCode for .NET (zdarma zkušební verze nebo licencovaná) | Knihovna, která skutečně dekóduje čárový kód. | +| Soubor obrázku (`MacroPdf417Meta.png`) obsahující Macro PDF417 čárový kód | Zdroj, ze kterého budeme číst. | + +Pokud ještě nemáte Aspose.BarCode, můžete jej získat z NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Tento jediný řádek nainstaluje vše, co potřebujete, včetně `BarCodeReader`, `DecodeType` a bohaté sady vlastností `Extended`, kterou prozkoumáme. + +## Krok 1 – Nastavení projektu a import knihovny + +Vytvořte nový konzolový projekt (nebo vložte kód do existujícího). Direktivy `using` jsou nezbytné; přinášejí třídy pro čárové kódy do rozsahu. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Tip:** Pokud používáte Visual Studio, IDE vám automaticky nabídne přidat chybějící `using` příkazy – stačí stisknout *Ctrl+.`*. + +## Krok 2 – Připravte cestu k obrázku + +Pevně zakódování absolutní cesty funguje pro rychlou ukázku, ale ve výrobě byste pravděpodobně přijali argument příkazové řádky nebo konfigurační nastavení. Pro přehlednost to ponecháme jednoduché: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Proč je to důležité:** `BarCodeReader` očekává platnou umístění souboru; nesprávná cesta vyvolá `FileNotFoundException` ještě před zahájením dekódování. + +## Krok 3 – **Číst čárový kód z obrázku** a extrahovat podrobnosti Macro PDF417 + +Nyní přichází jádro **příkladu čtečky čárových kódů v C#**. Vytvoříme instanci `BarCodeReader` s příznakem `DecodeType.MacroPdf417`, projdeme všechny výsledky (v jednom obrázku může být více než jeden čárový kód) a vypíšeme každou rozšířenou vlastnost. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Co kód dělá (proč, ne jen jak) + +1. **`using` block** – Zajišťuje, že nativní zdroje (souborové handle, paměť dekodéru) jsou uvolněny okamžitě po operaci. Vynechání může vést k zamčeným souborům ve Windows. +2. **`DecodeType.MacroPdf417`** – Říká Aspose, aby hledal konkrétně symboly Macro PDF417; ostatní typy čárových kódů jsou ignorovány, což zrychluje skenování. +3. **`ReadBarCodes()`** – Vrací kolekci, protože obrázek může obsahovat více segmentů Macro PDF417 (představte si více‑stránkový dokument rozdělený do několika čárových kódů). +4. **`macroResult.Extended?.Pdf417`** – Objekt `Extended` může být null; operátor bezpečné navigace (`?.`) zabraňuje `NullReferenceException`, pokud čárový kód neobsahuje rozšířená data. +5. **Printing each field** – Poskytuje přehled o identifikátoru souboru, pořadí segmentů, ověření kontrolního součtu a volitelných textových polích jako odesílatel nebo příjemce. + +## Krok 4 – Spusťte aplikaci a ověřte výstup + +Zkompilujte a spusťte program: + +```bash +dotnet run +``` + +Pokud je vše nastaveno správně, měli byste v konzoli vidět něco podobného následujícímu: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Poznámka:** Přesné hodnoty závisí na čárovém kódu, který dekódujete. Pokud získáte „No Macro PDF417 extension data found“, zkontrolujte, že obrázek skutečně obsahuje kód Macro PDF417 a že používáte správný `DecodeType`. + +## Zpracování více segmentů a validace (pokročilé) + +Macro PDF417 je navrženo pro velké objemy dat rozdělené do několika symbolů. Když narazíte na více než jeden segment, obvykle budete muset: + +1. **Shromáždit všechny segmenty** do slovníku s klíčem `SegmentID`. +2. **Seřadit** je podle `SegmentID`, aby se znovu sestavil původní soubor. +3. **Ověřit** `Checksum` vůči spojenému payloadu (Aspose to provádí interně, ale můžete spustit CRC znovu, pokud potřebujete extra bezpečnost). + +Zde je rychlý náčrt: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Budete muset implementovat `AssembleSegments` a `VerifyChecksum` podle formátu vašeho payloadu – často jde jen o spojení pole bajtů následované kontrolou CRC‑16. + +## Běžné úskalí a jak se jim vyhnout + +| Projev | Pravděpodobná příčina | Řešení | +|---------|----------------------|--------| +| `null` vráceno z `macroResult.Extended` | Obrázek obsahuje běžný PDF417, nikoli verzi Macro. | Použijte `DecodeType.Pdf417` místo toho, nebo ověřte zdrojový čárový kód. | +| Žádný výstup | `imagePath` je špatná nebo soubor není přístupný. | Zkontrolujte cestu k souboru; ujistěte se, že aplikace má oprávnění ke čtení. | +| Výjimka “Object disposed” | Pokus o použití `reader` po ukončení bloku `using`. | Keep all processing inside the ` + +## Co byste se měli naučit dál? + +Následující tutoriály pokrývají úzce související témata, která staví na technikách předvedených v tomto průvodci. Každý zdroj obsahuje kompletní funkční ukázky kódu s podrobnými vysvětleními, které vám pomohou zvládnout další funkce API a prozkoumat alternativní přístupy k implementaci ve vašich projektech. + +- [Programování čtečky DataMatrix s Aspose.BarCode pro .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Inicializace čtečky DotCode s Aspose.BarCode pro .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Jak číst DataMatrix čárové kódy s Aspose.BarCode pro .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/dutch/net/compact-pdf417-encoding/_index.md b/barcode/dutch/net/compact-pdf417-encoding/_index.md index 64f0fba6f..276971ccd 100644 --- a/barcode/dutch/net/compact-pdf417-encoding/_index.md +++ b/barcode/dutch/net/compact-pdf417-encoding/_index.md @@ -84,6 +84,14 @@ Voorbij de basis, hier zijn enkele praktische tips om je workflow te stroomlijne Leer hoe je Compact PDF417 barcodes genereert met Aspose.BarCode voor .NET. Uitgebreide gids met stap‑voor‑stap instructies en code‑voorbeelden. +### [Hoe PDF417 Barcode-afbeelding te genereren in C# met Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) + +Leer hoe je een PDF417 barcode‑afbeelding maakt in C# met behulp van Aspose.BarCode. + +### [Meerdere barcodes lezen in C# – Complete gids met PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) + +Leer hoe je met Aspose.BarCode meerdere PDF417‑barcodes in één scan kunt lezen met C#. + ## Veelgestelde Vragen **V: Wat is de maximale hoeveelheid data die ik kan opslaan in een Compact PDF417 barcode?** @@ -112,4 +120,4 @@ A: Geen externe lettertypen zijn nodig; de bibliotheek verwerkt alle rendering i {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/dutch/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/dutch/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..67aef28d9 --- /dev/null +++ b/barcode/dutch/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Hoe PDF417‑barcodeafbeelding te genereren in C# met Aspose. Leer stap‑voor‑stap + hoe je een barcode maakt met Aspose, MacroPDF417‑metadata instelt en opslaat als + PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: nl +lastmod: 2026-07-30 +og_description: Hoe PDF417‑barcodeafbeelding te genereren in C# met Aspose. Volg deze + volledige gids om een barcode te maken met Aspose, MacroPDF417‑metadata te configureren + en een PNG‑bestand te genereren. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Hoe PDF417-barcodeafbeelding te genereren in C# met Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Hoe PDF417-barcodeafbeelding te genereren in C# met Aspose +url: /nl/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hoe PDF417-barcodeafbeelding te genereren in C# met Aspose + +Het genereren van een PDF417-barcodeafbeelding in C# met Aspose is een veelvoorkomende hindernis voor iedereen die werkt met high‑density data‑codering. In deze gids lopen we elke stap door—het instellen van de generator, het aanpassen van MacroPDF417‑metadata, en uiteindelijk het opslaan van een scherp PNG‑bestand. + +Als je ooit hebt geprobeerd om **generate barcode image c#** te doen en eindigde met een leeg canvas of een onleesbare scan, ben je niet de enige. Het goede nieuws is dat Aspose.BarCode het hele proces bijna pijnloos maakt, en tegen het einde van dit artikel kun je **create barcode with Aspose** voor elke bedrijfsworkflow. + +## Wat je zult leren + +- Installeer en verwijs naar de Aspose.BarCode bibliotheek voor .NET. +- Initialiseer een PDF417-generator met een aangepaste payload. +- Pas MacroPDF417‑specifieke velden toe, zoals bestand‑ID, segment‑ID en tijdstempel. +- Exporteer het resultaat naar een PNG‑afbeelding die je kunt insluiten in rapporten of mobiele apps. +- Tips voor het oplossen van veelvoorkomende valkuilen (bijv. verkeerde module‑breedte, ontbrekende segmenten). + +Er is geen voorafgaande ervaring met MacroPDF417 vereist; een basisbegrip van C# en Visual Studio is voldoende. + +## Vereisten + +| Vereiste | Reden | +|----------|-------| +| .NET 6.0 or later | Huidige LTS‑versie, volledig ondersteund door Aspose | +| Visual Studio 2022 (or any IDE) | Om het voorbeeld te compileren en uit te voeren | +| Aspose.BarCode for .NET (NuGet) | Biedt `BarcodeGenerator` en PDF417‑ondersteuning | + +Je kunt de bibliotheek toevoegen via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Nu de basis is gelegd, laten we in de code duiken. + +## Hoe PDF417-barcodeafbeelding te genereren in C# – Instelling + +Het eerste wat we doen is een `BarcodeGenerator`‑instantie maken voor het **MacroPdf417**‑encodetype. Dit object bevat alle configuratie‑opties, van module‑grootte tot de rijke metadata die MacroPDF417 verwacht. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Waarom dit belangrijk is:** `EncodeTypes.MacroPdf417` vertelt Aspose om een PDF417‑barcode te produceren die kan worden opgesplitst in meerdere segmenten—een must‑have voor grote bestanden of batchverwerking. + +## Basisuiterlijk configureren + +Een leesbare barcode begint met de juiste visuele instellingen. De `XDimension` bepaalt de breedte van elke module (de kleine zwarte/witte vierkantjes), terwijl `Columns` bepaalt hoeveel kolommen de barcode beslaat. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tip:** Als de barcode te dicht lijkt op een kassaprinter, verhoog `XDimension` naar `3` of `4`. +- **Valkuil:** Het instellen van `Columns` te laag kan ervoor zorgen dat de barcode buiten de afbeeldingsgrenzen valt, wat resulteert in een onleesbare scan. + +## MacroPDF417‑specifieke metadata instellen + +MacroPDF417 stelt je in staat om bestands‑niveau informatie direct in de barcode te embedden. Dit is perfect voor het volgen van grote documentzendingen of het splitsen van een bestand over meerdere scans. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Wat elk veld doet:** + +| Eigenschap | Beschrijving | +|------------|--------------| +| `MacroPdf417FileID` | Unieke identifier voor het hele bestand. | +| `MacroPdf417SegmentID` | Index van het huidige segment (begint bij 0). | +| `MacroPdf417SegmentsCount` | Totaal aantal segmenten waarin het bestand is opgesplitst. | +| `MacroPdf417FileName` | Menselijk leesbare naam, nuttig voor auditlogs. | +| `MacroPdf417Checksum` | 16‑bit CRC voor verificatie van gegevensintegriteit. | +| `MacroPdf417FileSize` | Originele bestandsgrootte in bytes, helpt ontvangers buffers toe te wijzen. | +| `MacroPdf417TimeStamp` | Datum/tijd waarop het bestand is gegenereerd. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Optionele strings om afzender/ontvanger te identificeren. | +| `MacroPdf417Terminator` | Markeert het laatste segment; vereist voor correcte decodering. | + +> **Waarom zou je het doen?** Zonder deze velden kan een scanner alleen de ruwe data lezen, niet de context. Het toevoegen van metadata betekent dat het ontvangende systeem het originele bestand automatisch kan reconstrueren. + +## Barcode opslaan als PNG + +Zodra de generator volledig geconfigureerd is, is het opslaan van de afbeelding één regel code: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Bestandsformaat:** PNG is lossless, waardoor elke module scherp blijft voor scanners. +- **Alternatief:** Gebruik `BarCodeImageFormat.Jpeg` als je een kleinere bestandsgrootte nodig hebt, maar verwacht een lichte vermindering in leesbaarheid. + +### Verwachte uitvoer + +Na het uitvoeren van de code vind je `MacroPdf417Meta.png` in de opgegeven map. Het zou er vergelijkbaar uit moeten zien als de illustratie hieronder: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Hoe PDF417-barcodeafbeelding te genereren in C#"} + +De afbeelding bevat een dicht raster van zwarte en witte vierkantjes, met de gecodeerde payload en de MacroPDF417‑metadata ingebed. + +## Volledig werkend voorbeeld + +Hieronder staat het volledige, kant‑klaar te kopiëren programma. Het compileert met elk .NET 6+ project en vereist alleen het Aspose.BarCode NuGet‑pakket. + + + +## Wat je hierna zou moeten leren + +De volgende tutorials behandelen nauw verwante onderwerpen die voortbouwen op de technieken die in deze gids worden getoond. Elke bron bevat volledige werkende code‑voorbeelden met stap‑voor‑stap uitleg om je te helpen extra API‑functies onder de knie te krijgen en alternatieve implementatie‑benaderingen in je eigen projecten te verkennen. + +- [Hoe een barcode te maken – Compact PDF417 met Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Hoe DataMatrix‑barcodes (ECC 200) te genereren met Aspose.BarCode voor .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Hoe een Aztec‑barcode te genereren met aangepaste beeldverhouding met behulp van Aspose.BarCode voor .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/dutch/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/dutch/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..982dd608f --- /dev/null +++ b/barcode/dutch/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Lees meerdere barcodes in C# met Aspose.BarCode. Leer stap voor stap + hoe je PDF417 decodeert, compacte modus detecteert en veel barcodes in één afbeelding + verwerkt. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: nl +lastmod: 2026-07-30 +og_description: Lees meerdere barcodes C# met Aspose.BarCode. Deze gids laat zien + hoe je alle barcodes in een afbeelding decodeert, de compacte modus controleert + en integreert in .NET‑applicaties. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Meerdere barcodes lezen C# – Volledige tutorial voor PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Meerdere barcodes lezen C# – Complete gids met PDF417 +url: /nl/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Read Multiple Barcodes C# – Complete Guide with PDF417 + +Heb je je ooit afgevraagd hoe je **multiple barcodes C#** kunt lezen uit één afbeelding? Misschien heb je een stapel verzendetiketten, een collage van tickets, of een PDF417‑document dat meerdere codes in één afbeelding verpakt. In mijn dagelijkse werk kwam ik precies tegen dit probleem—tot ik Aspose.BarCode’s `BarCodeReader` ontdekte. Deze tutorial leidt je stap voor stap door het decoderen van elke barcode in een afbeelding, het bepalen of elke PDF417 in compacte (afgekorte) modus staat, en het netjes afhandelen van de resultaten. + +We zullen ook een paar extra tips toevoegen—zoals wat te doen wanneer de afbeelding verschillende barcode‑symbolen bevat, of wanneer een scan helemaal geen resultaten oplevert. Aan het einde heb je een kant‑klaar console‑applicatie die **multiple barcodes C#** leest als een professional. + +## What You’ll Need + +Voordat we beginnen, zorg dat je het volgende op je machine hebt staan: + +- **.NET 6.0** SDK of nieuwer (de code werkt ook met .NET Framework 4.6+, maar .NET 6 is de optimale keuze). +- **Aspose.BarCode for .NET** NuGet‑package (`Install-Package Aspose.BarCode`). +- Een voorbeeldafbeelding die **PDF417**‑barcodes bevat—bij voorkeur een die compacte en volledige symbolen combineert. In de tutorial wordt `CompactPdf417.png` gebruikt, maar elke PNG/JPEG volstaat. +- Je favoriete IDE (Visual Studio, Rider of VS Code). + +Dat is alles—geen extra DLL’s, geen native afhankelijkheden. Aspose.BarCode is pure managed code, dus je kunt het in elk .NET‑project plaatsen. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Afbeeldings‑alt‑tekst: Read multiple barcodes C# – screenshot van console die de compacte‑modustatus voor PDF417‑barcodes weergeeft.* + +## Step 1 – Install and Reference the BarCodeReader C# Library + +Allereerst heb je de **BarCodeReader C#**‑klasse nodig die de decodering mogelijk maakt. Open je terminal (of Package Manager Console) en voer uit: + +```powershell +dotnet add package Aspose.BarCode +``` + +Of, als je in de NuGet‑manager van Visual Studio zit, zoek naar *Aspose.BarCode* en klik op **Install**. Hiermee wordt de nieuwste stabiele versie opgehaald (vanaf juli 2026 is dat 23.9), die PDF417, QR, DataMatrix en tientallen andere symbolen ondersteunt. + +Waarom dit belangrijk is: de bibliotheek neemt het zware werk van beeldverwerking, foutcorrectie en symboolherkenning uit handen. Je zou zelf een scanner kunnen schrijven, maar je zou weken besteden aan randgevallen. Aspose levert een beproefde, **C# barcode library** die is geüpdatet voor moderne .NET‑runtimes. + +## Step 2 – Set Up a Minimal Console Project + +Maak een nieuw console‑project aan zodat we ons kunnen concentreren op de barcode‑logica zonder UI‑afleiding: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Vervang het gegenereerde `Program.cs` door het volledige voorbeeld hieronder. Je kunt de standaard namespace behouden of hernoemen—er is niets speciaals nodig. + +## Step 3 – Write the Full “Read Multiple Barcodes C#” Implementation + +Hieronder vind je een **complete, uitvoerbare** code‑voorbeeld. Het omvat alle vier stappen uit het oorspronkelijke fragment, voegt foutafhandeling toe en print nuttige diagnostiek. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Why This Code Works + +- **`BarCodeReader`** is de werkpaard uit de **BarCodeReader C#**‑API. Het opent de afbeelding, past pre‑processing toe en zoekt naar symbolen van het type dat je opgeeft. +- **`ReadBarCodes()`** retourneert een array, niet slechts één resultaat. Dat is de sleutel tot **reading multiple barcodes C#**—de methode verzamelt automatisch elke gevonden match. +- **`result.Extended.Pdf417.IsTruncated`** vertelt ons of de PDF417 in *compact* (ook wel afgekort) modus staat. Deze vlag bestaat alleen voor PDF417, dus we gebruiken de null‑conditional operator (`?.`) om uitzonderingen te voorkomen als er een ander symbool verschijnt. +- De `foreach`‑lus print zowel de gedecodeerde tekst als de compacte status, zodat je snel een sanity‑check hebt. + +## Step 4 – Handling Different Barcode Types (Optional) + +Als je afbeelding meer dan alleen PDF417 kan bevatten, wijzig dan simpelweg het tweede argument van `BarCodeReader` naar `DecodeType.AllSupported`. De lus blijft gelijk, maar je moet wel controleren of `result.Extended` null is voor niet‑PDF417‑symbolen: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Deze kleine aanpassing verandert je **C# barcode library** in een universele scanner, perfect voor batches met gemengde symbolen. + +## Step 5 – Edge Cases and Best‑Practice Tips + +### 1️⃣ No Barcodes Detected +Als `ReadBarCodes()` een lege array retourneert, zijn de meest voorkomende oorzaken: + +- Verkeerd bestandspad of ontbrekende leesrechten. +- Beeldkwaliteit te laag (blur, laag contrast). Overweeg pre‑processing met `reader.ImagePreprocessingOptions` (bijv. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Extremely Large Images +Het verwerken van een foto van 10 MP kan veel geheugen verbruiken. Je kunt het scan‑gebied beperken: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Thread‑Safety +`BarCodeReader` implementeert `IDisposable` en is **niet** thread‑safe. Maak aparte instanties per thread aan als je parallel wilt verwerken. + +### 4️⃣ Licensing +Aspose.BarCode werkt out‑of‑the‑box in trial‑modus, maar je ziet een watermerk op de uitvoerafbeelding. Voor productie stel je de licentie vroeg in: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +Wanneer je dit in een grotere service integreert, vervang `Console.WriteLine` door een gestructureerde logger (Serilog, NLog). Zo kun je `CodeText`, `CodeType` en `IsTruncated` als velden vastleggen voor downstream‑analytics. + +## Full Working Example Recap + +Alles bij elkaar, hier is het *volledige* programma dat je kunt kopiëren‑en‑plakken in `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## What Should You Learn Next? + +De volgende tutorials behandelen nauw verwante onderwerpen die voortbouwen op de technieken die in deze gids worden getoond. Elke bron bevat complete werkende code‑voorbeelden met stap‑voor‑stap uitleg om je te helpen extra API‑functies onder de knie te krijgen en alternatieve implementatie‑benaderingen in je eigen projecten te verkennen. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/dutch/net/one-dimensional-barcode-types/_index.md b/barcode/dutch/net/one-dimensional-barcode-types/_index.md index cd103f02d..adf646047 100644 --- a/barcode/dutch/net/one-dimensional-barcode-types/_index.md +++ b/barcode/dutch/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ leer hoe u streepjescodes kunt genereren in .NET met Aspose.BarCode voor .NET. D Leer hoe u met uitzonderingen omgaat terwijl u eendimensionale streepjescodes genereert met Aspose.BarCode voor .NET. Deze stapsgewijze handleiding zorgt voor fouttolerante barcodeoplossingen. Begin nu! ### [Eendimensionale configuratie met brede en smalle verhoudingen](./one-dimensional-wide-narrow-ratio-configuration/) Genereer eenvoudig aangepaste barcodes met Aspose.BarCode voor .NET. Stapsgewijze handleiding voor eendimensionale configuratie van breed-nauw verhoudingen. +### [Barcode lezen van afbeelding – C# barcodelezer voorbeeld](./read-barcode-from-image-c-barcode-reader-example/) +Leer hoe u barcodes uit een afbeelding kunt lezen met Aspose.BarCode in C#. Volg de stapsgewijze handleiding. ## Conclusie @@ -89,4 +91,4 @@ Met dit artikel verkrijgt u niet alleen kennis over verschillende eendimensional {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/dutch/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/dutch/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..7ccaf7792 --- /dev/null +++ b/barcode/dutch/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,278 @@ +--- +category: general +date: 2026-07-30 +description: Lees een barcode uit een afbeelding met Aspose.BarCode voor .NET – een + volledig C#‑barcodelezer‑voorbeeld dat laat zien hoe Macro PDF417‑barcodes te decoderen. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: nl +lastmod: 2026-07-30 +og_description: Lees een barcode van een afbeelding met Aspose.BarCode voor .NET. + Deze stap‑voor‑stap C# barcode‑lezer‑voorbeeld laat zien hoe je alle Macro PDF417‑metadata + kunt extraheren. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Barcode lezen van afbeelding – Volledig C# barcodelezer voorbeeld +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Barcode lezen van afbeelding – C# barcodelezer voorbeeld +url: /nl/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Barcode lezen van afbeelding – C# barcode lezer voorbeeld + +Moet je **barcode lezen van afbeelding** in een C#‑applicatie? Dan ben je hier aan het juiste adres. In deze tutorial lopen we een compleet *c# barcode reader example* door dat de Aspose.BarCode for .NET‑bibliotheek gebruikt om een Macro PDF417‑barcode te decoderen en alle uitgebreide informatie die de standaard biedt, eruit te halen. + +Stel je voor dat je net een verzendetiket, een boardingpass of een overheids‑ID hebt gescand die een Macro PDF417‑segment bevat. Je wilt de bestands‑ID, het aantal segmenten, tijdstempels en misschien zelfs de naam van de afzender ophalen – allemaal zonder je code te verlaten. Dat is precies wat we gaan bereiken, en we doen het op een manier die je eenvoudig kunt kopiëren‑plakken in je eigen project. + +--- + +## Wat je zult leren + +- Hoe je het Aspose.BarCode NuGet‑pakket toevoegt aan een .NET‑project. +- Hoe je een afbeeldingsbestand opent dat een Macro PDF417‑barcode bevat. +- Hoe je over **read barcode from image**‑resultaten itereren en elk uitgebreid veld benadert. +- Tips voor het omgaan met meerdere segmenten, het valideren van controlesommen en het oplossen van veelvoorkomende valkuilen. + +Aan het einde van deze gids heb je een werkende console‑app die alle Macro PDF417‑metadata afdrukt, klaar om te integreren in grotere systemen zoals voorraadvolgsystemen of document‑beheerpijplijnen. + +--- + +## Voorvereisten + +Voordat we beginnen, zorg dat je het volgende hebt: + +| Vereiste | Waarom het belangrijk is | +|----------|--------------------------| +| .NET 6.0 SDK of later (elke recente versie werkt) | Biedt de runtime voor de console‑app. | +| Visual Studio 2022 (of VS Code met C#‑extensie) | Maakt bewerken en debuggen moeiteloos. | +| Aspose.BarCode for .NET (gratis proefversie of gelicentieerd) | De bibliotheek die de barcode daadwerkelijk decodeert. | +| Een afbeeldingsbestand (`MacroPdf417Meta.png`) dat een Macro PDF417‑barcode bevat | De bron die we gaan lezen. | + +Als je Aspose.BarCode nog niet hebt, kun je het van NuGet halen: + +```bash +dotnet add package Aspose.BarCode +``` + +Die ene regel installeert alles wat je nodig hebt, inclusief de `BarCodeReader`, `DecodeType` en de uitgebreide `Extended`‑eigenschappenset die we gaan verkennen. + +--- + +## Stap 1 – Het project opzetten en de bibliotheek importeren + +Maak een nieuw console‑project (of voeg de code toe aan een bestaand project). De `using`‑directieven zijn essentieel; ze brengen de barcode‑klassen in scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Als je Visual Studio gebruikt, biedt de IDE automatisch aan om de ontbrekende `using`‑statements toe te voegen – druk gewoon op *Ctrl+.`*. + +--- + +## Stap 2 – Het afbeeldingspad voorbereiden + +Hard‑coded een absoluut pad gebruiken werkt voor een snelle demo, maar in productie accepteer je waarschijnlijk een command‑line‑argument of een configuratie‑instelling. Voor de duidelijkheid houden we het simpel: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Waarom dit belangrijk is:** De `BarCodeReader` verwacht een geldig bestandspad; een onjuist pad veroorzaakt een `FileNotFoundException` voordat er überhaupt wordt gedecodeerd. + +--- + +## Stap 3 – **Read barcode from image** en Macro PDF417‑details extraheren + +Nu volgt het hart van het **c# barcode reader example**. We maken een `BarCodeReader` aan met de `DecodeType.MacroPdf417`‑vlag, lopen door alle resultaten (er kan meer dan één barcode in één afbeelding staan) en printen elke uitgebreide eigenschap. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Wat de code doet (waarom, niet alleen hoe) + +1. **`using`‑block** – Zorgt ervoor dat de native resources (bestandshandvatten, native decoder‑geheugen) direct na de bewerking worden vrijgegeven. Het weglaten hiervan kan leiden tot vergrendelde bestanden op Windows. +2. **`DecodeType.MacroPdf417`** – Vertelt Aspose specifiek naar Macro PDF417‑symbolen te zoeken; andere barcode‑types worden genegeerd, wat het scannen versnelt. +3. **`ReadBarCodes()`** – Retourneert een collectie omdat een afbeelding meerdere Macro PDF417‑segmenten kan bevatten (denk aan een meer‑pagina‑document verdeeld over verschillende barcodes). +4. **`macroResult.Extended?.Pdf417`** – Het `Extended`‑object is nullable; de safe‑navigation operator (`?.`) voorkomt een `NullReferenceException` als de barcode geen uitgebreide data heeft. +5. **Elke veld afdrukken** – Geeft je inzicht in de bestands‑identifier, segmentvolgorde, controle‑som verificatie en optionele tekstvelden zoals afzender of geadresseerde. + +--- + +## Stap 4 – De applicatie uitvoeren en de output verifiëren + +Compileer en voer het programma uit: + +```bash +dotnet run +``` + +Als alles correct is ingesteld, zie je iets vergelijkbaars met het volgende in je console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Opmerking:** De exacte waarden hangen af van de barcode die je decodeert. Als je “No Macro PDF417 extension data found” krijgt, controleer dan of de afbeelding daadwerkelijk een Macro PDF417‑code bevat en of je de juiste `DecodeType` gebruikt. + +--- + +## Meerdere segmenten en validatie verwerken (gevorderd) + +Macro PDF417 is ontworpen voor grote data‑payloads verdeeld over meerdere symbolen. Wanneer je meer dan één segment tegenkomt, moet je meestal: + +1. **Alle segmenten** verzamelen in een dictionary met `SegmentID` als sleutel. +2. **Sorteren** op `SegmentID` om het originele bestand opnieuw samen te stellen. +3. **Valideren** van de `Checksum` tegen de aaneengeschakelde payload (Aspose doet dit intern, maar je kunt een CRC opnieuw uitvoeren als je extra zekerheid wilt). + +Hier is een snelle schets: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Je moet `AssembleSegments` en `VerifyChecksum` implementeren op basis van je payload‑formaat – vaak is dat simpelweg een byte‑array‑concatenatie gevolgd door een CRC‑16‑check. + +--- + +## Veelvoorkomende valkuilen en hoe ze te vermijden + +| Symptoom | Waarschijnlijke oorzaak | Oplossing | +|----------|--------------------------|-----------| +| `null` geretourneerd van `macroResult.Extended` | Afbeelding bevat een gewone PDF417, geen Macro‑versie. | Gebruik `DecodeType.Pdf417` in plaats daarvan, of controleer de bron‑barcode. | +| Geen output whatsoever | `imagePath` onjuist of bestand niet toegankelijk. | Controleer het bestandspad; zorg dat de app leesrechten heeft. | +| Exception “Object disposed” | Probeerde `reader` te gebruiken na het `using`‑block. | Houd alle verwerking binnen de ` + +## Wat moet je hierna leren? + +De volgende tutorials behandelen nauw verwante onderwerpen die voortbouwen op de technieken die in deze gids worden gedemonstreerd. Elke bron bevat volledige werkende code‑voorbeelden met stap‑voor‑stap‑uitleg om je te helpen extra API‑functies onder de knie te krijgen en alternatieve implementatie‑benaderingen in je eigen projecten te verkennen. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/net/compact-pdf417-encoding/_index.md b/barcode/english/net/compact-pdf417-encoding/_index.md index 1762ea2a8..98fbf24f5 100644 --- a/barcode/english/net/compact-pdf417-encoding/_index.md +++ b/barcode/english/net/compact-pdf417-encoding/_index.md @@ -83,6 +83,10 @@ Beyond the basics, here are some practical tips to streamline your workflow: ## Compact PDF417 Encoding Tutorials ### [Creating Compact PDF417 Barcodes](./compact-pdf417-basic-configuration/) Learn how to generate Compact PDF417 barcodes using Aspose.BarCode for .NET. Comprehensive guide with step-by-step instructions and code examples. +### [How to Generate PDF417 Barcode Image in C# with Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Step-by-step guide to create PDF417 barcode images in C# using Aspose.BarCode for .NET. +### [Read Multiple Barcodes C# – Complete Guide with PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Learn how to read multiple PDF417 barcodes in C# using Aspose.BarCode, with full code examples and best practices. ## Frequently Asked Questions @@ -112,4 +116,4 @@ A: No external fonts are required; the library handles all rendering internally. {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..f62d26eeb --- /dev/null +++ b/barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,187 @@ +--- +category: general +date: 2026-07-30 +description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: en +lastmod: 2026-07-30 +og_description: How to generate PDF417 barcode image in C# with Aspose. Follow this + complete guide to create a barcode with Aspose, configure MacroPDF417 metadata, + and output a PNG file. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: How to Generate PDF417 Barcode Image in C# with Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: How to Generate PDF417 Barcode Image in C# with Aspose +url: /net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# How to Generate PDF417 Barcode Image in C# with Aspose + +How to generate PDF417 barcode image in C# with Aspose is a frequent hurdle for anyone dealing with high‑density data encoding. In this guide we’ll walk through every step—setting up the generator, tweaking MacroPDF417 metadata, and finally saving a crisp PNG file. + +If you’ve ever tried to **generate barcode image c#** and ended up with a blank canvas or an unreadable scan, you’re not alone. The good news is that Aspose.BarCode makes the whole process almost painless, and by the end of this article you’ll be able to **create barcode with Aspose** for any enterprise workflow. + +## What You’ll Learn + +- Install and reference the Aspose.BarCode library for .NET. +- Initialize a PDF417 generator with a custom payload. +- Apply MacroPDF417‑specific fields such as file ID, segment ID, and timestamp. +- Export the result to a PNG image you can embed in reports or mobile apps. +- Tips for troubleshooting common pitfalls (e.g., wrong module width, missing segments). + +No prior experience with MacroPDF417 is required; a basic understanding of C# and Visual Studio will suffice. + +## Prerequisites + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 or later | Current LTS version, fully supported by Aspose | +| Visual Studio 2022 (or any IDE) | To compile and run the sample | +| Aspose.BarCode for .NET (NuGet) | Provides `BarcodeGenerator` and PDF417 support | + +You can add the library via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Now that the groundwork is laid, let’s dive into the code. + +## How to Generate PDF417 Barcode Image in C# – Setup + +The first thing we do is create a `BarcodeGenerator` instance for the **MacroPdf417** encode type. This object holds all configuration options, from module size to the rich metadata that MacroPDF417 expects. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Why this matters:** `EncodeTypes.MacroPdf417` tells Aspose to produce a PDF417 barcode that can be split into multiple segments—a must‑have for large files or batch processing. + +## Configure Basic Appearance + +A readable barcode starts with the right visual settings. The `XDimension` controls the width of each module (the tiny black/white squares), while `Columns` determines how many columns the barcode spans. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tip:** If the barcode looks too dense on a receipt printer, bump `XDimension` up to `3` or `4`. +- **Pitfall:** Setting `Columns` too low can cause the barcode to overflow the image bounds, resulting in an unreadable scan. + +## Set MacroPDF417 Specific Metadata + +MacroPDF417 lets you embed file‑level information directly into the barcode. This is perfect for tracking large document shipments or splitting a file across several scans. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**What each field does:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | Unique identifier for the whole file. | +| `MacroPdf417SegmentID` | Index of the current segment (starts at 0). | +| `MacroPdf417SegmentsCount` | Total number of segments the file is split into. | +| `MacroPdf417FileName` | Human‑readable name, useful for audit logs. | +| `MacroPdf417Checksum` | 16‑bit CRC for data integrity verification. | +| `MacroPdf417FileSize` | Original file size in bytes, helps receivers allocate buffers. | +| `MacroPdf417TimeStamp` | Date/time when the file was generated. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Optional strings to identify sender/receiver. | +| `MacroPdf417Terminator` | Marks the last segment; required for proper decoding. | + +> **Why bother?** Without these fields, a scanner can only read the raw data, not the context. Adding metadata means the receiving system can reassemble the original file automatically. + +## Save the Barcode as PNG + +Once the generator is fully configured, persisting the image is a one‑liner: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **File format:** PNG is lossless, ensuring every module stays sharp for scanners. +- **Alternative:** Use `BarCodeImageFormat.Jpeg` if you need a smaller file size, but expect a slight loss in readability. + +### Expected Output + +After running the snippet, you’ll find `MacroPdf417Meta.png` in the specified folder. It should look similar to the illustration below: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="How to generate PDF417 barcode image in C#"} + +The image contains a dense grid of black and white squares, with the encoded payload and the MacroPDF417 metadata embedded. + +## Full Working Example + +Below is the complete, copy‑paste‑ready program. It compiles with any .NET 6+ project and requires only the Aspose.BarCode NuGet package. + +```csharp +using Aspose.BarCode.Generation; +using System; + +namespace Pdf417Demo +{ + class Program + { + static void Main() + { + // Define where the PNG + + +## What Should You Learn Next? + + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/og-image.png b/barcode/english/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..4ffe12223b5ea8579340592a90b2ce48bc9dc00d GIT binary patch literal 53712 zcmbrl1yoku`z;C<2+}3pT`DQv9SQ={A|29QFA^dk-Q688-JyVVcXxMpoP~bh|K4-{ z_jm3YI1&OL0t^fclB9%)0u0QPVi=f5_VACuZ+?>P zAi}^5MoWqaesG-HnYDAo6eor|Xz13QnVlu{gM;7Ole41F%$!r0s~kxYI$YY@Lw+sv z$O?sm)Eu=cV5R{=AS=9Q-p_n?%fsU~G(9^xJ2^Rfx!c$GE^loDZ6;=}hzdLgTq)~m zWZ+Q`7b@z*qrvq^=1X_ia8c;0UqJfv>3S86-2)B@f8+%6e)bB&M|1X;O&%QskNIly`oxR3+8F zGbI^fOQ#s{r)AJK%C~laHO7gG<4x-`U@jA_{JdB=g(oEh5Z;Bcr9l9u%wKj zaE+uQtndwiocfLDB3=z&3?F{&tSj){2o)8BOrV+RG5GnU%>#9igoH}O$eR!j{Jaqe zOPVGK^Q+%eiwKjH>R~Nz82|sT&Hr_HJ?8wsF>EZ2-1(*Dn2a$T>amS=8wkRrei$9m zb~>ovh4^09#lAGEy0thsju^kxeyXt)5IjPq0QL`r?rZ$O=%%d8dn_v`Eo5};HQZC>qbL2mlB?10 zzACt7ZNRrDjHUb&+iSJqBo3{Kww~^dY6aLgvLUmnGZw_i$p=ck-={?1CBiAY@yxC^oj=5ts6VB_{YzP~4;i{G5ZL6U- z_m@>^xG#O_{Q7#VRMF zPA2$Lu3s1`YPGRMthcjfN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*U(jKN;?bGIp;65pF_O5ZJST2 z3&gX48!b&avYl9JkQy>57VpuHtR?*%s~_rFXu zvDW7^+nj{A2RK{n%5a}Vg}{j0p319pCy9Z&@R2fvU=jagV!a#)%KjZsKjM6z^ateS z2ik0hbHivQoU1d5Iz~njVb$z^fSw-Sk8MvcKk*MBn?36IJr1V-MHKcwVE%s(1p8Ee aPNiNu_xss8CGX{zkrI~|%NKqB<^KTdXqTn{ literal 0 HcmV?d00001 diff --git a/barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..32ceb7c16 --- /dev/null +++ b/barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step how + to decode PDF417, detect compact mode, and handle many barcodes in one image. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: en +lastmod: 2026-07-30 +og_description: Read multiple barcodes C# with Aspose.BarCode. This guide shows you + how to decode all barcodes in an image, check compact mode, and integrate into .NET + apps. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Read Multiple Barcodes C# – Full Tutorial for PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Read Multiple Barcodes C# – Complete Guide with PDF417 +url: /net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Read Multiple Barcodes C# – Complete Guide with PDF417 + +Ever wondered how to **read multiple barcodes C#** from a single image? Maybe you have a batch of shipping labels, a ticket collage, or a PDF417 document that packs several codes into one picture. In my day‑to‑day work, I’ve hit exactly that wall—until I discovered Aspose.BarCode’s `BarCodeReader`. This tutorial will walk you through decoding every barcode in an image, figuring out whether each PDF417 is in compact (truncated) mode, and handling the results cleanly. + +We'll also sprinkle in a few extra tips—like what to do when the image contains different barcode symbologies, or when a scan returns no results at all. By the end you’ll have a ready‑to‑run console app that **reads multiple barcodes C#** like a pro. + +## What You’ll Need + +Before we dive, make sure you have the following on your machine: + +- **.NET 6.0** SDK or newer (the code works with .NET Framework 4.6+ as well, but .NET 6 is the sweet spot). +- **Aspose.BarCode for .NET** NuGet package (`Install-Package Aspose.BarCode`). +- A sample image that contains **PDF417** barcodes—preferably one that mixes compact and full‑size symbols. The tutorial uses `CompactPdf417.png`, but any PNG/JPEG will do. +- Your favorite IDE (Visual Studio, Rider, or VS Code). + +That’s it—no extra DLLs, no native dependencies. Aspose.BarCode is pure managed code, so you can drop it into any .NET project. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Image alt text: Read multiple barcodes C# – screenshot of console displaying compact mode status for PDF417 barcodes.* + +## Step 1 – Install and Reference the BarCodeReader C# Library + +First things first, you need the **BarCodeReader C#** class that powers the decoding. Open your terminal (or Package Manager Console) and run: + +```powershell +dotnet add package Aspose.BarCode +``` + +Or, if you’re inside Visual Studio’s NuGet manager, just search for *Aspose.BarCode* and hit **Install**. This pulls in the latest stable version (as of July 2026 it’s 23.9), which supports PDF417, QR, DataMatrix, and dozens of other symbologies. + +Why this matters: the library abstracts away the heavy lifting of image processing, error correction, and symbol recognition. You could write your own scanner, but you’d spend weeks chasing edge‑cases. Aspose gives you a battle‑tested, **C# barcode library** that’s been updated for modern .NET runtimes. + +## Step 2 – Set Up a Minimal Console Project + +Create a fresh console app so we can focus on the barcode logic without any UI noise: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Replace the generated `Program.cs` with the full example below. Feel free to keep the default namespace or rename it—nothing special is required. + +## Step 3 – Write the Full “Read Multiple Barcodes C#” Implementation + +Below is a **complete, runnable** code sample. It covers all four steps from the original snippet, adds error handling, and prints useful diagnostics. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Why This Code Works + +- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. It opens the image, applies pre‑processing, and searches for symbols of the type you specify. +- **`ReadBarCodes()`** returns an array, not just a single result. That’s the key to **reading multiple barcodes C#**—the method automatically collects every match it finds. +- **`result.Extended.Pdf417.IsTruncated`** tells us whether the PDF417 is in *compact* (a.k.a. truncated) mode. This flag only exists for PDF417, so we guard with the null‑conditional operator (`?.`) to avoid exceptions if another symbology sneaks in. +- The `foreach` loop prints both the decoded text and the compact status, giving you a quick sanity check. + +## Step 4 – Handling Different Barcode Types (Optional) + +If your image might contain more than just PDF417, simply change the second argument of `BarCodeReader` to `DecodeType.AllSupported`. The loop stays the same, but you’ll need to guard against `result.Extended` being null for non‑PDF417 symbols: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +This small tweak turns your **C# barcode library** into a universal scanner, perfect for mixed‑symbology batches. + +## Step 5 – Edge Cases and Best‑Practice Tips + +### 1️⃣ No Barcodes Detected +If `ReadBarCodes()` returns an empty array, the most common culprits are: + +- Wrong file path or missing read permissions. +- Image quality too low (blur, low contrast). Consider pre‑processing with `reader.ImagePreprocessingOptions` (e.g., `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Extremely Large Images +Processing a 10 MP photo can be memory‑hungry. You can limit the scan area: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Thread‑Safety +`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin up separate instances per thread if you need parallel processing. + +### 4️⃣ Licensing +Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark on the output image. For production, set the license early: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +When you integrate this into a larger service, replace `Console.WriteLine` with a structured logger (Serilog, NLog). That way you can capture `CodeText`, `CodeType`, and `IsTruncated` as fields for downstream analytics. + +## Full Working Example Recap + +Putting it all together, here’s the *entire* program you can copy‑paste into `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## What Should You Learn Next? + + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/og-image.png b/barcode/english/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..573297a5f6a32927d2eea891bbaf07087cde44a4 GIT binary patch literal 52723 zcmbrl1yEd3vo%T*2oNMBI0Oq0!QCymJA?osxVvizkOX&kcXyiv3GNV_!QI_?o8-Iq zulirzy7lTEriz)VGv}P$yLb0m-E03)kP}CFf%gIi1_nh^;=K|K3~V_J%u^?Xr{J5P zZ+DSkU(;s6T|*{1MBzizmE^vzc*-TkIx8>r^5gK3ko9qdlMKE`0npJRP~Yz zc_gJG4GCOo(zVcNW&s!BzvmFuyw|!5iH=}avO1t9{dWsJt;|u&u(yWU!O^qqhX2Fu z1X=b8-(^qa!6}LLN;Ft1i~YN2W{r5x>}%0paGyHMUNS07?i-kbOlJkH2w z@Dq|uA($m;Az|C>q^|3V@)(cGECK) z4Qm1Oduzxi1|;;m^#^{J*yNOp0Ad6-%xgaqAzo}#f8mUNoQWvn?@{WcJMm{vIev~! z7bbnZseAtiv1FvB_y=ahaQ+*hb*%wnpVzdtvcrFc5b)J#`4NKIA4 z#DQVwWz17WtZSSam6%5L8decH?6PYIyJ0P@{IyjmwcG6RBCvi0x)Z|Q22ZOQDyXOb z7zJRwuzMW1;K)*pB22iBf987&%M_q`Q?5xmm6QIbizDX(x@r51 zZoaz(Fj69ls(xMYrkSwziA*36%Bhsr;rK032=OXkqj}HMdY3zVEu+F-W5{BLw?f1e zT4op*gXW+b6A@(cMI;)ze|lmKB|;sCa=J^2t2*JhB&Xs*Issqo;I7Fn?8o$zU^n0X;# zrb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<+tvXrG9RiYjkyiBxC0yh&~R0 zqMG5VSQ5eG`3Z81@RoxqdFrEv25;PlImkI+9Ldb2mW^_&HZ@h^f&&` p={sTR$DrqVf%RhhnKLExg1g`)9 literal 0 HcmV?d00001 diff --git a/barcode/english/net/one-dimensional-barcode-types/_index.md b/barcode/english/net/one-dimensional-barcode-types/_index.md index 6c53014d9..a503f1f24 100644 --- a/barcode/english/net/one-dimensional-barcode-types/_index.md +++ b/barcode/english/net/one-dimensional-barcode-types/_index.md @@ -98,6 +98,8 @@ earn how to generate barcodes in .NET with Aspose.BarCode for .NET. This compreh Learn how to handle exceptions while generating one-dimensional barcodes using Aspose.BarCode for .NET. This step-by-step guide ensures error-tolerant barcode solutions. Get started now! ### [One-Dimensional Wide-Narrow Ratio Configuration](./one-dimensional-wide-narrow-ratio-configuration/) Generate customized barcodes easily with Aspose.BarCode for .NET. Step-by-step guide for one-dimensional wide-narrow ratio configuration. +### [Read barcode from image – C# barcode reader example](./read-barcode-from-image-c-barcode-reader-example/) +Learn how to read barcodes from images in C# using Aspose.BarCode .NET with a step‑by‑step example. ## Frequently Asked Questions @@ -133,4 +135,4 @@ With this article, you'll not only gain knowledge about various one‑dimensiona {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..9d712bcec --- /dev/null +++ b/barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,279 @@ +--- +category: general +date: 2026-07-30 +description: Read barcode from image using Aspose.BarCode for .NET – a complete C# + barcode reader example that shows how to decode Macro PDF417 barcodes. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: en +lastmod: 2026-07-30 +og_description: Read barcode from image with Aspose.BarCode for .NET. This step‑by‑step + C# barcode reader example shows how to extract all Macro PDF417 metadata. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Read barcode from image – Full C# barcode reader example +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Read barcode from image – C# barcode reader example +url: /net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Read barcode from image – C# barcode reader example + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +Imagine you’ve just scanned a shipping label, a boarding pass, or a government ID that embeds a Macro PDF417 segment. You want to pull the file ID, segment count, timestamps, and maybe even the sender’s name—all without leaving your code. That’s exactly what we’ll achieve, and we’ll do it in a way that’s easy to copy‑paste into your own project. + +--- + +## What you’ll learn + +- How to add the Aspose.BarCode NuGet package to a .NET project. +- How to open an image file that contains a Macro PDF417 barcode. +- How to iterate over **read barcode from image** results and access every extended field. +- Tips for handling multiple segments, validating checksums, and troubleshooting common pitfalls. + +By the end of this guide you’ll have a working console app that prints out all Macro PDF417 metadata, ready to be integrated into larger systems like inventory trackers or document management pipelines. + +--- + +## Prerequisites + +Before we dive in, make sure you have the following: + +| Requirement | Why it matters | +|-------------|----------------| +| .NET 6.0 SDK or later (any recent version works) | Provides the runtime for the console app. | +| Visual Studio 2022 (or VS Code with C# extension) | Makes editing and debugging painless. | +| Aspose.BarCode for .NET (free trial or licensed) | The library that actually decodes the barcode. | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | The source we’ll read from. | + +If you don’t already have Aspose.BarCode, you can pull it from NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +That single line installs everything you need, including the `BarCodeReader`, `DecodeType`, and the rich `Extended` property set we’ll explore. + +--- + +## Step 1 – Set up the project and import the library + +Create a fresh console project (or drop the code into an existing one). The `using` directives are essential; they bring the barcode classes into scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** If you’re using Visual Studio, the IDE will offer to add the missing `using` statements automatically—just hit *Ctrl+.`*. + +--- + +## Step 2 – Prepare the image path + +Hard‑coding an absolute path works for a quick demo, but in production you’d probably accept a command‑line argument or a configuration setting. For clarity we’ll keep it simple: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** The `BarCodeReader` expects a valid file location; an incorrect path throws a `FileNotFoundException` before any decoding even starts. + +--- + +## Step 3 – **Read barcode from image** and extract Macro PDF417 details + +Now comes the heart of the **c# barcode reader example**. We’ll instantiate `BarCodeReader` with the `DecodeType.MacroPdf417` flag, loop through all results (there can be more than one barcode in a single image), and print every extended property. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### What the code is doing (why, not just how) + +1. **`using` block** – Guarantees the native resources (file handles, native decoder memory) are freed immediately after the operation. Skipping this can lead to locked files on Windows. +2. **`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 symbols; other barcode types are ignored, which speeds up scanning. +3. **`ReadBarCodes()`** – Returns a collection because an image might contain multiple Macro PDF417 segments (think of a multi‑page document split across several barcodes). +4. **`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the barcode lacks extended data. +5. **Printing each field** – Gives you visibility into the file identifier, segment ordering, checksum verification, and optional textual fields like sender or addressee. + +--- + +## Step 4 – Run the application and verify the output + +Compile and execute the program: + +```bash +dotnet run +``` + +If everything is wired correctly, you should see something akin to the following in your console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** The exact values depend on the barcode you’re decoding. If you get “No Macro PDF417 extension data found,” double‑check that the image truly contains a Macro PDF417 code and that you’re using the correct `DecodeType`. + +--- + +## Handling multiple segments and validation (advanced) + +Macro PDF417 is designed for large data payloads split across several symbols. When you encounter more than one segment, you’ll typically need to: + +1. **Collect all segments** into a dictionary keyed by `SegmentID`. +2. **Sort** them by `SegmentID` to reassemble the original file. +3. **Validate** the `Checksum` against the concatenated payload (Aspose does this internally, but you can re‑run a CRC if you need extra safety). + +Here’s a quick sketch: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +You’ll need to implement `AssembleSegments` and `VerifyChecksum` based on your payload format—often it’s just a byte array concatenation followed by a CRC‑16 check. + +--- + +## Common pitfalls and how to avoid them + +| Symptom | Likely cause | Fix | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | Image contains a plain PDF417, not a Macro version. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` wrong or file not accessible. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Keep all processing inside the ` + + +## What Should You Learn Next? + + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/og-image.png b/barcode/english/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..9b655ce363dbd22ba393c1b12a3d030f3d8b2fb3 GIT binary patch literal 49150 zcmbrl1yqz@`!0;4gi49hh)B0|hae@=B`w|E45893-Q6wSAl=<94MR5!b+-Ec-gW-p zyWaJkv(7jyW`^$>l2`^!j)qCCNS0tW|&A};n`4i4_o4>-7o4oDBdCqLip zK81s8?ht?fPQht*cR}A3Q=AC#P&_^}x~{(djUuJY{K6i`e8}qj?LOynNZbA|E8n(- z1u8jZBMFH{?>bWRh)vi-?$wXw89>8)&LP-K|R zTz1fZ84lfq^P6{iXN5qo7%o+{dGFsb1?ui{bs*{BBa-zh$+(9_uK5Yw$Y6ppbboI) zmvNr>?}Yy2ZvXp~hesIOrPGNW|4wrpXa8R_|9@GVe~(sS`>a&nsGH#L#qE8#|FzEl zEaJbv_#dOCir{qrnHBosIK;mCbym1mqMtni}{rB>lCor-8vou?o|LpDGF~1DvuSXaMxG14ek?3d6S5cAtHHvLm zM!=r`8+|aq9Gm`=7oNQeX{vu$S4Ou+=&v>W+g`XZeN^`+PFlvZ#62DiAV6`@i?G}zt8!=)Qy?EnAz+qb* z-DYkN@4B#8cg3+P0B!}Y8x9z{Kv;SNQyB8^_k_ZR%|f}=tkKzd8jO9RPG7;tBY z>4nrZCG9P<3awWQNrkNs7lfsrFUpd7S?%DTC)Lqi&P|SHYQ-{?;r+hGgEUxyI(pE@ zFCk>)S8oAyDcp?$KL2uFaZegIwPMGGO{ z-r(jWn*rIB7N?BIrrwys*+nLXrf$baOQjU#{-%hn$w3x6jTYuyx-OrzginmEKFsy! zS!&Z`r$LudS;5k}oSRkbE7poYqHW3UaCv!_IlO{6*vuz#g{02`xv3;Xrx+K_>LK;#d9kz~d;?;2ctdHn+Gd;1$w5P&HObS*wq6ino5&3sW z<1!KO3rT!qWke#Ga7!(Z`_V@ksg1@916{U$8MAehJxRrM5UsG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r)Rym9|mvMS%H?a+s9MVz*yo5x)YdlJ%;lqZ9L3Oq023 zX!LnZ7b>6DvsJj&({ma}JtU#AbXD?GWaRM^kM(@8FsL7zqgkPT;-Sn?hkTjoA4+oq zBG~6I?-rF5u(Pop9(+xKV7$cmn6sSzctI_m(Hs&yj)z(&Fw;7 zN3&VH%d)bvLO^N0ZgV!=$3Mi~^xF}G&&&$#3aEBpw!Uw$StaLOOU$zkA1rl(JH&e) z{iGo2OsqHYJ@-ba-mZ}tP**D5T#E9Gd+Y`)W85oKQbhC3B0$`yM(U+@1Y)<&!0v=j zsw2r^O;ycA>s6;Y3k57THa06aH=AFKov9-0bGFl{mX==O$ssmH*^_oQH{)^a=ZvME z`aZ%1#gL>UiXYr`V@1P_VngGo_>!C&q`bNYD*GWDI>udlbk-#t#qBr+!pWCmHdjL` zMtjSuD*V(Ew`6VArAA_BM#5);^J2JAY%R6LX4^|ZT^*vN&qh58Vv5@JfL^y%oxSt< zNNyD`m=9ZqJT>6TrJDe5BUMQj&QVewH(WUFjahG+s9;PcvA4teA&g_TqtkE0;Z}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/french/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/french/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..57eb6516d --- /dev/null +++ b/barcode/french/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Comment générer une image de code‑barres PDF417 en C# avec Aspose. Apprenez + étape par étape comment créer un code‑barres avec Aspose, définir les métadonnées + MacroPDF417 et l’enregistrer au format PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: fr +lastmod: 2026-07-30 +og_description: Comment générer une image de code‑barres PDF417 en C# avec Aspose. + Suivez ce guide complet pour créer un code‑barres avec Aspose, configurer les métadonnées + MacroPDF417 et produire un fichier PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Comment générer une image de code-barres PDF417 en C# avec Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Comment générer une image de code-barres PDF417 en C# avec Aspose +url: /fr/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Comment générer une image de code-barres PDF417 en C# avec Aspose + +Générer une image de code-barres PDF417 en C# avec Aspose est un obstacle fréquent pour quiconque travaille avec un encodage de données à haute densité. Dans ce guide, nous passerons en revue chaque étape — configuration du générateur, ajustement des métadonnées MacroPDF417, et enfin sauvegarde d’un fichier PNG net. + +Si vous avez déjà essayé de **generate barcode image c#** et que vous avez obtenu une toile blanche ou un scan illisible, vous n'êtes pas seul. La bonne nouvelle, c’est qu’Aspose.BarCode rend le processus presque indolore, et à la fin de cet article vous pourrez **create barcode with Aspose** pour tout flux de travail d’entreprise. + +## Ce que vous apprendrez + +- Installer et référencer la bibliothèque Aspose.BarCode pour .NET. +- Initialiser un générateur PDF417 avec une charge utile personnalisée. +- Appliquer les champs spécifiques à MacroPDF417 tels que l’ID de fichier, l’ID de segment et le horodatage. +- Exporter le résultat vers une image PNG que vous pouvez intégrer dans des rapports ou des applications mobiles. +- Conseils pour dépanner les problèmes courants (par ex., largeur de module incorrecte, segments manquants). + +Aucune expérience préalable avec MacroPDF417 n’est requise ; une compréhension de base de C# et de Visual Studio suffira. + +## Prérequis + +| Exigence | Raison | +|----------|--------| +| .NET 6.0 or later | Version LTS actuelle, entièrement prise en charge par Aspose | +| Visual Studio 2022 (or any IDE) | Pour compiler et exécuter l’exemple | +| Aspose.BarCode for .NET (NuGet) | Fournit `BarcodeGenerator` et le support PDF417 | + +Vous pouvez ajouter la bibliothèque via NuGet : + +```bash +dotnet add package Aspose.BarCode +``` + +Maintenant que les bases sont posées, plongeons dans le code. + +## Comment générer une image de code-barres PDF417 en C# – Configuration + +La première chose que nous faisons est de créer une instance de `BarcodeGenerator` pour le type d’encodage **MacroPdf417**. Cet objet contient toutes les options de configuration, de la taille du module aux métadonnées riches attendues par MacroPDF417. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Pourquoi c’est important :** `EncodeTypes.MacroPdf417` indique à Aspose de produire un code-barres PDF417 qui peut être divisé en plusieurs segments — indispensable pour les gros fichiers ou le traitement par lots. + +## Configurer l’apparence de base + +Un code-barres lisible commence par les bons réglages visuels. `XDimension` contrôle la largeur de chaque module (les petites cases noires/blanches), tandis que `Columns` détermine le nombre de colonnes que le code-barres occupe. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Conseil :** Si le code-barres apparaît trop dense sur une imprimante de reçus, augmentez `XDimension` à `3` ou `4`. +- **Écueil :** Un réglage trop bas de `Columns` peut faire dépasser le code-barres des limites de l’image, entraînant un scan illisible. + +## Définir les métadonnées spécifiques à MacroPDF417 + +MacroPDF417 vous permet d’intégrer des informations au niveau du fichier directement dans le code-barres. C’est parfait pour suivre l’expédition de gros documents ou diviser un fichier en plusieurs scans. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Ce que chaque champ fait  :** + +| Propriété | Description | +|-----------|-------------| +| `MacroPdf417FileID` | Identifiant unique pour l’ensemble du fichier. | +| `MacroPdf417SegmentID` | Index du segment actuel (commence à 0). | +| `MacroPdf417SegmentsCount` | Nombre total de segments en lesquels le fichier est divisé. | +| `MacroPdf417FileName` | Nom lisible par l’homme, utile pour les journaux d’audit. | +| `MacroPdf417Checksum` | CRC 16 bits pour la vérification de l’intégrité des données. | +| `MacroPdf417FileSize` | Taille originale du fichier en octets, aide les récepteurs à allouer des tampons. | +| `MacroPdf417TimeStamp` | Date/heure de génération du fichier. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Chaînes optionnelles pour identifier l’expéditeur/le destinataire. | +| `MacroPdf417Terminator` | Marque le dernier segment ; requis pour un décodage correct. | + +> **Pourquoi s’en soucier ?** Sans ces champs, un scanner ne peut lire que les données brutes, pas le contexte. Ajouter des métadonnées permet au système récepteur de réassembler automatiquement le fichier original. + +## Enregistrer le code-barres au format PNG + +Une fois le générateur entièrement configuré, enregistrer l’image se fait en une seule ligne : + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Format de fichier :** PNG est sans perte, garantissant que chaque module reste net pour les scanners. +- **Alternative :** Utilisez `BarCodeImageFormat.Jpeg` si vous avez besoin d’une taille de fichier plus petite, mais attendez une légère perte de lisibilité. + +### Résultat attendu + +Après avoir exécuté le fragment, vous trouverez `MacroPdf417Meta.png` dans le dossier spécifié. Il devrait ressembler à l’illustration ci‑dessous : + +![Code‑barres PDF417 généré avec Aspose](path/to/your/image.png){alt="Comment générer une image de code‑barres PDF417 en C#"} + +L’image contient une grille dense de carrés noirs et blancs, avec la charge utile encodée et les métadonnées MacroPDF417 intégrées. + +## Exemple complet fonctionnel + +Voici le programme complet, prêt à copier‑coller. Il se compile avec n’importe quel projet .NET 6+ et ne nécessite que le package NuGet Aspose.BarCode. + + + +## Que devriez‑vous apprendre ensuite ? + +Les tutoriels suivants couvrent des sujets étroitement liés qui s’appuient sur les techniques démontrées dans ce guide. Chaque ressource comprend des exemples de code complets et fonctionnels avec des explications étape par étape pour vous aider à maîtriser des fonctionnalités API supplémentaires et explorer des approches d’implémentation alternatives dans vos propres projets. + +- [Comment créer un code‑barres – PDF417 compact avec Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Comment générer des codes‑barres DataMatrix (ECC 200) avec Aspose.BarCode pour .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Comment générer un code‑barres Aztec avec un ratio d’aspect personnalisé en utilisant Aspose.BarCode pour .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/french/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/french/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..275354e49 --- /dev/null +++ b/barcode/french/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Lire plusieurs codes‑barres en C# avec Aspose.BarCode. Apprenez étape + par étape comment décoder le PDF417, détecter le mode compact et gérer de nombreux + codes‑barres dans une même image. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: fr +lastmod: 2026-07-30 +og_description: Lire plusieurs codes-barres C# avec Aspose.BarCode. Ce guide vous + montre comment décoder tous les codes-barres d’une image, vérifier le mode compact + et les intégrer dans des applications .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Lire plusieurs codes-barres C# – Tutoriel complet pour PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Lire plusieurs codes-barres C# – Guide complet avec PDF417 +url: /fr/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Lire plusieurs codes‑barres C# – Guide complet avec PDF417 + +Vous êtes-vous déjà demandé comment **read multiple barcodes C#** à partir d’une seule image ? Peut‑être avez‑vous un lot d’étiquettes d’expédition, un collage de tickets, ou un document PDF417 qui regroupe plusieurs codes dans une même photo. Dans mon travail quotidien, je suis tombé exactement sur ce problème—jusqu’à ce que je découvre le `BarCodeReader` d’Aspose.BarCode. Ce tutoriel vous guidera pas à pas pour décoder chaque code‑barres présent dans une image, déterminer si chaque PDF417 est en mode compact (truncé), et gérer les résultats proprement. + +Nous ajouterons également quelques astuces supplémentaires—comme quoi faire lorsque l’image contient différentes symbologies de codes‑barres, ou lorsqu’une lecture ne renvoie aucun résultat. À la fin, vous disposerez d’une application console prête à l’emploi qui **reads multiple barcodes C#** comme un pro. + +## Ce dont vous avez besoin + +Avant de commencer, assurez‑vous d’avoir les éléments suivants sur votre machine : + +- **.NET 6.0** SDK ou version supérieure (le code fonctionne également avec .NET Framework 4.6+, mais .NET 6 est le meilleur compromis). +- **Aspose.BarCode for .NET** package NuGet (`Install-Package Aspose.BarCode`). +- Une image d’exemple contenant des codes‑barres **PDF417**—de préférence une qui mélange des symboles compacts et pleine taille. Le tutoriel utilise `CompactPdf417.png`, mais tout PNG/JPEG fera l’affaire. +- Votre IDE préféré (Visual Studio, Rider ou VS Code). + +C’est tout—pas de DLL supplémentaires, pas de dépendances natives. Aspose.BarCode est du code purement géré, vous pouvez donc l’ajouter à n’importe quel projet .NET. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Texte alternatif de l’image : Lire plusieurs codes‑barres C# – capture d’écran de la console affichant le statut du mode compact pour les codes‑barres PDF417.* + +## Étape 1 – Installer et référencer la bibliothèque BarCodeReader C# + +Tout d’abord, vous avez besoin de la classe **BarCodeReader C#** qui assure le décodage. Ouvrez votre terminal (ou la console du gestionnaire de packages) et exécutez : + +```powershell +dotnet add package Aspose.BarCode +``` + +Ou, si vous êtes dans le gestionnaire NuGet de Visual Studio, recherchez simplement *Aspose.BarCode* et cliquez sur **Install**. Cela récupère la dernière version stable (en juillet 2026 c’est la 23.9), qui prend en charge PDF417, QR, DataMatrix et des dizaines d’autres symbologies. + +Pourquoi c’est important : la bibliothèque abstrait le traitement lourd d’image, la correction d’erreurs et la reconnaissance des symboles. Vous pourriez écrire votre propre scanner, mais vous passeriez des semaines à gérer les cas limites. Aspose vous fournit une **C# barcode library** éprouvée, mise à jour pour les runtimes .NET modernes. + +## Étape 2 – Configurer un projet console minimal + +Créez une nouvelle application console afin de nous concentrer sur la logique du code‑barres sans aucune distraction UI : + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Remplacez le `Program.cs` généré par l’exemple complet ci‑dessous. Vous pouvez garder l’espace de noms par défaut ou le renommer—aucune contrainte particulière. + +## Étape 3 – Écrire l’implémentation complète “Read Multiple Barcodes C#” + +Voici un exemple de code **complet et exécutable**. Il couvre les quatre étapes du fragment original, ajoute la gestion des erreurs et affiche des diagnostics utiles. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Pourquoi ce code fonctionne + +- **`BarCodeReader`** est le moteur de l’API **BarCodeReader C#**. Il ouvre l’image, applique le pré‑traitement et recherche les symboles du type que vous spécifiez. +- **`ReadBarCodes()`** renvoie un tableau, pas seulement un résultat unique. C’est la clé pour **reading multiple barcodes C#**—la méthode collecte automatiquement chaque correspondance trouvée. +- **`result.Extended.Pdf417.IsTruncated`** indique si le PDF417 est en mode *compact* (aussi appelé truncé). Ce drapeau n’existe que pour PDF417, d’où l’utilisation de l’opérateur conditionnel nul (`?.`) pour éviter les exceptions si une autre symbologie apparaît. +- La boucle `foreach` affiche à la fois le texte décodé et le statut compact, vous offrant une vérification rapide. + +## Étape 4 – Gérer différents types de codes‑barres (Optionnel) + +Si votre image peut contenir plus que du PDF417, changez simplement le deuxième argument de `BarCodeReader` en `DecodeType.AllSupported`. La boucle reste identique, mais vous devrez protéger l’accès à `result.Extended` qui sera nul pour les symboles non‑PDF417 : + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Cette petite modification transforme votre **C# barcode library** en un scanner universel, idéal pour des lots à symbologies mixtes. + +## Étape 5 – Cas limites et bonnes pratiques + +### 1️⃣ Aucun code‑barres détecté +Si `ReadBarCodes()` renvoie un tableau vide, les causes les plus fréquentes sont : + +- Chemin de fichier incorrect ou permissions de lecture manquantes. +- Qualité d’image trop faible (flou, faible contraste). Envisagez un pré‑traitement avec `reader.ImagePreprocessingOptions` (par ex., `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Images extrêmement volumineuses +Traiter une photo de 10 MP peut consommer beaucoup de mémoire. Vous pouvez limiter la zone de scan : + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Sécurité des threads +`BarCodeReader` implémente `IDisposable` et **n’est pas** thread‑safe. Créez des instances séparées par thread si vous avez besoin de traitement parallèle. + +### 4️⃣ Licence +Aspose.BarCode fonctionne en mode d’évaluation immédiatement, mais vous verrez un filigrane sur l’image de sortie. En production, définissez la licence dès le démarrage : + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Journalisation +Lorsque vous intégrez ce code dans un service plus vaste, remplacez `Console.WriteLine` par un logger structuré (Serilog, NLog). Ainsi vous pourrez capturer `CodeText`, `CodeType` et `IsTruncated` comme champs pour des analyses en aval. + +## Récapitulatif de l’exemple complet + +En rassemblant le tout, voici le *programme entier* que vous pouvez copier‑coller dans `Program.cs` : + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Que devriez‑vous apprendre ensuite ? + +Les tutoriels suivants abordent des sujets étroitement liés qui prolongent les techniques présentées dans ce guide. Chaque ressource comprend des exemples de code complets avec des explications pas à pas pour vous aider à maîtriser d’autres fonctionnalités de l’API et explorer des approches d’implémentation alternatives dans vos propres projets. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/french/net/one-dimensional-barcode-types/_index.md b/barcode/french/net/one-dimensional-barcode-types/_index.md index 9f7bfd64d..5013a4410 100644 --- a/barcode/french/net/one-dimensional-barcode-types/_index.md +++ b/barcode/french/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ Découvrez comment générer des codes-barres dans .NET avec Aspose.BarCode pour Découvrez comment gérer les exceptions lors de la génération de codes-barres unidimensionnels à l'aide d'Aspose.BarCode for .NET. Ce guide étape par étape garantit des solutions de codes-barres tolérantes aux erreurs. Commencez maintenant! ### [Configuration unidimensionnelle à rapport large-étroit](./one-dimensional-wide-narrow-ratio-configuration/) Générez facilement des codes-barres personnalisés avec Aspose.BarCode pour .NET. Guide étape par étape pour la configuration unidimensionnelle du rapport large-étroit. +### [Lire le code-barres à partir d'une image – Exemple de lecteur de code-barres C#](./read-barcode-from-image-c-barcode-reader-example/) +Apprenez à lire des codes-barres à partir d'images en C# avec Aspose.BarCode. Guide étape par étape pour l'intégration. ## Conclusion @@ -89,4 +91,4 @@ Avec cet article, vous acquerrez non seulement des connaissances sur les différ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/french/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/french/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..952218a5b --- /dev/null +++ b/barcode/french/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,281 @@ +--- +category: general +date: 2026-07-30 +description: Lire le code‑barres à partir d’une image en utilisant Aspose.BarCode + pour .NET – un exemple complet de lecteur de code‑barres en C# qui montre comment + décoder les codes‑barres Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: fr +lastmod: 2026-07-30 +og_description: Lire le code‑barres à partir d’une image avec Aspose.BarCode pour + .NET. Cet exemple pas à pas de lecteur de code‑barres C# montre comment extraire + toutes les métadonnées Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Lire le code‑barres à partir d’une image – Exemple complet de lecteur de + code‑barres en C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Lire le code‑barres à partir d’une image – Exemple de lecteur de code‑barres + C# +url: /fr/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Lire le code‑barres à partir d’une image – Exemple de lecteur de code‑barres C# + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +Imagine you’ve just scanned a shipping label, a boarding pass, or a government ID that embeds a Macro PDF417 segment. You want to pull the file ID, segment count, timestamps, and maybe even the sender’s name—all without leaving your code. That’s exactly what we’ll achieve, and we’ll do it in a way that’s easy to copy‑paste into your own project. + +--- + +## Ce que vous apprendrez + +- How to add the Aspose.BarCode NuGet package to a .NET project. +- How to open an image file that contains a Macro PDF417 barcode. +- How to iterate over **read barcode from image** results and access every extended field. +- Tips for handling multiple segments, validating checksums, and troubleshooting common pitfalls. + +By the end of this guide you’ll have a working console app that prints out all Macro PDF417 metadata, ready to be integrated into larger systems like inventory trackers or document management pipelines. + +--- + +## Prérequis + +Before we dive in, make sure you have the following: + +| Exigence | Pourquoi c'est important | +|----------|---------------------------| +| .NET 6.0 SDK ou version ultérieure (toute version récente fonctionne) | Fournit le runtime pour l'application console. | +| Visual Studio 2022 (ou VS Code avec l'extension C#) | Rend l'édition et le débogage sans effort. | +| Aspose.BarCode for .NET (essai gratuit ou licence) | La bibliothèque qui décode réellement le code‑barres. | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | La source que nous lirons. | + +If you don’t already have Aspose.BarCode, you can pull it from NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +That single line installs everything you need, including the `BarCodeReader`, `DecodeType`, and the rich `Extended` property set we’ll explore. + +--- + +## Étape 1 – Configurer le projet et importer la bibliothèque + +Create a fresh console project (or drop the code into an existing one). The `using` directives are essential; they bring the barcode classes into scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** If you’re using Visual Studio, the IDE will offer to add the missing `using` statements automatically—just hit *Ctrl+.`*. + +--- + +## Étape 2 – Préparer le chemin de l’image + +Hard‑coding an absolute path works for a quick demo, but in production you’d probably accept a command‑line argument or a configuration setting. For clarity we’ll keep it simple: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** The `BarCodeReader` expects a valid file location; an incorrect path throws a `FileNotFoundException` before any decoding even starts. + +--- + +## Étape 3 – **Read barcode from image** et extraire les détails Macro PDF417 + +Now comes the heart of the **c# barcode reader example**. We’ll instantiate `BarCodeReader` with the `DecodeType.MacroPdf417` flag, loop through all results (there can be more than one barcode in a single image), and print every extended property. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Ce que fait le code (pourquoi, pas seulement comment) + +1. **`using` block** – Guarantees the native resources (file handles, native decoder memory) are freed immediately after the operation. Skipping this can lead to locked files on Windows. +2. **`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 symbols; other barcode types are ignored, which speeds up scanning. +3. **`ReadBarCodes()`** – Returns a collection because an image might contain multiple Macro PDF417 segments (think of a multi‑page document split across several barcodes). +4. **`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the barcode lacks extended data. +5. **Printing each field** – Gives you visibility into the file identifier, segment ordering, checksum verification, and optional textual fields like sender or addressee. + +--- + +## Étape 4 – Exécuter l’application et vérifier la sortie + +Compile and execute the program: + +```bash +dotnet run +``` + +If everything is wired correctly, you should see something akin to the following in your console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** The exact values depend on the barcode you’re decoding. If you get “No Macro PDF417 extension data found,” double‑check that the image truly contains a Macro PDF417 code and that you’re using the correct `DecodeType`. + +--- + +## Gestion de plusieurs segments et validation (avancé) + +Macro PDF417 is designed for large data payloads split across several symbols. When you encounter more than one segment, you’ll typically need to: + +1. **Collect all segments** into a dictionary keyed by `SegmentID`. +2. **Sort** them by `SegmentID` to reassemble the original file. +3. **Validate** the `Checksum` against the concatenated payload (Aspose does this internally, but you can re‑run a CRC if you need extra safety). + +Here’s a quick sketch: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +You’ll need to implement `AssembleSegments` and `VerifyChecksum` based on your payload format—often it’s just a byte array concatenation followed by a CRC‑16 check. + +--- + +## Problèmes courants et comment les éviter + +| Symptom | Cause probable | Solution | +|---------|----------------|----------| +| `null` returned from `macroResult.Extended` | Image contains a plain PDF417, not a Macro version. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` wrong or file not accessible. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Keep all processing inside the ` + +## Que devriez‑vous apprendre ensuite ? + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step‑by‑step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [Programmation du lecteur DataMatrix avec Aspose.BarCode pour .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Initialisation du lecteur DotCode avec Aspose.BarCode pour .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Comment lire les codes‑barres DataMatrix avec Aspose.BarCode pour .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/german/net/compact-pdf417-encoding/_index.md b/barcode/german/net/compact-pdf417-encoding/_index.md index 201fcffef..649a300e2 100644 --- a/barcode/german/net/compact-pdf417-encoding/_index.md +++ b/barcode/german/net/compact-pdf417-encoding/_index.md @@ -85,6 +85,12 @@ Nachfolgend eine knappe Beschreibung eines typischen Barcode‑Erstellungsszenar ### [Creating Compact PDF417 Barcodes](./compact-pdf417-basic-configuration/) Erfahren Sie, wie Sie Compact PDF417 Barcodes mit Aspose.BarCode für .NET erzeugen. Umfassender Leitfaden mit Schritt‑für‑Schritt‑Anweisungen und Code‑Beispielen. +### [Wie man ein PDF417‑Barcode‑Bild in C# mit Aspose erzeugt](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Erfahren Sie, wie Sie mit Aspose.BarCode für .NET ein PDF417‑Barcode‑Bild in C# erstellen. + +### [Mehrere Barcodes in C# lesen – Vollständiger Leitfaden mit PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Erfahren Sie, wie Sie mit Aspose.BarCode für .NET mehrere Barcodes, einschließlich PDF417, in C# auslesen. + ## Häufig gestellte Fragen **F: Wie viel Daten kann ich maximal in einem Compact PDF417 Barcode speichern?** @@ -113,4 +119,4 @@ A: Nein, es werden keine externen Schriftarten benötigt; die Bibliothek überni {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/german/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/german/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..7e67fba75 --- /dev/null +++ b/barcode/german/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Wie man ein PDF417‑Barcode‑Bild in C# mit Aspose erzeugt. Lernen Sie + Schritt für Schritt, wie Sie einen Barcode mit Aspose erstellen, MacroPDF417‑Metadaten + festlegen und als PNG speichern. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: de +lastmod: 2026-07-30 +og_description: Wie man ein PDF417-Barcode-Bild in C# mit Aspose erzeugt. Folgen Sie + dieser vollständigen Anleitung, um einen Barcode mit Aspose zu erstellen, MacroPDF417-Metadaten + zu konfigurieren und eine PNG-Datei auszugeben. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Wie man ein PDF417-Barcode-Bild in C# mit Aspose generiert +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Wie man ein PDF417-Barcode-Bild in C# mit Aspose generiert +url: /de/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Wie man ein PDF417‑Barcode‑Bild in C# mit Aspose erzeugt + +Wie man ein PDF417‑Barcode‑Bild in C# mit Aspose erzeugt, ist ein häufiges Hindernis für alle, die hochdichte Daten codieren müssen. In diesem Leitfaden gehen wir Schritt für Schritt durch – vom Einrichten des Generators über das Anpassen der MacroPDF417‑Metadaten bis hin zum Speichern einer scharfen PNG‑Datei. + +Wenn Sie jemals versucht haben, **generate barcode image c#** zu **generieren** und dabei nur eine leere Leinwand oder einen unlesbaren Scan erhalten haben, sind Sie nicht allein. Die gute Nachricht: Aspose.BarCode macht den gesamten Prozess fast schmerzfrei, und am Ende dieses Artikels können Sie **create barcode with Aspose** für jeden Unternehmens‑Workflow erstellen. + +## Was Sie lernen werden + +- Installieren und Referenzieren der Aspose.BarCode‑Bibliothek für .NET. +- Initialisieren eines PDF417‑Generators mit einer benutzerdefinierten Nutzlast. +- Anwenden von MacroPDF417‑spezifischen Feldern wie File‑ID, Segment‑ID und Zeitstempel. +- Exportieren des Ergebnisses in ein PNG‑Bild, das Sie in Berichten oder mobilen Apps einbetten können. +- Tipps zur Fehlersuche bei häufigen Stolperfallen (z. B. falsche Modulbreite, fehlende Segmente). + +Vorkenntnisse zu MacroPDF417 sind nicht erforderlich; ein grundlegendes Verständnis von C# und Visual Studio reicht aus. + +## Voraussetzungen + +| Anforderung | Grund | +|-------------|-------| +| .NET 6.0 oder höher | Aktuelle LTS‑Version, vollständig von Aspose unterstützt | +| Visual Studio 2022 (oder jede IDE) | Zum Kompilieren und Ausführen des Beispiels | +| Aspose.BarCode für .NET (NuGet) | Stellt `BarcodeGenerator` und PDF417‑Unterstützung bereit | + +Sie können die Bibliothek über NuGet hinzufügen: + +```bash +dotnet add package Aspose.BarCode +``` + +Jetzt, wo das Fundament gelegt ist, tauchen wir in den Code ein. + +## Wie man ein PDF417‑Barcode‑Bild in C# erzeugt – Einrichtung + +Das Erste, was wir tun, ist eine `BarcodeGenerator`‑Instanz für den **MacroPdf417**‑Kodierungstyp zu erstellen. Dieses Objekt enthält alle Konfigurationsoptionen, von der Modulgröße bis zu den umfangreichen Metadaten, die MacroPDF417 erwartet. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Warum das wichtig ist:** `EncodeTypes.MacroPdf417` weist Aspose an, einen PDF417‑Barcode zu erzeugen, der in mehrere Segmente aufgeteilt werden kann – ein Muss für große Dateien oder Batch‑Verarbeitung. + +## Grundlegendes Erscheinungsbild konfigurieren + +Ein lesbarer Barcode beginnt mit den richtigen visuellen Einstellungen. `XDimension` steuert die Breite jedes Moduls (der winzigen schwarzen/weißen Quadrate), während `Columns` bestimmt, wie viele Spalten der Barcode umfasst. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tipp:** Wenn der Barcode auf einem Kassendrucker zu dicht wirkt, erhöhen Sie `XDimension` auf `3` oder `4`. +- **Fallstrick:** Wird `Columns` zu niedrig gesetzt, kann der Barcode die Bildgrenzen überschreiten, was zu einem unlesbaren Scan führt. + +## MacroPDF417‑spezifische Metadaten setzen + +MacroPDF417 ermöglicht das Einbetten von dateibezogenen Informationen direkt in den Barcode. Das ist ideal, um große Dokumentenlieferungen zu verfolgen oder eine Datei über mehrere Scans zu verteilen. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Was jedes Feld bewirkt:** + +| Property | Beschreibung | +|----------|--------------| +| `MacroPdf417FileID` | Eindeutiger Bezeichner für die gesamte Datei. | +| `MacroPdf417SegmentID` | Index des aktuellen Segments (beginnt bei 0). | +| `MacroPdf417SegmentsCount` | Gesamtzahl der Segmente, in die die Datei aufgeteilt ist. | +| `MacroPdf417FileName` | Menschlich lesbarer Name, nützlich für Audit‑Logs. | +| `MacroPdf417Checksum` | 16‑Bit‑CRC zur Überprüfung der Datenintegrität. | +| `MacroPdf417FileSize` | Originalgröße der Datei in Bytes, hilft Empfängern beim Puffer‑Management. | +| `MacroPdf417TimeStamp` | Datum/Uhrzeit, zu der die Datei erzeugt wurde. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Optionale Zeichenketten zur Identifikation von Empfänger/Absender. | +| `MacroPdf417Terminator` | Markiert das letzte Segment; erforderlich für korrektes Decodieren. | + +> **Warum das Ganze?** Ohne diese Felder kann ein Scanner nur die Rohdaten lesen, nicht den Kontext. Durch das Hinzufügen von Metadaten kann das empfangende System die Originaldatei automatisch wieder zusammensetzen. + +## Den Barcode als PNG speichern + +Sobald der Generator vollständig konfiguriert ist, ist das Persistieren des Bildes ein Einzeiler: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Dateiformat:** PNG ist verlustfrei und sorgt dafür, dass jedes Modul für Scanner scharf bleibt. +- **Alternative:** Verwenden Sie `BarCodeImageFormat.Jpeg`, wenn Sie eine kleinere Dateigröße benötigen, aber mit leichtem Lesbarkeitsverlust rechnen müssen. + +### Erwartete Ausgabe + +Nach dem Ausführen des Snippets finden Sie `MacroPdf417Meta.png` im angegebenen Ordner. Es sollte etwa wie die untenstehende Abbildung aussehen: + +![PDF417 Barcode mit Aspose erzeugt](path/to/your/image.png){alt="Wie man ein PDF417 Barcode‑Bild in C# erzeugt"} + +Das Bild enthält ein dichtes Raster aus schwarzen und weißen Quadraten, mit der codierten Nutzlast und den eingebetteten MacroPDF417‑Metadaten. + +## Vollständiges funktionierendes Beispiel + +Unten finden Sie das komplette, copy‑paste‑bereite Programm. Es lässt sich in jedem .NET 6+‑Projekt kompilieren und benötigt nur das Aspose.BarCode‑NuGet‑Paket. + + + +## Was Sie als Nächstes lernen sollten + +Die folgenden Tutorials behandeln eng verwandte Themen, die auf den in diesem Leitfaden gezeigten Techniken aufbauen. Jede Ressource enthält vollständige, funktionierende Codebeispiele mit Schritt‑für‑Schritt‑Erklärungen, um Ihnen zu helfen, weitere API‑Funktionen zu meistern und alternative Implementierungsansätze in Ihren eigenen Projekten zu erkunden. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/german/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/german/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..3e81d8e3f --- /dev/null +++ b/barcode/german/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Mehrere Barcodes in C# mit Aspose.BarCode lesen. Erfahren Sie Schritt + für Schritt, wie Sie PDF417 decodieren, den kompakten Modus erkennen und viele Barcodes + in einem Bild verarbeiten. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: de +lastmod: 2026-07-30 +og_description: Mehrere Barcodes in C# mit Aspose.BarCode lesen. Dieser Leitfaden + zeigt, wie Sie alle Barcodes in einem Bild dekodieren, den kompakten Modus prüfen + und in .NET‑Anwendungen integrieren. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Mehrere Barcodes in C# lesen – Vollständiges Tutorial für PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Mehrere Barcodes in C# lesen – Vollständiger Leitfaden mit PDF417 +url: /de/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Mehrere Barcodes in C# lesen – Vollständige Anleitung mit PDF417 + +Haben Sie sich jemals gefragt, wie man **mehrere Barcodes in C#** aus einem einzigen Bild ausliest? Vielleicht haben Sie einen Stapel Versandetiketten, ein Ticket‑Collage oder ein PDF417‑Dokument, das mehrere Codes in einem Bild enthält. In meiner täglichen Arbeit bin ich genau an diese Grenze gestoßen – bis ich den `BarCodeReader` von Aspose.BarCode entdeckt habe. Dieses Tutorial führt Sie Schritt für Schritt durch das Dekodieren jedes Barcodes in einem Bild, ermittelt, ob jeder PDF417 im kompakten (abgeschnittenen) Modus vorliegt, und verarbeitet die Ergebnisse sauber. + +Wir streuen außerdem ein paar zusätzliche Tipps ein – zum Beispiel, was zu tun ist, wenn das Bild verschiedene Barcode‑Symbologien enthält oder wenn ein Scan überhaupt keine Ergebnisse liefert. Am Ende haben Sie eine einsatzbereite Konsolen‑App, die **mehrere Barcodes in C#** wie ein Profi liest. + +## Was Sie benötigen + +Bevor wir starten, stellen Sie sicher, dass Sie Folgendes auf Ihrem Rechner haben: + +- **.NET 6.0** SDK oder neuer (der Code funktioniert auch mit .NET Framework 4.6+, aber .NET 6 ist der optimale Punkt). +- **Aspose.BarCode for .NET** NuGet‑Paket (`Install-Package Aspose.BarCode`). +- Ein Beispielbild, das **PDF417**‑Barcodes enthält – idealerweise eines, das kompakte und Voll‑Size‑Symbole mischt. Das Tutorial verwendet `CompactPdf417.png`, aber jedes PNG/JPEG funktioniert. +- Ihre bevorzugte IDE (Visual Studio, Rider oder VS Code). + +Das war’s – keine zusätzlichen DLLs, keine nativen Abhängigkeiten. Aspose.BarCode ist reiner Managed‑Code, sodass Sie es in jedes .NET‑Projekt einbinden können. + +![Mehrere Barcodes in C# – Konsolenausgabe](image.png "Mehrere Barcodes in C# – Konsolenausgabe") + +*Bildbeschreibung: Mehrere Barcodes in C# – Screenshot der Konsole, der den Kompakt‑Modus‑Status für PDF417‑Barcodes anzeigt.* + +## Schritt 1 – Installieren und Referenzieren der BarCodeReader‑C#‑Bibliothek + +Zuerst benötigen Sie die **BarCodeReader C#**‑Klasse, die das Decodieren ermöglicht. Öffnen Sie Ihr Terminal (oder die Package‑Manager‑Konsole) und führen Sie aus: + +```powershell +dotnet add package Aspose.BarCode +``` + +Oder, wenn Sie den NuGet‑Manager von Visual Studio benutzen, suchen Sie einfach nach *Aspose.BarCode* und klicken **Install**. Damit wird die neueste stabile Version (Stand Juli 2026 ist das 23.9) heruntergeladen, die PDF417, QR, DataMatrix und Dutzende weitere Symbologien unterstützt. + +Warum das wichtig ist: Die Bibliothek übernimmt das schwere Heben bei Bildverarbeitung, Fehlerkorrektur und Symbolerkennung. Sie könnten Ihren eigenen Scanner schreiben, würden aber Wochen damit verbringen, Randfälle zu behandeln. Aspose liefert Ihnen eine erprobte **C#‑Barcode‑Bibliothek**, die für moderne .NET‑Runtimes aktualisiert wurde. + +## Schritt 2 – Ein minimales Konsolen‑Projekt einrichten + +Erstellen Sie eine neue Konsolen‑App, damit wir uns auf die Barcode‑Logik ohne UI‑Lärm konzentrieren können: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Ersetzen Sie die erzeugte `Program.cs` durch das vollständige Beispiel unten. Sie können den Standard‑Namespace beibehalten oder umbenennen – es ist nichts Besonderes erforderlich. + +## Schritt 3 – Die komplette „Mehrere Barcodes in C# lesen“‑Implementierung schreiben + +Im Folgenden finden Sie ein **vollständiges, ausführbares** Code‑Beispiel. Es deckt alle vier Schritte des ursprünglichen Snippets ab, fügt Fehlerbehandlung hinzu und gibt nützliche Diagnosen aus. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Warum dieser Code funktioniert + +- **`BarCodeReader`** ist das Arbeitspferd der **BarCodeReader C#**‑API. Er öffnet das Bild, wendet Vorverarbeitung an und sucht nach Symbolen des angegebenen Typs. +- **`ReadBarCodes()`** liefert ein Array, nicht nur ein einzelnes Ergebnis. Das ist der Schlüssel zum **Mehrere Barcodes in C# lesen** – die Methode sammelt automatisch jede gefundene Übereinstimmung. +- **`result.Extended.Pdf417.IsTruncated`** gibt an, ob der PDF417 im *kompakten* (auch: abgeschnittenen) Modus vorliegt. Dieses Flag gibt es nur für PDF417, deshalb schützen wir uns mit dem null‑bedingten Operator (`?.`), um Ausnahmen zu vermeiden, falls eine andere Symbologie auftaucht. +- Die `foreach`‑Schleife gibt sowohl den dekodierten Text als auch den Kompakt‑Status aus, sodass Sie schnell prüfen können, ob alles stimmt. + +## Schritt 4 – Umgang mit verschiedenen Barcode‑Typen (optional) + +Falls Ihr Bild mehr als nur PDF417 enthalten könnte, ändern Sie einfach das zweite Argument von `BarCodeReader` zu `DecodeType.AllSupported`. Die Schleife bleibt unverändert, aber Sie müssen prüfen, ob `result.Extended` bei Nicht‑PDF417‑Symbolen null ist: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Diese kleine Anpassung verwandelt Ihre **C#‑Barcode‑Bibliothek** in einen universellen Scanner, ideal für Misch‑Symbologie‑Stapel. + +## Schritt 5 – Randfälle und Best‑Practice‑Tipps + +### 1️⃣ Keine Barcodes gefunden +Wenn `ReadBarCodes()` ein leeres Array zurückgibt, sind die häufigsten Ursachen: + +- Falscher Dateipfad oder fehlende Leseberechtigungen. +- Bildqualität zu niedrig (Unschärfe, geringer Kontrast). Erwägen Sie eine Vorverarbeitung mit `reader.ImagePreprocessingOptions` (z. B. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Extrem große Bilder +Die Verarbeitung eines 10 MP‑Fotos kann speicherintensiv sein. Sie können den Scan‑Bereich einschränken: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Thread‑Sicherheit +`BarCodeReader` implementiert `IDisposable` und ist **nicht** thread‑sicher. Erzeugen Sie separate Instanzen pro Thread, wenn Sie Parallelverarbeitung benötigen. + +### 4️⃣ Lizenzierung +Aspose.BarCode funktioniert sofort im Testmodus, zeigt jedoch ein Wasserzeichen im Ausgabebild an. Für die Produktion setzen Sie die Lizenz frühzeitig: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +Wenn Sie das in einen größeren Service integrieren, ersetzen Sie `Console.WriteLine` durch einen strukturierten Logger (Serilog, NLog). So können Sie `CodeText`, `CodeType` und `IsTruncated` als Felder für nachgelagerte Analysen erfassen. + +## Vollständiges funktionierendes Beispiel – Zusammenfassung + +Alles zusammengefügt, hier das *gesamte* Programm, das Sie in `Program.cs` einfügen können: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Was Sie als Nächstes lernen sollten + + +Die folgenden Tutorials behandeln eng verwandte Themen, die auf den in diesem Leitfaden gezeigten Techniken aufbauen. Jede Ressource enthält vollständige, funktionierende Code‑Beispiele mit Schritt‑für‑Schritt‑Erklärungen, damit Sie weitere API‑Funktionen meistern und alternative Implementierungsansätze in eigenen Projekten erkunden können. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/german/net/one-dimensional-barcode-types/_index.md b/barcode/german/net/one-dimensional-barcode-types/_index.md index b2fd5ba30..018ec49f0 100644 --- a/barcode/german/net/one-dimensional-barcode-types/_index.md +++ b/barcode/german/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ Erfahren Sie, wie Sie mit Aspose.BarCode für .NET Barcodes in .NET generieren. Erfahren Sie, wie Sie Ausnahmen beim Generieren eindimensionaler Barcodes mit Aspose.BarCode für .NET behandeln. Diese Schritt-für-Schritt-Anleitung sorgt für fehlertolerante Barcode-Lösungen. Jetzt loslegen! ### [Eindimensionale Breit-Schmal-Verhältnis-Konfiguration](./one-dimensional-wide-narrow-ratio-configuration/) Generieren Sie ganz einfach individuelle Barcodes mit Aspose.BarCode für .NET. Schritt-für-Schritt-Anleitung für die eindimensionale Breit-Schmal-Verhältniskonfiguration. +### [Barcode aus Bild lesen – C#-Barcode-Leser-Beispiel](./read-barcode-from-image-c-barcode-reader-example/) +Erfahren Sie, wie Sie mit Aspose.BarCode Barcodes aus Bildern in C# auslesen. ## Abschluss @@ -89,4 +91,4 @@ Mit diesem Artikel erwerben Sie nicht nur Kenntnisse über verschiedene eindimen {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/german/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/german/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..bf8d83ba9 --- /dev/null +++ b/barcode/german/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,277 @@ +--- +category: general +date: 2026-07-30 +description: Barcode aus Bild mit Aspose.BarCode für .NET lesen – ein vollständiges + C#‑Barcode‑Leser‑Beispiel, das zeigt, wie man Macro‑PDF417‑Barcodes dekodiert. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: de +lastmod: 2026-07-30 +og_description: Barcode aus Bild mit Aspose.BarCode für .NET lesen. Dieses Schritt‑für‑Schritt‑C#‑Beispiel + für einen Barcode‑Reader zeigt, wie man alle Macro‑PDF417‑Metadaten extrahiert. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Barcode aus Bild lesen – Vollständiges C#‑Barcode‑Leser‑Beispiel +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Barcode aus Bild auslesen – C# Barcode‑Reader‑Beispiel +url: /de/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Barcode aus Bild lesen – C# Barcode-Leser Beispiel + +Möchten Sie **Barcode aus Bild** in einer C#‑Anwendung lesen? Sie sind hier genau richtig. In diesem Tutorial führen wir Sie durch ein vollständiges *c# Barcode-Leser-Beispiel*, das die Aspose.BarCode for .NET‑Bibliothek verwendet, um einen Macro PDF417‑Barcode zu dekodieren und alle erweiterten Informationen, die der Standard bereitstellt, herauszuholen. + +Stellen Sie sich vor, Sie haben gerade ein Versandetikett, eine Bordkarte oder einen amtlichen Ausweis gescannt, der ein Macro PDF417‑Segment enthält. Sie wollen die Datei‑ID, die Segmentanzahl, Zeitstempel und vielleicht sogar den Namen des Absenders extrahieren – und das alles, ohne Ihren Code zu verlassen. Genau das werden wir erreichen, und wir tun es auf eine Weise, die sich leicht per Copy‑Paste in Ihr eigenes Projekt einfügen lässt. + +--- + +## Was Sie lernen werden + +- Wie man das Aspose.BarCode NuGet‑Paket zu einem .NET‑Projekt hinzufügt. +- Wie man eine Bilddatei öffnet, die einen Macro PDF417‑Barcode enthält. +- Wie man über **Barcode aus Bild lesen**‑Ergebnisse iteriert und auf jedes erweiterte Feld zugreift. +- Tipps zum Umgang mit mehreren Segmenten, zur Validierung von Prüfsummen und zur Fehlersuche bei häufigen Stolperfallen. + +Am Ende dieses Leitfadens haben Sie eine funktionierende Konsolen‑App, die alle Macro PDF417‑Metadaten ausgibt und bereit ist, in größere Systeme wie Bestandsverfolgungen oder Dokumenten‑Management‑Pipelines integriert zu werden. + +--- + +## Voraussetzungen + +| Anforderung | Warum es wichtig ist | +|-------------|----------------------| +| .NET 6.0 SDK oder neuer (jede aktuelle Version funktioniert) | Stellt die Laufzeit für die Konsolen‑App bereit. | +| Visual Studio 2022 (oder VS Code mit C#‑Erweiterung) | Macht das Bearbeiten und Debuggen mühelos. | +| Aspose.BarCode for .NET (Kostenlose Testversion oder lizenziert) | Die Bibliothek, die den Barcode tatsächlich dekodiert. | +| Eine Bilddatei (`MacroPdf417Meta.png`), die einen Macro PDF417‑Barcode enthält | Die Quelle, die wir auslesen werden. | + +Wenn Sie Aspose.BarCode noch nicht haben, können Sie es über NuGet beziehen: + +```bash +dotnet add package Aspose.BarCode +``` + +Diese einzelne Zeile installiert alles, was Sie benötigen, einschließlich `BarCodeReader`, `DecodeType` und dem umfangreichen `Extended`‑Eigenschaftssatz, den wir untersuchen werden. + +--- + +## Schritt 1 – Projekt einrichten und Bibliothek importieren + +Erstellen Sie ein frisches Konsolen‑Projekt (oder fügen Sie den Code in ein bestehendes ein). Die `using`‑Direktiven sind essenziell; sie bringen die Barcode‑Klassen in den Gültigkeitsbereich. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro‑Tipp:** Wenn Sie Visual Studio verwenden, bietet die IDE an, die fehlenden `using`‑Anweisungen automatisch hinzuzufügen – einfach *Ctrl+.`* drücken. + +--- + +## Schritt 2 – Bildpfad vorbereiten + +Ein hartkodierter absoluter Pfad funktioniert für eine schnelle Demo, aber in der Produktion würden Sie wahrscheinlich ein Befehlszeilen‑Argument oder eine Konfiguration akzeptieren. Zur Übersicht halten wir es einfach: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Warum das wichtig ist:** Der `BarCodeReader` erwartet einen gültigen Dateipfad; ein falscher Pfad löst eine `FileNotFoundException` aus, bevor überhaupt dekodiert wird. + +--- + +## Schritt 3 – **Barcode aus Bild lesen** und Macro PDF417‑Details extrahieren + +Jetzt kommt das Herzstück des **c# Barcode-Leser-Beispiels**. Wir instanziieren `BarCodeReader` mit dem Flag `DecodeType.MacroPdf417`, durchlaufen alle Ergebnisse (es kann mehr als ein Barcode in einem Bild sein) und geben jede erweiterte Eigenschaft aus. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Was der Code macht (warum, nicht nur wie) + +1. **`using`‑Block** – Garantiert, dass native Ressourcen (Dateihandles, nativer Decoder‑Speicher) sofort nach dem Vorgang freigegeben werden. Das Überspringen kann zu gesperrten Dateien unter Windows führen. +2. **`DecodeType.MacroPdf417`** – Teilt Aspose mit, gezielt nach Macro PDF417‑Symbolen zu suchen; andere Barcode‑Typen werden ignoriert, was das Scannen beschleunigt. +3. **`ReadBarCodes()`** – Gibt eine Sammlung zurück, weil ein Bild mehrere Macro PDF417‑Segmente enthalten kann (denken Sie an ein mehrseitiges Dokument, das über mehrere Barcodes verteilt ist). +4. **`macroResult.Extended?.Pdf417`** – Das `Extended`‑Objekt ist nullable; der Safe‑Navigation‑Operator (`?.`) verhindert eine `NullReferenceException`, falls der Barcode keine erweiterten Daten enthält. +5. **Ausgabe jedes Feldes** – Gibt Ihnen Einblick in die Datei‑Kennung, Segmentreihenfolge, Prüfsummen‑Verifizierung und optionale Textfelder wie Absender oder Empfänger. + +--- + +## Schritt 4 – Anwendung ausführen und Ausgabe überprüfen + +Kompilieren und führen Sie das Programm aus: + +```bash +dotnet run +``` + +Wenn alles korrekt verkabelt ist, sollten Sie in Ihrer Konsole etwa Folgendes sehen: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Hinweis:** Die genauen Werte hängen vom Barcode ab, den Sie dekodieren. Wenn Sie „No Macro PDF417 extension data found“ erhalten, prüfen Sie, ob das Bild tatsächlich einen Macro PDF417‑Code enthält und ob Sie den richtigen `DecodeType` verwenden. + +--- + +## Umgang mit mehreren Segmenten und Validierung (fortgeschritten) + +Macro PDF417 ist für große Datenmengen konzipiert, die über mehrere Symbole verteilt werden. Wenn Sie mehr als ein Segment finden, müssen Sie typischerweise: + +1. **Alle Segmente** in einem Dictionary sammeln, das nach `SegmentID` indiziert ist. +2. **Sortieren** nach `SegmentID`, um die Originaldatei wieder zusammenzusetzen. +3. **Validieren** die `Checksum` gegen die zusammengefügte Nutzlast (Aspose erledigt das intern, Sie können jedoch bei Bedarf eine CRC erneut ausführen). + +Hier ein kurzer Entwurf: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Sie müssen `AssembleSegments` und `VerifyChecksum` basierend auf Ihrem Payload‑Format implementieren – meist ist das einfach eine Byte‑Array‑Konkatenation gefolgt von einer CRC‑16‑Prüfung. + +--- + +## Häufige Fallstricke und wie man sie vermeidet + +| Symptom | Wahrscheinliche Ursache | Lösung | +|---------|--------------------------|--------| +| `null` returned from `macroResult.Extended` | Bild enthält ein einfaches PDF417, nicht die Macro‑Version. | Verwenden Sie `DecodeType.Pdf417` stattdessen oder prüfen Sie den Quell‑Barcode. | +| No output at all | `imagePath` falsch oder Datei nicht zugänglich. | Pfad erneut prüfen; sicherstellen, dass die App Leseberechtigungen hat. | +| Exception “Object disposed” | Versuch, `reader` nach dem `using`‑Block zu benutzen. | Alle Verarbeitung innerhalb des ` | + +--- + +## Was sollten Sie als Nächstes lernen? + +Die folgenden Tutorials behandeln eng verwandte Themen, die auf den in diesem Leitfaden gezeigten Techniken aufbauen. Jede Ressource enthält vollständige, funktionierende Code‑Beispiele mit Schritt‑für‑Schritt‑Erklärungen, um Ihnen zu helfen, weitere API‑Funktionen zu meistern und alternative Implementierungsansätze in Ihren eigenen Projekten zu erkunden. + +- [DataMatrix‑Reader‑Programmierung mit Aspose.BarCode für .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode‑Reader‑Initialisierung mit Aspose.BarCode für .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Wie man DataMatrix‑Barcodes mit Aspose.BarCode für .NET liest](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/greek/net/compact-pdf417-encoding/_index.md b/barcode/greek/net/compact-pdf417-encoding/_index.md index 06b8d9294..7b3dba501 100644 --- a/barcode/greek/net/compact-pdf417-encoding/_index.md +++ b/barcode/greek/net/compact-pdf417-encoding/_index.md @@ -46,7 +46,7 @@ weight: 29 - **Λειτουργία Συμπαγούς:** Αφαιρεί περιττές προσθήκες, δημιουργώντας έναν μικρότερο κώδικα χωρίς να θυσιάζει την αναγνωσιμότητα. ### Επιλογές Διόρθωσης Σφαλμάτων PDF417 -Το Aspose.BarCode σας επιτρέπει να ορίσετε την ιδιότητα `Pdf417ErrorCorrectionLevel` (0‑8). Τα υψηλότερα επίπεδα αυξάνουν τον πλεονασμό, κάτι χρήσιμο σε σκληρά περιβάλλοντα όπως η βιομηχανική σάρωση. Επιλέξτε επίπεδο βάσει της ανοχή σας στον κίνδυνο και των περιορισμών χώρου. +Το Aspose.BarCode σας επιτρέπει να ορίσετε την ιδιότητα `Pdf417ErrorCorrectionLevel` (0‑8). Τα υψηλότερα επίπεδα αυξάνουν τον πλεονασμό, κάτι χρήσιμο σε σκληρά περιβάλλοντα όπως η βιομηχανική σάρωση. Επιλέξτε επίπεδο βάσει της ανοχής σας στον κίνδυνο και των περιορισμών χώρου. ## Δημιουργία Συμπαγών PDF417 Κωδικών με το Aspose.BarCode for .NET @@ -85,6 +85,10 @@ weight: 29 ## Συμμετοχικά Σεμινάρια Συμπαγούς PDF417 ### [Δημιουργία Συμπαγών PDF417 Κωδικών](./compact-pdf417-basic-configuration/) Μάθετε πώς να δημιουργείτε Συμπαγείς PDF417 κωδικούς χρησιμοποιώντας το Aspose.BarCode for .NET. Αναλυτικός οδηγός με βήμα‑βήμα οδηγίες και παραδείγματα κώδικα. +### [Πώς να Δημιουργήσετε Εικόνα Barcode PDF417 σε C# με το Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Μάθετε πώς να δημιουργήσετε εικόνα κώδικα PDF417 σε C# χρησιμοποιώντας το Aspose. +### [Ανάγνωση Πολλαπλών Barcode C# – Πλήρης Οδηγός με PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Μάθετε πώς να διαβάζετε πολλαπλούς κωδικούς, συμπεριλαμβανομένου PDF417, σε εφαρμογές C# με το Aspose.BarCode. ## Συχνές Ερωτήσεις @@ -98,7 +102,7 @@ weight: 29 Α: Ναι. Το Aspose.BarCode for .NET υποστηρίζει πλήρως το .NET Core 3.1 και μεταγενέστερες εκδόσεις. **Ε: Είναι δυνατόν να προσαρμόσω τα χρώματα προσκηνίου και φόντου του κώδικα;** -Α: Απολύτως. Χρησιμοποιήστε τις ιδιότητες `ForeColor` και `BackColor` του γεννήτρια για να ταιριάξετε το θέμα της διεπαφής σας. +Α: Απόλυτα. Χρησιμοποιήστε τις ιδιότητες `ForeColor` και `BackColor` του γεννήτρια για να ταιριάξετε το θέμα της διεπαφής σας. **Ε: Πρέπει να εγκαταστήσω επιπλέον γραμματοσειρές ή πόρους;** Α: Δεν απαιτούνται εξωτερικές γραμματοσειρές· η βιβλιοθήκη διαχειρίζεται όλη την απόδοση εσωτερικά. @@ -114,4 +118,4 @@ weight: 29 {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/greek/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/greek/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..495d22b88 --- /dev/null +++ b/barcode/greek/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C# με το Aspose. Μάθετε + βήμα‑βήμα πώς να δημιουργήσετε barcode με το Aspose, να ορίσετε τα μεταδεδομένα + MacroPDF417 και να το αποθηκεύσετε ως PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: el +lastmod: 2026-07-30 +og_description: Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C# με το Aspose. Ακολουθήστε + αυτόν τον πλήρη οδηγό για να δημιουργήσετε ένα barcode με το Aspose, να διαμορφώσετε + τα μεταδεδομένα MacroPDF417 και να εξάγετε ένα αρχείο PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C# με το Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C# με το Aspose +url: /el/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C# με το Aspose + +Η δημιουργία εικόνας barcode PDF417 σε C# με το Aspose αποτελεί συχνό εμπόδιο για όποιον ασχολείται με κωδικοποίηση δεδομένων υψηλής πυκνότητας. Σε αυτόν τον οδηγό θα περάσουμε βήμα‑βήμα από τη ρύθμιση του γεννήτριας, τη ρύθμιση των μεταδεδομένων MacroPDF417, μέχρι την αποθήκευση ενός καθαρού αρχείου PNG. + +Αν έχετε προσπαθήσει ποτέ να **generate barcode image c#** και καταλήξατε με ένα κενό καμβά ή μια μη αναγνώσιμη σάρωση, δεν είστε μόνοι. Τα καλά νέα είναι ότι το Aspose.BarCode κάνει τη διαδικασία σχεδόν άσκοπη, και στο τέλος αυτού του άρθρου θα μπορείτε να **create barcode with Aspose** για οποιαδήποτε επιχειρησιακή ροή εργασίας. + +## Τι θα μάθετε + +- Εγκατάσταση και αναφορά της βιβλιοθήκης Aspose.BarCode για .NET. +- Αρχικοποίηση ενός γεννήτρια PDF417 με προσαρμοσμένο payload. +- Εφαρμογή πεδίων ειδικών για MacroPDF417 όπως file ID, segment ID και timestamp. +- Εξαγωγή του αποτελέσματος σε εικόνα PNG που μπορείτε να ενσωματώσετε σε αναφορές ή κινητές εφαρμογές. +- Συμβουλές για την αντιμετώπιση κοινών προβλημάτων (π.χ. λανθασμένο πλάτος μονάδας, ελλιπή τμήματα). + +Δεν απαιτείται προηγούμενη εμπειρία με MacroPDF417· μια βασική κατανόηση του C# και του Visual Studio αρκεί. + +## Προαπαιτούμενα + +| Απαίτηση | Αιτία | +|----------|-------| +| .NET 6.0 ή νεότερο | Η τρέχουσα LTS έκδοση, πλήρως υποστηριζόμενη από το Aspose | +| Visual Studio 2022 (ή οποιοδήποτε IDE) | Για τη μεταγλώττιση και εκτέλεση του δείγματος | +| Aspose.BarCode for .NET (NuGet) | Παρέχει `BarcodeGenerator` και υποστήριξη PDF417 | + +Μπορείτε να προσθέσετε τη βιβλιοθήκη μέσω NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Τώρα που το υπόβαθρο είναι έτοιμο, ας βουτήξουμε στον κώδικα. + +## Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C# – Ρυθμίσεις + +Το πρώτο που κάνουμε είναι η δημιουργία ενός αντικειμένου `BarcodeGenerator` για τον τύπο κωδικοποίησης **MacroPdf417**. Αυτό το αντικείμενο περιέχει όλες τις επιλογές διαμόρφωσης, από το μέγεθος των μονάδων μέχρι τα πλούσια μεταδεδομένα που απαιτούνται από το MacroPDF417. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Γιατί αυτό είναι σημαντικό:** `EncodeTypes.MacroPdf417` λέει στο Aspose να παραγάγει ένα barcode PDF417 που μπορεί να χωριστεί σε πολλαπλά τμήματα· μια απαραίτητη λειτουργία για μεγάλα αρχεία ή επεξεργασία παρτίδων. + +## Διαμόρφωση βασικής εμφάνισης + +Ένα αναγνώσιμο barcode ξεκινά με τις σωστές οπτικές ρυθμίσεις. Η `XDimension` ελέγχει το πλάτος κάθε μονάδας (τα μικρά μαύρα/λευκά τετράγωνα), ενώ η `Columns` καθορίζει πόσες στήλες θα καταλάβει το barcode. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Συμβουλή:** Αν το barcode φαίνεται πολύ πυκνό σε εκτυπωτή αποδείξεων, αυξήστε το `XDimension` σε `3` ή `4`. +- **Πιθανό πρόβλημα:** Ορισμός πολύ μικρής τιμής για το `Columns` μπορεί να προκαλέσει υπερχείλιση του barcode εκτός των ορίων της εικόνας, με αποτέλεσμα μη αναγνώσιμη σάρωση. + +## Ορισμός μεταδεδομένων MacroPDF417 + +Το MacroPDF417 σας επιτρέπει να ενσωματώσετε πληροφορίες επιπέδου αρχείου απευθείας στο barcode. Αυτό είναι ιδανικό για την παρακολούθηση αποστολών μεγάλων εγγράφων ή για τη διάσπαση ενός αρχείου σε πολλαπλές σάρωσεις. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Τι κάνει κάθε πεδίο:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | Μοναδικός αναγνωριστής για ολόκληρο το αρχείο. | +| `MacroPdf417SegmentID` | Δείκτης του τρέχοντος τμήματος (αρχίζει από 0). | +| `MacroPdf417SegmentsCount` | Συνολικός αριθμός τμημάτων στα οποία χωρίζεται το αρχείο. | +| `MacroPdf417FileName` | Ανθρώπινα αναγνώσιμο όνομα, χρήσιμο για αρχεία ελέγχου. | +| `MacroPdf417Checksum` | 16‑bit CRC για επαλήθευση ακεραιότητας δεδομένων. | +| `MacroPdf417FileSize` | Αρχικό μέγεθος αρχείου σε bytes, βοηθά τους παραλήπτες να δεσμεύσουν κατάλληλα buffers. | +| `MacroPdf417TimeStamp` | Ημερομηνία/ώρα δημιουργίας του αρχείου. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Προαιρετικές συμβολοσειρές για την ταυτοποίηση αποστολέα/παραλήπτη. | +| `MacroPdf417Terminator` | Σημαδεύει το τελευταίο τμήμα· απαιτείται για σωστή αποκωδικοποίηση. | + +> **Γιατί να το κάνετε;** Χωρίς αυτά τα πεδία, ένας σαρωτής μπορεί να διαβάσει μόνο τα ακατέργαστα δεδομένα, χωρίς το συμφραζόμενο. Η προσθήκη μεταδεδομένων επιτρέπει στο σύστημα λήψης να επανασυνθέσει αυτόματα το αρχικό αρχείο. + +## Αποθήκευση του barcode ως PNG + +Μόλις ο γεννήτορας είναι πλήρως διαμορφωμένος, η αποθήκευση της εικόνας γίνεται με μία γραμμή κώδικα: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Μορφή αρχείου:** Το PNG είναι lossless, διασφαλίζοντας ότι κάθε μονάδα παραμένει ευκρινής για τους σαρωτές. +- **Εναλλακτική:** Χρησιμοποιήστε `BarCodeImageFormat.Jpeg` αν χρειάζεστε μικρότερο μέγεθος αρχείου, αλλά περιμένετε μικρή απώλεια στην αναγνωσιμότητα. + +### Αναμενόμενο αποτέλεσμα + +Αφού εκτελέσετε το απόσπασμα, θα βρείτε το αρχείο `MacroPdf417Meta.png` στον καθορισμένο φάκελο. Θα πρέπει να μοιάζει με την παρακάτω εικονογράφηση: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Πώς να δημιουργήσετε εικόνα barcode PDF417 σε C#"} + +Η εικόνα περιέχει ένα πυκνό πλέγμα μαύρων και λευκών τετραγώνων, με το κωδικοποιημένο payload και τα μεταδεδομένα MacroPDF417 ενσωματωμένα. + +## Πλήρες λειτουργικό παράδειγμα + +Παρακάτω βρίσκεται το πλήρες, έτοιμο για αντιγραφή πρόγραμμα. Συγκομποιείται με οποιοδήποτε έργο .NET 6+ και απαιτεί μόνο το πακέτο NuGet Aspose.BarCode. + + + +## Τι πρέπει να μάθετε στη συνέχεια; + +Τα παρακάτω tutorials καλύπτουν στενά σχετικές θεματικές που επεκτείνουν τις τεχνικές που παρουσιάστηκαν σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικό κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσει να κυριαρχήσετε πρόσθετες δυνατότητες API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε Barcode – Compact PDF417 με Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Πώς να δημιουργήσετε DataMatrix Barcodes (ECC 200) με Aspose.BarCode για .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Πώς να δημιουργήσετε Aztec barcode με προσαρμοσμένη αναλογία διαστάσεων χρησιμοποιώντας Aspose.BarCode για .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/greek/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/greek/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..0a3c61d16 --- /dev/null +++ b/barcode/greek/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Διαβάστε πολλαπλούς κωδικούς γραμμής C# χρησιμοποιώντας το Aspose.BarCode. + Μάθετε βήμα‑βήμα πώς να αποκωδικοποιήσετε PDF417, να εντοπίσετε τη συμπαγή λειτουργία + και να διαχειριστείτε πολλούς κωδικούς γραμμής σε μία εικόνα. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: el +lastmod: 2026-07-30 +og_description: Διαβάστε πολλαπλούς γραμμικούς κώδικες C# με το Aspose.BarCode. Αυτός + ο οδηγός σας δείχνει πώς να αποκωδικοποιήσετε όλους τους γραμμικούς κώδικες σε μια + εικόνα, να ελέγξετε τη λειτουργία compact και να ενσωματώσετε σε εφαρμογές .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Ανάγνωση πολλαπλών γραμμωτών κωδίκων C# – Πλήρης οδηγός για PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Ανάγνωση Πολλαπλών Γραμμωτών Κωδίκων C# – Πλήρης Οδηγός με PDF417 +url: /el/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Ανάγνωση Πολλαπλών Barcode C# – Πλήρης Οδηγός με PDF417 + +Έχετε αναρωτηθεί ποτέ πώς να **διαβάσετε πολλαπλά barcode C#** από μία μόνο εικόνα; Ίσως έχετε μια δέσμη ετικετών αποστολής, ένα κολάζ εισιτηρίων ή ένα έγγραφο PDF417 που περιέχει αρκετούς κώδικες σε μία φωτογραφία. Στην καθημερινή μου δουλειά, αντιμετώπισα ακριβώς αυτό το πρόβλημα—μέχρι που ανακάλυψα το `BarCodeReader` του Aspose.BarCode. Αυτό το tutorial θα σας καθοδηγήσει στη αποκωδικοποίηση κάθε barcode σε μια εικόνα, στον εντοπισμό του αν κάθε PDF417 είναι σε συμπαγή (truncated) λειτουργία, και στη σωστή διαχείριση των αποτελεσμάτων. + +Θα προσθέσουμε επίσης μερικές επιπλέον συμβουλές—όπως τι να κάνετε όταν η εικόνα περιέχει διαφορετικές συμβολές barcode, ή όταν μια σάρωση δεν επιστρέφει κανένα αποτέλεσμα. Στο τέλος θα έχετε μια έτοιμη για εκτέλεση εφαρμογή console που **διαβάζει πολλαπλά barcode C#** σαν επαγγελματίας. + +## Τι Θα Χρειαστείτε + +Πριν ξεκινήσουμε, βεβαιωθείτε ότι έχετε τα παρακάτω στο μηχάνημά σας: + +- **.NET 6.0** SDK ή νεότερο (ο κώδικας λειτουργεί επίσης με .NET Framework 4.6+, αλλά το .NET 6 είναι η ιδανική επιλογή). +- **Aspose.BarCode for .NET** πακέτο NuGet (`Install-Package Aspose.BarCode`). +- Ένα δείγμα εικόνας που περιέχει **PDF417** barcode—κατά προτίμηση μια που συνδυάζει συμπαγή και πλήρους μεγέθους σύμβολα. Το tutorial χρησιμοποιεί το `CompactPdf417.png`, αλλά οποιοδήποτε PNG/JPEG θα δουλέψει. +- Το αγαπημένο σας IDE (Visual Studio, Rider ή VS Code). + +Αυτό είναι όλο—χωρίς επιπλέον DLLs, χωρίς εγγενείς εξαρτήσεις. Το Aspose.BarCode είναι καθαρά managed code, οπότε μπορείτε να το ενσωματώσετε σε οποιοδήποτε .NET project. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Κείμενο alt εικόνας: Ανάγνωση πολλαπλών barcode C# – στιγμιότυπο οθόνης console που εμφανίζει την κατάσταση συμπαγούς λειτουργίας για barcode PDF417.* + +## Βήμα 1 – Εγκατάσταση και Αναφορά της Βιβλιοθήκης BarCodeReader C# + +Πρώτα απ' όλα, χρειάζεστε την κλάση **BarCodeReader C#** που τροφοδοτεί την αποκωδικοποίηση. Ανοίξτε το τερματικό σας (ή το Package Manager Console) και τρέξτε: + +```powershell +dotnet add package Aspose.BarCode +``` + +Ή, αν βρίσκεστε μέσα στον NuGet manager του Visual Studio, απλώς ψάξτε για *Aspose.BarCode* και πατήστε **Install**. Αυτό θα κατεβάσει την πιο πρόσφατη σταθερή έκδοση (από τον Ιούλιο 2026 είναι η 23.9), η οποία υποστηρίζει PDF417, QR, DataMatrix και δεκάδες άλλες συμβολές. + +Γιατί είναι σημαντικό: η βιβλιοθήκη αφαιρεί το βάρος της επεξεργασίας εικόνας, της διόρθωσης σφαλμάτων και της αναγνώρισης συμβόλων. Θα μπορούσατε να γράψετε το δικό σας scanner, αλλά θα ξοδέψετε εβδομάδες κυνηγώντας edge‑cases. Το Aspose σας προσφέρει μια δοκιμασμένη, **C# barcode library** που έχει ενημερωθεί για σύγχρονες .NET εκδόσεις. + +## Βήμα 2 – Δημιουργία Ελάχιστου Project Console + +Δημιουργήστε μια νέα εφαρμογή console ώστε να εστιάσουμε μόνο στη λογική του barcode χωρίς περιττό UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Αντικαταστήστε το παραγόμενο `Program.cs` με το πλήρες παράδειγμα παρακάτω. Μπορείτε να κρατήσετε το προεπιλεγμένο namespace ή να το μετονομάσετε—δεν απαιτείται κάτι ιδιαίτερο. + +## Βήμα 3 – Υλοποίηση του Πλήρους “Read Multiple Barcodes C#” + +Παρακάτω υπάρχει ένα **πλήρες, εκτελέσιμο** δείγμα κώδικα. Καλύπτει όλα τα τέσσερα βήματα από το αρχικό απόσπασμα, προσθέτει διαχείριση σφαλμάτων και εκτυπώνει χρήσιμες διαγνώσεις. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Γιατί Λειτουργεί Αυτός ο Κώδικας + +- **`BarCodeReader`** είναι το κεντρικό στοιχείο του **BarCodeReader C#** API. Ανοίγει την εικόνα, εφαρμόζει προεπεξεργασία και ψάχνει για σύμβολα του τύπου που καθορίζετε. +- **`ReadBarCodes()`** επιστρέφει έναν πίνακα, όχι μόνο ένα μοναδικό αποτέλεσμα. Αυτό είναι το κλειδί για **ανάγνωση πολλαπλών barcode C#**—η μέθοδος συλλέγει αυτόματα κάθε αντιστοίχηση που βρίσκει. +- **`result.Extended.Pdf417.IsTruncated`** μας λέει αν το PDF417 είναι σε *συμπαγή* (δηλαδή truncated) λειτουργία. Αυτή η σημαία υπάρχει μόνο για PDF417, γι' αυτό χρησιμοποιούμε τον τελεστή null‑conditional (`?.`) ώστε να αποφύγουμε εξαιρέσεις αν εμφανιστεί άλλη συμβολή. +- Ο βρόχος `foreach` εκτυπώνει τόσο το αποκωδικοποιημένο κείμενο όσο και την κατάσταση συμπαγούς λειτουργίας, παρέχοντας έναν γρήγορο έλεγχο. + +## Βήμα 4 – Διαχείριση Διαφορετικών Τύπων Barcode (Προαιρετικό) + +Αν η εικόνα σας μπορεί να περιέχει περισσότερα από PDF417, απλώς αλλάξτε το δεύτερο όρισμα του `BarCodeReader` σε `DecodeType.AllSupported`. Ο βρόχος παραμένει ίδιος, αλλά θα πρέπει να ελέγχετε αν το `result.Extended` είναι null για μη‑PDF417 σύμβολα: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Αυτή η μικρή τροποποίηση μετατρέπει τη **C# barcode library** σας σε έναν καθολικό scanner, ιδανικό για παρτίδες με μικτές συμβολές. + +## Βήμα 5 – Edge Cases και Συμβουλές Καλών Πρακτικών + +### 1️⃣ Δεν Εντοπίστηκαν Barcode +Αν το `ReadBarCodes()` επιστρέψει έναν κενό πίνακα, οι πιο συνηθισμένοι λόγοι είναι: + +- Λάθος διαδρομή αρχείου ή έλλειψη δικαιωμάτων ανάγνωσης. +- Ποιότητα εικόνας πολύ χαμηλή (θολή, χαμηλή αντίθεση). Σκεφτείτε προεπεξεργασία με `reader.ImagePreprocessingOptions` (π.χ., `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Πολύ Μεγάλες Εικόνες +Η επεξεργασία μιας φωτογραφίας 10 MP μπορεί να καταναλώσει πολύ μνήμη. Μπορείτε να περιορίσετε την περιοχή σάρωσης: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Ασφάλεια σε Πολυνηματική Εκτέλεση +`BarCodeReader` υλοποιεί `IDisposable` και **δεν** είναι thread‑safe. Δημιουργήστε ξεχωριστές στιγμές ανά νήμα αν χρειάζεστε παράλληλη επεξεργασία. + +### 4️⃣ Άδεια Χρήσης +Το Aspose.BarCode λειτουργεί σε δοκιμαστική λειτουργία αμέσως, αλλά θα δείτε υδατογράφημα στην έξοδο εικόνας. Για παραγωγική χρήση, ορίστε την άδεια νωρίς: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Καταγραφή (Logging) +Όταν ενσωματώνετε αυτόν τον κώδικα σε μεγαλύτερη υπηρεσία, αντικαταστήστε το `Console.WriteLine` με έναν δομημένο logger (Serilog, NLog). Έτσι μπορείτε να καταγράψετε τα `CodeText`, `CodeType` και `IsTruncated` ως πεδία για downstream analytics. + +## Πλήρες Παράδειγμα Εργασίας + +Συνδυάζοντας όλα τα παραπάνω, εδώ είναι το *ολόκληρο* πρόγραμμα που μπορείτε να αντιγράψετε‑επικολλήσετε στο `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Τι Θα Πρέπει Να Μάθετε Στη Σύντομη Μελλοντική Στιγμή; + + +Τα παρακάτω tutorials καλύπτουν στενά σχετιζόμενα θέματα που επεκτείνουν τις τεχνικές που παρουσιάζονται σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικό κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσει να κυριαρχήσετε πρόσθετα χαρακτηριστικά του API και να εξερευνήσετε εναλλακτικές προσεγγίσεις στα δικά σας projects. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/greek/net/one-dimensional-barcode-types/_index.md b/barcode/greek/net/one-dimensional-barcode-types/_index.md index 42905c3b2..424f00290 100644 --- a/barcode/greek/net/one-dimensional-barcode-types/_index.md +++ b/barcode/greek/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ url: /el/net/one-dimensional-barcode-types/ Μάθετε πώς να χειρίζεστε τις εξαιρέσεις κατά τη δημιουργία μονοδιάστατων γραμμωτών κωδίκων χρησιμοποιώντας το Aspose.BarCode για .NET. Αυτός ο οδηγός βήμα προς βήμα διασφαλίζει λύσεις γραμμωτού κώδικα ανεκτικές σε σφάλματα. Ξεκινήστε τώρα! ### [Μονοδιάστατη διαμόρφωση ευρείας-στενής αναλογίας](./one-dimensional-wide-narrow-ratio-configuration/) Δημιουργήστε εύκολα προσαρμοσμένους γραμμικούς κώδικες με το Aspose.BarCode για .NET. Οδηγός βήμα προς βήμα για μονοδιάστατη διαμόρφωση ευρείας-στενής αναλογίας. +### [Ανάγνωση barcode από εικόνα – Παράδειγμα αναγνώστη C#](./read-barcode-from-image-c-barcode-reader-example/) +Μάθετε πώς να διαβάζετε γραμμωτούς κώδικες από εικόνα σε C# χρησιμοποιώντας το Aspose.BarCode. ## συμπέρασμα @@ -89,4 +91,4 @@ url: /el/net/one-dimensional-barcode-types/ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/greek/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/greek/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..a8ce4b752 --- /dev/null +++ b/barcode/greek/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,283 @@ +--- +category: general +date: 2026-07-30 +description: Ανάγνωση barcode από εικόνα με το Aspose.BarCode για .NET – ένα πλήρες + παράδειγμα αναγνώστη barcode σε C# που δείχνει πώς να αποκωδικοποιήσετε τα Macro + PDF417 barcode. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: el +lastmod: 2026-07-30 +og_description: Διαβάστε barcode από εικόνα με το Aspose.BarCode για .NET. Αυτό το + βήμα‑βήμα παράδειγμα αναγνώστη barcode σε C# δείχνει πώς να εξάγετε όλα τα μεταδεδομένα + Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Ανάγνωση γραμμωτού κώδικα από εικόνα – Πλήρες παράδειγμα αναγνώστη γραμμωτού + κώδικα σε C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Ανάγνωση γραμμωτού κώδικα από εικόνα – Παράδειγμα αναγνώστη γραμμωτού κώδικα + σε C# +url: /el/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Ανάγνωση barcode από εικόνα – Παράδειγμα ανάγνωσης barcode σε C# + +Χρειάζεστε **ανάγνωση barcode από εικόνα** σε μια εφαρμογή C#; Βρίσκεστε στο σωστό μέρος. Σε αυτό το tutorial θα περάσουμε από ένα πλήρες *c# barcode reader example* που χρησιμοποιεί τη βιβλιοθήκη Aspose.BarCode for .NET για να αποκωδικοποιήσει ένα Macro PDF417 barcode και να εξάγει κάθε κομμάτι εκτεταμένης πληροφορίας που παρέχει το πρότυπο. + +Φανταστείτε ότι μόλις σκανάρατε μια ετικέτα αποστολής, μια κάρτα επιβίβασης ή ένα κυβερνητικό έγγραφο που ενσωματώνει ένα τμήμα Macro PDF417. Θέλετε να εξάγετε το ID του αρχείου, τον αριθμό τμημάτων, τις χρονικές σφραγίδες και ίσως ακόμη και το όνομα του αποστολέα—όλα χωρίς να βγείτε από τον κώδικά σας. Αυτό ακριβώς θα πετύχουμε, και θα το κάνουμε με τρόπο που είναι εύκολο να αντιγραφεί‑και‑επικολληθεί στο δικό σας project. + +--- + +## Τι θα μάθετε + +- Πώς να προσθέσετε το πακέτο NuGet Aspose.BarCode σε ένα project .NET. +- Πώς να ανοίξετε ένα αρχείο εικόνας που περιέχει ένα Macro PDF417 barcode. +- Πώς να επαναλάβετε τα αποτελέσματα **read barcode from image** και να έχετε πρόσβαση σε κάθε εκτεταμένο πεδίο. +- Συμβουλές για τη διαχείριση πολλαπλών τμημάτων, την επικύρωση των ελέγχων αθροίσματος και την αντιμετώπιση κοινών προβλημάτων. + +Στο τέλος αυτού του οδηγού θα έχετε μια λειτουργική εφαρμογή κονσόλας που εκτυπώνει όλα τα μεταδεδομένα Macro PDF417, έτοιμη να ενσωματωθεί σε μεγαλύτερα συστήματα όπως παρακολούθηση αποθεμάτων ή pipelines διαχείρισης εγγράφων. + +--- + +## Προαπαιτούμενα + +Πριν ξεκινήσουμε, βεβαιωθείτε ότι έχετε τα εξής: + +| Απαίτηση | Γιατί είναι σημαντικό | +|-------------|----------------| +| .NET 6.0 SDK ή νεότερο (οποιαδήποτε πρόσφατη έκδοση λειτουργεί) | Παρέχει το runtime για την εφαρμογή κονσόλας. | +| Visual Studio 2022 (ή VS Code με επέκταση C#) | Κάνει την επεξεργασία και την αποσφαλμάτωση εύκολη. | +| Aspose.BarCode for .NET (δωρεάν δοκιμή ή με άδεια) | Η βιβλιοθήκη που πραγματικά αποκωδικοποιεί το barcode. | +| Ένα αρχείο εικόνας (`MacroPdf417Meta.png`) που περιέχει ένα Macro PDF417 barcode | Η πηγή από την οποία θα διαβάσουμε. | + +Αν δεν έχετε ήδη το Aspose.BarCode, μπορείτε να το κατεβάσετε από το NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Αυτή η μοναδική γραμμή εγκαθιστά όλα όσα χρειάζεστε, συμπεριλαμβανομένων των `BarCodeReader`, `DecodeType` και του πλούσιου συνόλου ιδιοτήτων `Extended` που θα εξερευνήσουμε. + +--- + +## Βήμα 1 – Ρύθμιση του project και εισαγωγή της βιβλιοθήκης + +Δημιουργήστε ένα νέο project κονσόλας (ή ενσωματώστε τον κώδικα σε ένα υπάρχον). Οι οδηγίες `using` είναι απαραίτητες· φέρνουν τις κλάσεις barcode στο scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Αν χρησιμοποιείτε το Visual Studio, το IDE θα προσφέρει αυτόματα την προσθήκη των ελλιπών δηλώσεων `using`—απλώς πατήστε *Ctrl+.`*. + +--- + +## Βήμα 2 – Προετοιμασία της διαδρομής εικόνας + +Η σκληρή κωδικοποίηση (hard‑coding) μιας απόλυτης διαδρομής λειτουργεί για μια γρήγορη επίδειξη, αλλά στην παραγωγή πιθανότατα θα δεχόσαστε ένα όρισμα γραμμής εντολών ή μια ρύθμιση παραμέτρων. Για σαφήνεια θα το κρατήσουμε απλό: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** Ο `BarCodeReader` απαιτεί μια έγκυρη τοποθεσία αρχείου· εσφαλμένη διαδρομή προκαλεί `FileNotFoundException` πριν ξεκινήσει η αποκωδικοποίηση. + +--- + +## Βήμα 3 – **Read barcode from image** και εξαγωγή λεπτομερειών Macro PDF417 + +Τώρα έρχεται η καρδιά του **c# barcode reader example**. Θα δημιουργήσουμε ένα `BarCodeReader` με τη σημαία `DecodeType.MacroPdf417`, θα περάσουμε από όλα τα αποτελέσματα (μπορεί να υπάρχει περισσότερα από ένα barcode σε μία εικόνα) και θα εκτυπώσουμε κάθε εκτεταμένη ιδιότητα. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Τι κάνει ο κώδικας (γιατί, όχι μόνο πώς) + +1. **`using` block** – Εξασφαλίζει ότι οι εγγενείς πόροι (χειριστές αρχείων, μνήμη αποκωδικοποιητή) απελευθερώνονται αμέσως μετά τη λειτουργία. Η παράλειψη μπορεί να οδηγήσει σε κλειδωμένα αρχεία στα Windows. +2. **`DecodeType.MacroPdf417`** – Ενημερώνει το Aspose να ψάχνει ειδικά για σύμβολα Macro PDF417· άλλοι τύποι barcode αγνοούνται, επιταχύνοντας το σκανάρισμα. +3. **`ReadBarCodes()`** – Επιστρέφει μια συλλογή επειδή μια εικόνα μπορεί να περιέχει πολλαπλά τμήματα Macro PDF417 (σκεφτείτε ένα πολυ‑σελιδικό έγγραφο διασπασμένο σε πολλά barcodes). +4. **`macroResult.Extended?.Pdf417`** – Το αντικείμενο `Extended` είναι nullable· ο τελεστής ασφαλούς πλοήγησης (`?.`) αποτρέπει `NullReferenceException` αν το barcode δεν έχει εκτεταμένα δεδομένα. +5. **Printing each field** – Σας δίνει ορατότητα στο αναγνωριστικό αρχείου, τη σειρά τμημάτων, την επαλήθευση ελέγχου αθροίσματος και προαιρετικά κείμενα όπως αποστολέας ή παραλήπτης. + +--- + +## Βήμα 4 – Εκτέλεση της εφαρμογής και επαλήθευση του αποτελέσματος + +Συγκεντρώστε και εκτελέστε το πρόγραμμα: + +```bash +dotnet run +``` + +Αν όλα είναι σωστά συνδεδεμένα, θα δείτε κάτι παρόμοιο με το παρακάτω στην κονσόλα σας: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** Οι ακριβείς τιμές εξαρτώνται από το barcode που αποκωδικοποιείτε. Αν εμφανιστεί το μήνυμα “No Macro PDF417 extension data found”, ελέγξτε ξανά ότι η εικόνα περιέχει πραγματικά έναν κώδικα Macro PDF417 και ότι χρησιμοποιείτε το σωστό `DecodeType`. + +--- + +## Διαχείριση πολλαπλών τμημάτων και επικύρωση (προχωρημένο) + +Το Macro PDF417 έχει σχεδιαστεί για μεγάλα δεδομένα που χωρίζονται σε πολλά σύμβολα. Όταν αντιμετωπίσετε περισσότερα από ένα τμήματα, συνήθως θα χρειαστεί να: + +1. **Συλλέξετε όλα τα τμήματα** σε ένα λεξικό (dictionary) με κλειδί το `SegmentID`. +2. **Τα ταξινομήσετε** κατά `SegmentID` για να επανασυνθέσετε το αρχικό αρχείο. +3. **Επικυρώσετε** το `Checksum` έναντι του ενωμένου payload (το Aspose το κάνει εσωτερικά, αλλά μπορείτε να επαναλάβετε έναν CRC αν θέλετε επιπλέον ασφάλεια). + +Εδώ είναι ένα γρήγορο σκίτσο: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Θα χρειαστεί να υλοποιήσετε τις μεθόδους `AssembleSegments` και `VerifyChecksum` βάσει του φορμά του payload σας—συχνά πρόκειται απλώς για συνένωση byte array ακολουθούμενη από έλεγχο CRC‑16. + +--- + +## Συνηθισμένα προβλήματα και πώς να τα αποφύγετε + +| Συμπτωμα | Πιθανή αιτία | Διόρθωση | +|---------|--------------|----------| +| `null` returned from `macroResult.Extended` | Η εικόνα περιέχει απλό PDF417, όχι έκδοση Macro. | Χρησιμοποιήστε `DecodeType.Pdf417` ή ελέγξτε το πηγαίο barcode. | +| No output at all | Λάθος `imagePath` ή το αρχείο δεν είναι προσβάσιμο. | Ελέγξτε ξανά τη διαδρομή του αρχείου· βεβαιωθείτε ότι η εφαρμογή έχει δικαιώματα ανάγνωσης. | +| Exception “Object disposed” | Προσπάθεια χρήσης του `reader` μετά το μπλοκ `using`. | Κρατήστε όλη την επεξεργασία μέσα στο ` | + +--- + +## Τι πρέπει να μάθετε στη συνέχεια; + +Τα παρακάτω tutorials καλύπτουν στενά συναφή θέματα που επεκτείνουν τις τεχνικές που παρουσιάστηκαν σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικά παραδείγματα κώδικα με βήμα‑βήμα εξηγήσεις για να κατακτήσετε πρόσθετες δυνατότητες API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας projects. + +- [Προγραμματισμός Αναγνώστη DataMatrix με Aspose.BarCode για .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Αρχικοποίηση Αναγνώστη DotCode με Aspose.BarCode για .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Πώς να Διαβάσετε Barcodes DataMatrix με Aspose.BarCode για .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hindi/net/compact-pdf417-encoding/_index.md b/barcode/hindi/net/compact-pdf417-encoding/_index.md index 7df391155..48fe75326 100644 --- a/barcode/hindi/net/compact-pdf417-encoding/_index.md +++ b/barcode/hindi/net/compact-pdf417-encoding/_index.md @@ -86,6 +86,8 @@ Aspose.BarCode आपको `Pdf417ErrorCorrectionLevel` प्रॉपर् Aspose.BarCode for .NET का उपयोग करके Compact PDF417 बारकोड कैसे जनरेट करें सीखें। चरण‑दर‑चरण निर्देशों और कोड उदाहरणों के साथ व्यापक गाइड। +### [C# के साथ Aspose का उपयोग करके PDF417 बारकोड इमेज कैसे जनरेट करें](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) + ## अक्सर पूछे जाने वाले प्रश्न **Q: Compact PDF417 बारकोड में मैं अधिकतम कितना डेटा स्टोर कर सकता हूँ?** @@ -114,4 +116,4 @@ A: कोई बाहरी फ़ॉन्ट आवश्यक नहीं {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hindi/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/hindi/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..5b31df0e3 --- /dev/null +++ b/barcode/hindi/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: C# में Aspose के साथ PDF417 बारकोड इमेज कैसे बनाएं। चरण‑दर‑चरण सीखें + कि Aspose से बारकोड कैसे बनाएं, MacroPDF417 मेटाडाटा सेट करें, और PNG के रूप में + सहेजें। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: hi +lastmod: 2026-07-30 +og_description: Aspose के साथ C# में PDF417 बारकोड इमेज कैसे जेनरेट करें। इस पूर्ण + गाइड का पालन करके Aspose से बारकोड बनाएं, MacroPDF417 मेटाडाटा कॉन्फ़िगर करें, और + PNG फ़ाइल आउटपुट करें। +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Aspose के साथ C# में PDF417 बारकोड इमेज कैसे जनरेट करें +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: C# में Aspose के साथ PDF417 बारकोड इमेज कैसे जनरेट करें +url: /hi/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# में Aspose के साथ PDF417 बारकोड इमेज कैसे जनरेट करें + +C# में Aspose के साथ PDF417 बारकोड इमेज जनरेट करना उच्च‑घनत्व डेटा एन्कोडिंग से निपटने वाले किसी भी व्यक्ति के लिए अक्सर एक बाधा बन जाता है। इस गाइड में हम हर कदम पर चलेंगे—जनरेटर सेटअप करना, MacroPDF417 मेटाडेटा को ट्यून करना, और अंत में एक साफ़ PNG फ़ाइल सहेजना। + +यदि आपने कभी **generate barcode image c#** करने की कोशिश की है और एक खाली कैनवास या अपरिचनीय स्कैन के साथ समाप्त हुए हैं, तो आप अकेले नहीं हैं। अच्छी खबर यह है कि Aspose.BarCode पूरी प्रक्रिया को लगभग दर्द‑रहित बनाता है, और इस लेख के अंत तक आप किसी भी एंटरप्राइज़ वर्कफ़्लो के लिए **create barcode with Aspose** करने में सक्षम हो जाएंगे। + +## आप क्या सीखेंगे + +- .NET के लिए Aspose.BarCode लाइब्रेरी को इंस्टॉल और रेफ़रेंस करें। +- कस्टम पेलोड के साथ PDF417 जनरेटर को इनिशियलाइज़ करें। +- फ़ाइल ID, सेगमेंट ID, और टाइमस्टैम्प जैसे MacroPDF417‑विशिष्ट फ़ील्ड लागू करें। +- परिणाम को PNG इमेज के रूप में एक्सपोर्ट करें जिसे आप रिपोर्ट या मोबाइल ऐप्स में एम्बेड कर सकते हैं। +- सामान्य समस्याओं (जैसे, गलत मॉड्यूल चौड़ाई, गायब सेगमेंट) को हल करने के टिप्स। + +MacroPDF417 का पूर्व अनुभव आवश्यक नहीं है; C# और Visual Studio की बुनियादी समझ पर्याप्त होगी। + +## Prerequisites + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 or later | वर्तमान LTS संस्करण, Aspose द्वारा पूरी तरह सपोर्टेड | +| Visual Studio 2022 (or any IDE) | सैंपल को कंपाइल और रन करने के लिए | +| Aspose.BarCode for .NET (NuGet) | `BarcodeGenerator` और PDF417 सपोर्ट प्रदान करता है | + +You can add the library via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +अब बुनियादी सेटअप हो गया है, चलिए कोड में डुबकी लगाते हैं। + +## C# में PDF417 बारकोड इमेज जनरेट करने के लिए – सेटअप + +पहला कदम यह है कि हम **MacroPdf417** एन्कोड टाइप के लिए एक `BarcodeGenerator` इंस्टेंस बनाते हैं। यह ऑब्जेक्ट सभी कॉन्फ़िगरेशन विकल्पों को रखता है, मॉड्यूल साइज से लेकर वह समृद्ध मेटाडेटा जो MacroPDF417 अपेक्षित करता है। + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **यह क्यों महत्वपूर्ण है:** `EncodeTypes.MacroPdf417` Aspose को बताता है कि वह एक PDF417 बारकोड उत्पन्न करे जिसे कई सेगमेंट में विभाजित किया जा सकता है—बड़े फ़ाइलों या बैच प्रोसेसिंग के लिए आवश्यक। + +## बेसिक अपीयरेंस कॉन्फ़िगर करें + +एक पठनीय बारकोड सही विज़ुअल सेटिंग्स से शुरू होता है। `XDimension` प्रत्येक मॉड्यूल (छोटे काले/सफ़ेद वर्ग) की चौड़ाई नियंत्रित करता है, जबकि `Columns` निर्धारित करता है कि बारकोड कितने कॉलम में फैला है। + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **टिप:** यदि बारकोड रसीद प्रिंटर पर बहुत घना दिखता है, तो `XDimension` को `3` या `4` तक बढ़ाएँ। +- **पिटफ़ॉल:** `Columns` को बहुत कम सेट करने से बारकोड इमेज की सीमाओं से बाहर जा सकता है, जिससे स्कैन अपरिचनीय हो जाता है। + +## MacroPDF417 विशिष्ट मेटाडेटा सेट करें + +MacroPDF417 आपको फ़ाइल‑स्तर की जानकारी सीधे बारकोड में एम्बेड करने देता है। यह बड़े दस्तावेज़ शिपमेंट को ट्रैक करने या फ़ाइल को कई स्कैन में विभाजित करने के लिए उपयुक्त है। + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**प्रत्येक फ़ील्ड क्या करता है:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | पूरी फ़ाइल के लिए अद्वितीय पहचानकर्ता। | +| `MacroPdf417SegmentID` | वर्तमान सेगमेंट का इंडेक्स (0 से शुरू)। | +| `MacroPdf417SegmentsCount` | फ़ाइल को विभाजित करने वाले कुल सेगमेंट की संख्या। | +| `MacroPdf417FileName` | मानव‑पठनीय नाम, ऑडिट लॉग्स के लिए उपयोगी। | +| `MacroPdf417Checksum` | डेटा इंटीग्रिटी वेरिफिकेशन के लिए 16‑बिट CRC। | +| `MacroPdf417FileSize` | बाइट्स में मूल फ़ाइल आकार, रिसीवर को बफ़र आवंटित करने में मदद करता है। | +| `MacroPdf417TimeStamp` | फ़ाइल के जनरेट होने की तिथि/समय। | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | प्रेषक/प्राप्तकर्ता की पहचान के लिए वैकल्पिक स्ट्रिंग्स। | +| `MacroPdf417Terminator` | अंतिम सेगमेंट को चिह्नित करता है; सही डिकोडिंग के लिए आवश्यक। | + +> **यह क्यों जरूरी है?** इन फ़ील्ड्स के बिना, स्कैनर केवल कच्चा डेटा पढ़ सकता है, संदर्भ नहीं। मेटाडेटा जोड़ने से प्राप्त करने वाली प्रणाली मूल फ़ाइल को स्वचालित रूप से पुनः संयोजित कर सकती है। + +## बारकोड को PNG के रूप में सहेजें + +जब जनरेटर पूरी तरह कॉन्फ़िगर हो जाए, इमेज को सहेजना एक लाइन का कोड है: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **फ़ाइल फ़ॉर्मेट:** PNG लॉसलेस है, जिससे प्रत्येक मॉड्यूल स्कैनर के लिए तेज़ रहता है। +- **वैकल्पिक:** यदि आपको छोटा फ़ाइल साइज चाहिए तो `BarCodeImageFormat.Jpeg` उपयोग करें, लेकिन पढ़ने में थोड़ी कमी की उम्मीद रखें। + +### अपेक्षित आउटपुट + +स्निपेट चलाने के बाद, आप निर्दिष्ट फ़ोल्डर में `MacroPdf417Meta.png` पाएँगे। यह नीचे दी गई चित्र जैसा दिखना चाहिए: + +![Aspose के साथ जनरेट किया गया PDF417 बारकोड](path/to/your/image.png){alt="C# में PDF417 बारकोड इमेज कैसे जनरेट करें"} + +इमेज में काले और सफ़ेद वर्गों का घना ग्रिड होता है, जिसमें एन्कोडेड पेलोड और MacroPDF417 मेटाडेटा एम्बेडेड होते हैं। + +## पूर्ण कार्यशील उदाहरण + +नीचे पूरा, कॉपी‑पेस्ट‑तैयार प्रोग्राम दिया गया है। यह किसी भी .NET 6+ प्रोजेक्ट में कंपाइल होता है और केवल Aspose.BarCode NuGet पैकेज की आवश्यकता होती है। + + + +## अब आपको आगे क्या सीखना चाहिए? + +निम्नलिखित ट्यूटोरियल्स उन संबंधित विषयों को कवर करते हैं जो इस गाइड में दर्शाए गए तकनीकों पर आधारित हैं। प्रत्येक संसाधन में पूर्ण कार्यशील कोड उदाहरण और चरण‑दर‑चरण व्याख्याएँ शामिल हैं जो आपको अतिरिक्त API फीचर्स में माहिर बनने और अपने प्रोजेक्ट्स में वैकल्पिक इम्प्लीमेंटेशन एप्रोचेज़ को एक्सप्लोर करने में मदद करती हैं। + +- [कैसे बनाएं बारकोड – कॉम्पैक्ट PDF417 Aspose.BarCode के साथ](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [कैसे जनरेट करें DataMatrix बारकोड (ECC 200) Aspose.BarCode for .NET के साथ](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [कैसे जनरेट करें Aztec बारकोड कस्टम एस्पेक्ट रेशियो के साथ Aspose.BarCode for .NET का उपयोग करके](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hindi/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/hindi/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..6d160abca --- /dev/null +++ b/barcode/hindi/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode का उपयोग करके C# में कई बारकोड पढ़ें। चरण‑दर‑चरण सीखें + कि PDF417 को कैसे डिकोड करें, कॉम्पैक्ट मोड का पता लगाएँ, और एक छवि में कई बारकोड + को कैसे संभालें। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: hi +lastmod: 2026-07-30 +og_description: Aspose.BarCode के साथ C# में कई बारकोड पढ़ें। यह गाइड आपको दिखाता + है कि कैसे एक छवि में सभी बारकोड को डिकोड करें, कॉम्पैक्ट मोड जांचें, और .NET एप्लिकेशनों + में एकीकृत करें। +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: एकाधिक बारकोड पढ़ें C# – PDF417 के लिए पूर्ण ट्यूटोरियल +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: C# में कई बारकोड पढ़ें – PDF417 के साथ पूर्ण मार्गदर्शिका +url: /hi/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Read Multiple Barcodes C# – PDF417 के साथ पूर्ण गाइड + +क्या आपने कभी सोचा है कि **read multiple barcodes C#** को एक ही इमेज से कैसे पढ़ा जाए? शायद आपके पास शिपिंग लेबलों की एक बैच, टिकटों का कोलाज, या एक PDF417 दस्तावेज़ है जिसमें कई कोड एक ही तस्वीर में समाए हुए हैं। मेरे दैनिक काम में, मैं इसी समस्या का सामना कर चुका हूँ—जब तक कि मैंने Aspose.BarCode के `BarCodeReader` को नहीं खोजा। यह ट्यूटोरियल आपको इमेज में मौजूद हर बारकोड को डिकोड करने, यह पता लगाने कि प्रत्येक PDF417 कॉम्पैक्ट (ट्रंकेटेड) मोड में है या नहीं, और परिणामों को साफ़-सुथरे ढंग से हैंडल करने के चरणों से गुज़राएगा। + +हम कुछ अतिरिक्त टिप्स भी देंगे—जैसे जब इमेज में विभिन्न बारकोड सिम्बोलॉजीज़ हों, या स्कैन कोई परिणाम न दे। अंत तक आप एक तैयार‑चलाने योग्य कंसोल ऐप रखेंगे जो **reads multiple barcodes C#** को प्रो की तरह पढ़ता है। + +## What You’ll Need + +डुबकी लगाने से पहले, सुनिश्चित करें कि आपके मशीन पर निम्नलिखित स्थापित हैं: + +- **.NET 6.0** SDK या नया (कोड .NET Framework 4.6+ के साथ भी काम करता है, लेकिन .NET 6 सबसे उपयुक्त है)। +- **Aspose.BarCode for .NET** NuGet पैकेज (`Install-Package Aspose.BarCode`)। +- एक सैंपल इमेज जिसमें **PDF417** बारकोड हों—बेहतर होगा कि वह कॉम्पैक्ट और फुल‑साइज़ सिम्बॉल दोनों को मिलाए। ट्यूटोरियल `CompactPdf417.png` का उपयोग करता है, लेकिन कोई भी PNG/JPEG चलेगा। +- आपका पसंदीदा IDE (Visual Studio, Rider, या VS Code)। + +बस इतना ही—कोई अतिरिक्त DLLs नहीं, कोई नेटिव डिपेंडेंसी नहीं। Aspose.BarCode शुद्ध मैनेज्ड कोड है, इसलिए इसे किसी भी .NET प्रोजेक्ट में ड्रॉप कर सकते हैं। + +![Read multiple barcodes C# कंसोल आउटपुट](image.png "Read multiple barcodes C# कंसोल आउटपुट") + +*Image alt text: Read multiple barcodes C# – PDF417 बारकोड के कॉम्पैक्ट मोड स्थिति को दर्शाता कंसोल स्क्रीनशॉट।* + +## Step 1 – Install and Reference the BarCodeReader C# Library + +सबसे पहले, आपको वह **BarCodeReader C#** क्लास चाहिए जो डिकोडिंग को पावर देती है। अपना टर्मिनल (या Package Manager Console) खोलें और चलाएँ: + +```powershell +dotnet add package Aspose.BarCode +``` + +या, यदि आप Visual Studio के NuGet मैनेजर में हैं, तो बस *Aspose.BarCode* खोजें और **Install** पर क्लिक करें। यह नवीनतम स्थिर संस्करण (जुलाई 2026 तक यह 23.9 है) को लाएगा, जो PDF417, QR, DataMatrix, और कई अन्य सिम्बोलॉजीज़ को सपोर्ट करता है। + +क्यों यह महत्वपूर्ण है: लाइब्रेरी इमेज प्रोसेसिंग, एरर करेक्शन, और सिम्बॉल रिकग्निशन की जटिलता को एब्स्ट्रैक्ट करती है। आप अपना खुद का स्कैनर लिख सकते थे, लेकिन किनारे‑के‑केसों में हफ्तों लग जाते। Aspose आपको एक battle‑tested, **C# barcode library** देता है जो आधुनिक .NET रनटाइम्स के लिए अपडेटेड है। + +## Step 2 – Set Up a Minimal Console Project + +एक नया कंसोल ऐप बनाइए ताकि हम बारकोड लॉजिक पर बिना UI के शोर के ध्यान दे सकें: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +जनरेटेड `Program.cs` को नीचे दिए गए पूर्ण उदाहरण से बदल दें। डिफ़ॉल्ट नेमस्पेस रख सकते हैं या बदल सकते हैं—कोई विशेष आवश्यकता नहीं है। + +## Step 3 – Write the Full “Read Multiple Barcodes C#” Implementation + +नीचे एक **complete, runnable** कोड सैंपल है। यह मूल स्निपेट के चार चरणों को कवर करता है, एरर हैंडलिंग जोड़ता है, और उपयोगी डायग्नॉस्टिक्स प्रिंट करता है। + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Why This Code Works + +- **`BarCodeReader`** **BarCodeReader C#** API का मुख्य घटक है। यह इमेज को खोलता है, प्री‑प्रोसेसिंग लागू करता है, और आप द्वारा निर्दिष्ट प्रकार के सिम्बॉल्स की खोज करता है। +- **`ReadBarCodes()`** एक एरे लौटाता है, न कि केवल एक सिंगल रिज़ल्ट। यही **reading multiple barcodes C#** का मूल है—यह मेथड अपने आप हर मिलान को इकट्ठा कर लेता है। +- **`result.Extended.Pdf417.IsTruncated`** हमें बताता है कि PDF417 *कॉम्पैक्ट* (अर्थात् ट्रंकेटेड) मोड में है या नहीं। यह फ़्लैग केवल PDF417 के लिए मौजूद है, इसलिए हम null‑conditional ऑपरेटर (`?.`) का उपयोग करके अन्य सिम्बॉल्स के आने पर एक्सेप्शन से बचते हैं। +- `foreach` लूप डिकोडेड टेक्स्ट और कॉम्पैक्ट स्टेटस दोनों को प्रिंट करता है, जिससे आपको जल्दी से वैधता जांच मिलती है। + +## Step 4 – Handling Different Barcode Types (Optional) + +यदि आपकी इमेज में PDF417 के अलावा अन्य बारकोड भी हो सकते हैं, तो बस `BarCodeReader` के दूसरे आर्ग्यूमेंट को `DecodeType.AllSupported` में बदल दें। लूप वही रहेगा, लेकिन आपको `result.Extended` के null होने की स्थिति को संभालना पड़ेगा: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +यह छोटा बदलाव आपके **C# barcode library** को एक यूनिवर्सल स्कैनर में बदल देता है, जो मिश्रित‑सिम्बोलॉजी बैच के लिए परफेक्ट है। + +## Step 5 – Edge Cases and Best‑Practice Tips + +### 1️⃣ No Barcodes Detected +यदि `ReadBarCodes()` एक खाली एरे लौटाता है, तो सबसे आम कारण हैं: + +- गलत फ़ाइल पाथ या पढ़ने की अनुमति नहीं होना। +- इमेज क्वालिटी बहुत कम (ब्लर, लो कंट्रास्ट)। `reader.ImagePreprocessingOptions` के साथ प्री‑प्रोसेसिंग पर विचार करें (उदा., `reader.ImagePreprocessingOptions.Denoise = true;`)। + +### 2️⃣ Extremely Large Images +10 MP फोटो को प्रोसेस करना मेमोरी‑हंग्री हो सकता है। आप स्कैन एरिया को सीमित कर सकते हैं: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Thread‑Safety +`BarCodeReader` `IDisposable` को इम्प्लीमेंट करता है और **थ्रेड‑सेफ़** नहीं है। यदि आपको पैरलल प्रोसेसिंग चाहिए, तो प्रत्येक थ्रेड के लिए अलग इंस्टेंस बनाएँ। + +### 4️⃣ Licensing +Aspose.BarCode बॉक्स से बाहर ट्रायल मोड में चलता है, लेकिन आउटपुट इमेज पर वॉटरमार्क दिखेगा। प्रोडक्शन के लिए लाइसेंस को जल्दी सेट करें: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +जब आप इसे बड़े सर्विस में इंटीग्रेट करते हैं, तो `Console.WriteLine` को स्ट्रक्चर्ड लॉगर (Serilog, NLog) से बदलें। इस तरह आप `CodeText`, `CodeType`, और `IsTruncated` को फील्ड्स के रूप में कैप्चर कर सकते हैं और डाउनस्ट्रीम एनालिटिक्स में उपयोग कर सकते हैं। + +## Full Working Example Recap + +सब कुछ मिलाकर, यहाँ पूरा प्रोग्राम है जिसे आप `Program.cs` में कॉपी‑पेस्ट कर सकते हैं: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## What Should You Learn Next? + + +नीचे दिए गए ट्यूटोरियल्स उन विषयों को कवर करते हैं जो इस गाइड में दिखाए गए तकनीकों पर आधारित हैं। प्रत्येक रिसोर्स में पूर्ण कार्यशील कोड उदाहरण और स्टेप‑बाय‑स्टेप व्याख्याएँ हैं, जिससे आप अतिरिक्त API फीचर्स में महारत हासिल कर सकें और अपने प्रोजेक्ट्स में वैकल्पिक इम्प्लीमेंटेशन अप्रोचेज़ को एक्सप्लोर कर सकें। + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hindi/net/one-dimensional-barcode-types/_index.md b/barcode/hindi/net/one-dimensional-barcode-types/_index.md index c02a2e3d8..e6569f993 100644 --- a/barcode/hindi/net/one-dimensional-barcode-types/_index.md +++ b/barcode/hindi/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ Aspose.BarCode का उपयोग करके .NET में डेटा .NET के लिए Aspose.BarCode का उपयोग करके एक-आयामी बारकोड उत्पन्न करते समय अपवादों को संभालना सीखें। यह चरण-दर-चरण मार्गदर्शिका त्रुटि-सहिष्णु बारकोड समाधान सुनिश्चित करती है। अब शुरू हो जाओ! ### [एक-आयामी चौड़ा-संकीर्ण अनुपात विन्यास](./one-dimensional-wide-narrow-ratio-configuration/) .NET के लिए Aspose.BarCode के साथ आसानी से अनुकूलित बारकोड जेनरेट करें। एक-आयामी चौड़े-संकीर्ण अनुपात कॉन्फ़िगरेशन के लिए चरण-दर-चरण मार्गदर्शिका। +### [इमेज से बारकोड पढ़ें – C# बारकोड रीडर उदाहरण](./read-barcode-from-image-c-barcode-reader-example/) +Aspose.BarCode का उपयोग करके .NET में इमेज से बारकोड पढ़ने का तरीका जानें। चरण-दर-चरण मार्गदर्शिका। ## निष्कर्ष @@ -89,4 +91,4 @@ Aspose.BarCode का उपयोग करके .NET में डेटा {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hindi/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/hindi/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..b3ac8e67b --- /dev/null +++ b/barcode/hindi/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,277 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode for .NET का उपयोग करके छवि से बारकोड पढ़ें – एक पूर्ण + C# बारकोड रीडर उदाहरण जो दिखाता है कि मैक्रो PDF417 बारकोड को कैसे डिकोड किया जाए। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: hi +lastmod: 2026-07-30 +og_description: .NET के लिए Aspose.BarCode के साथ छवि से बारकोड पढ़ें। यह चरण‑दर‑चरण + C# बारकोड रीडर उदाहरण दिखाता है कि सभी मैक्रो PDF417 मेटाडेटा कैसे निकाले जाएँ। +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: छवि से बारकोड पढ़ें – पूर्ण C# बारकोड रीडर उदाहरण +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: इमेज से बारकोड पढ़ें – C# बारकोड रीडर उदाहरण +url: /hi/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# इमेज से बारकोड पढ़ें – C# बारकोड रीडर उदाहरण + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +Imagine you’ve just scanned a shipping label, a boarding pass, or a government ID that embeds a Macro PDF417 segment. You want to pull the file ID, segment count, timestamps, and maybe even the sender’s name—all without leaving your code. That’s exactly what we’ll achieve, and we’ll do it in a way that’s easy to copy‑paste into your own project. + +--- + +## What you’ll learn + +- How to add the Aspose.BarCode NuGet package to a .NET project. +- How to open an image file that contains a Macro PDF417 barcode. +- How to iterate over **read barcode from image** results and access every extended field. +- Tips for handling multiple segments, validating checksums, and troubleshooting common pitfalls. + +By the end of this guide you’ll have a working console app that prints out all Macro PDF417 metadata, ready to be integrated into larger systems like inventory trackers or document management pipelines. + +--- + +## Prerequisites + +Before we dive in, make sure you have the following: + +| Requirement | Why it matters | +|-------------|----------------| +| .NET 6.0 SDK or later (any recent version works) | Provides the runtime for the console app. | +| Visual Studio 2022 (or VS Code with C# extension) | Makes editing and debugging painless. | +| Aspose.BarCode for .NET (free trial or licensed) | The library that actually decodes the barcode. | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | The source we’ll read from. | + +If you don’t already have Aspose.BarCode, you can pull it from NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +That single line installs everything you need, including the `BarCodeReader`, `DecodeType`, and the rich `Extended` property set we’ll explore. + +--- + +## Step 1 – Set up the project and import the library + +Create a fresh console project (or drop the code into an existing one). The `using` directives are essential; they bring the barcode classes into scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** If you’re using Visual Studio, the IDE will offer to add the missing `using` statements automatically—just hit *Ctrl+.`*. + +--- + +## Step 2 – Prepare the image path + +Hard‑coding an absolute path works for a quick demo, but in production you’d probably accept a command‑line argument or a configuration setting. For clarity we’ll keep it simple: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** The `BarCodeReader` expects a valid file location; an incorrect path throws a `FileNotFoundException` before any decoding even starts. + +--- + +## Step 3 – **Read barcode from image** and extract Macro PDF417 details + +Now comes the heart of the **c# barcode reader example**. We’ll instantiate `BarCodeReader` with the `DecodeType.MacroPdf417` flag, loop through all results (there can be more than one barcode in a single image), and print every extended property. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### What the code is doing (why, not just how) + +1. **`using` block** – Guarantees the native resources (file handles, native decoder memory) are freed immediately after the operation. Skipping this can lead to locked files on Windows. +2. **`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 symbols; other barcode types are ignored, which speeds up scanning. +3. **`ReadBarCodes()`** – Returns a collection because an image might contain multiple Macro PDF417 segments (think of a multi‑page document split across several barcodes). +4. **`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the barcode lacks extended data. +5. **Printing each field** – Gives you visibility into the file identifier, segment ordering, checksum verification, and optional textual fields like sender or addressee. + +--- + +## Step 4 – Run the application and verify the output + +Compile and execute the program: + +```bash +dotnet run +``` + +If everything is wired correctly, you should see something akin to the following in your console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** The exact values depend on the barcode you’re decoding. If you get “No Macro PDF417 extension data found,” double‑check that the image truly contains a Macro PDF417 code and that you’re using the correct `DecodeType`. + +--- + +## Handling multiple segments and validation (advanced) + +Macro PDF417 is designed for large data payloads split across several symbols. When you encounter more than one segment, you’ll typically need to: + +1. **Collect all segments** into a dictionary keyed by `SegmentID`. +2. **Sort** them by `SegmentID` to reassemble the original file. +3. **Validate** the `Checksum` against the concatenated payload (Aspose does this internally, but you can re‑run a CRC if you need extra safety). + +Here’s a quick sketch: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +You’ll need to implement `AssembleSegments` and `VerifyChecksum` based on your payload format—often it’s just a byte array concatenation followed by a CRC‑16 check. + +--- + +## Common pitfalls and how to avoid them + +| Symptom | Likely cause | Fix | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | Image contains a plain PDF417, not a Macro version. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` wrong or file not accessible. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Keep all processing inside the ` + +## What Should You Learn Next? + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hongkong/net/compact-pdf417-encoding/_index.md b/barcode/hongkong/net/compact-pdf417-encoding/_index.md index 9254eb3ec..9fbed7876 100644 --- a/barcode/hongkong/net/compact-pdf417-encoding/_index.md +++ b/barcode/hongkong/net/compact-pdf417-encoding/_index.md @@ -84,6 +84,12 @@ Aspose.BarCode 讓你設定 `Pdf417ErrorCorrectionLevel` 屬性 (0‑8)。較高 ### [建立緊湊式 PDF417 條碼](./compact-pdf417-basic-configuration/) 了解如何使用 Aspose.BarCode for .NET 產生緊湊式 PDF417 條碼。完整指南包含一步一步說明與程式碼範例。 +### [如何使用 Aspose 在 C# 中產生 PDF417 條碼影像](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +使用 Aspose.BarCode for .NET 在 C# 應用程式中生成 PDF417 條碼圖像的完整步驟說明。 + +### [在 C# 中讀取多條碼 – 完整指南(含 PDF417)](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +完整指南說明如何在 C# 使用 Aspose.BarCode 同時讀取多個條碼(含 PDF417)。 + ## 常見問題 **Q: 緊湊式 PDF417 條碼最多能儲存多少資料?** @@ -112,4 +118,4 @@ A: 不需要外部字型;函式庫會在內部處理所有渲染。 {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hongkong/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/hongkong/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..4ef8cad15 --- /dev/null +++ b/barcode/hongkong/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,174 @@ +--- +category: general +date: 2026-07-30 +description: 如何在 C# 中使用 Aspose 產生 PDF417 條碼圖像。逐步學習如何使用 Aspose 建立條碼、設定 MacroPDF417 + 中繼資料,並儲存為 PNG。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: zh-hant +lastmod: 2026-07-30 +og_description: 如何在 C# 中使用 Aspose 產生 PDF417 條碼圖像。請參考本完整指南,使用 Aspose 建立條碼、設定 MacroPDF417 + 中繼資料,並輸出 PNG 檔案。 +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: 如何使用 Aspose 在 C# 中生成 PDF417 條碼圖像 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: 如何在 C# 中使用 Aspose 產生 PDF417 條碼圖像 +url: /zh-hant/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何使用 Aspose 在 C# 中產生 PDF417 條碼圖像 + +如何產生 PDF417 條碼圖像在 C# 中使用 Aspose 是許多處理高密度資料編碼的人常見的障礙。在本指南中,我們將逐步說明每個步驟——設定產生器、調整 MacroPDF417 中繼資料,最後儲存為清晰的 PNG 檔案。 + +如果你曾嘗試 **generate barcode image c#**,卻得到空白畫布或無法辨識的掃描結果,你並不孤單。好消息是 Aspose.BarCode 讓整個過程幾乎無痛,本文結束時,你將能夠 **create barcode with Aspose**,應用於任何企業工作流程。 + +## 您將學習到 + +- 安裝並參考 Aspose.BarCode for .NET 套件。 +- 使用自訂 Payload 初始化 PDF417 產生器。 +- 套用 MacroPDF417 專屬欄位,如檔案 ID、段落 ID 與時間戳記。 +- 將結果匯出為 PNG 圖像,可嵌入報表或行動應用程式。 +- 常見問題的除錯技巧(例如模組寬度錯誤、段落遺失)。 + +不需要事先了解 MacroPDF417,只要具備 C# 與 Visual Studio 的基本概念即可。 + +## 前置條件 + +| 需求 | 原因 | +|------|------| +| .NET 6.0 或更新版本 | 目前的 LTS 版本,完整支援 Aspose | +| Visual Studio 2022(或任何 IDE) | 用於編譯與執行範例 | +| Aspose.BarCode for .NET(NuGet) | 提供 `BarcodeGenerator` 以及 PDF417 支援 | + +你可以透過 NuGet 加入此套件: + +```bash +dotnet add package Aspose.BarCode +``` + +現在基礎已就緒,讓我們深入程式碼。 + +## 如何在 C# 中產生 PDF417 條碼圖像 – 設定 + +我們首先建立一個 `BarcodeGenerator` 實例,使用 **MacroPdf417** 編碼類型。此物件負責所有設定,從模組大小到 MacroPDF417 所需的豐富中繼資料。 + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **為什麼重要:** `EncodeTypes.MacroPdf417` 告訴 Aspose 產生可分割為多個段落的 PDF417 條碼,這對於大型檔案或批次處理是必備功能。 + +## 設定基本外觀 + +可讀的條碼必須有正確的視覺設定。`XDimension` 控制每個模組(小黑白方格)的寬度,而 `Columns` 決定條碼佔用的欄位數量。 + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **小技巧:** 若條碼在收銀機印表機上看起來過於密集,可將 `XDimension` 調高至 `3` 或 `4`。 +- **陷阱:** `Columns` 設定過低會導致條碼超出影像範圍,產生無法辨識的掃描結果。 + +## 設定 MacroPDF417 專屬中繼資料 + +MacroPDF417 允許直接在條碼中嵌入檔案層級資訊,這對於追蹤大型文件傳輸或將檔案切割成多次掃描特別有用。 + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**每個欄位的功能說明:** + +| 屬性 | 說明 | +|------|------| +| `MacroPdf417FileID` | 整個檔案的唯一識別碼。 | +| `MacroPdf417SegmentID` | 目前段落的索引(從 0 開始)。 | +| `MacroPdf417SegmentsCount` | 檔案被切割成的總段落數。 | +| `MacroPdf417FileName` | 供稽核使用的可讀檔名。 | +| `MacroPdf417Checksum` | 用於資料完整性驗證的 16 位 CRC。 | +| `MacroPdf417FileSize` | 原始檔案大小(位元組),協助接收端配置緩衝區。 | +| `MacroPdf417TimeStamp` | 檔案產生的日期/時間。 | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | 可選的字串,用以識別收件人/寄件人。 | +| `MacroPdf417Terminator` | 標示最後一段;正確解碼時必須存在。 | + +> **為什麼要這樣做?** 若沒有這些欄位,掃描器只能讀取原始資料,無法取得上下文資訊。加入中繼資料後,接收系統即可自動重組原始檔案。 + +## 將條碼儲存為 PNG + +當產生器全部設定完成後,儲存影像只需要一行程式碼: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **檔案格式:** PNG 為無損格式,確保每個模組對掃描器都保持銳利。 +- **備選方案:** 若需要較小的檔案大小,可使用 `BarCodeImageFormat.Jpeg`,但可讀性會略有下降。 + +### 預期輸出 + +執行程式碼片段後,你會在指定的資料夾中看到 `MacroPdf417Meta.png`。它的外觀應與下圖相似: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="如何在 C# 中產生 PDF417 條碼圖像"} + +此圖像呈現密集的黑白方格網格,內含編碼的 Payload 以及 MacroPDF417 中繼資料。 + +## 完整範例 + +以下是完整、可直接複製貼上的程式。它可在任何 .NET 6+ 專案中編譯,且僅需 Aspose.BarCode NuGet 套件。 + + + +## 接下來您應該學習什麼? + +以下教學涵蓋與本指南緊密相關的主題,進一步擴展所示技術。每個資源皆提供完整可執行的程式碼範例,並附上逐步說明,協助你掌握更多 API 功能,或在專案中探索其他實作方式。 + +- [如何使用 Aspose.BarCode 建立條碼 – 緊湊型 PDF417](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [如何產生 DataMatrix 條碼(ECC 200)使用 Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [如何使用 Aspose.BarCode for .NET 產生自訂長寬比的 Aztec 條碼](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hongkong/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/hongkong/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..a0ef51396 --- /dev/null +++ b/barcode/hongkong/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,261 @@ +--- +category: general +date: 2026-07-30 +description: 使用 Aspose.BarCode 在 C# 中讀取多個條碼。一步步學習如何解碼 PDF417、偵測緊湊模式,並在同一張圖片中處理多個條碼。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: zh-hant +lastmod: 2026-07-30 +og_description: 讀取多個條碼 C# 使用 Aspose.BarCode。本指南示範如何解碼圖像中的所有條碼、檢查緊湊模式,並整合至 .NET 應用程式。 +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: 讀取多個條碼 C# – PDF417 完整教學 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: C# 讀取多條碼 – 含 PDF417 的完整指南 +url: /zh-hant/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 讀取多個條碼 C# – 完整指南(含 PDF417) + +有沒有想過要 **read multiple barcodes C#** 從單一張圖片中讀取?也許你手上有一批運單標籤、票根拼貼,或是將多個碼壓縮在同一張圖的 PDF417 文件。我的日常工作中正好碰到這種情況——直到我發現了 Aspose.BarCode 的 `BarCodeReader`。本教學將一步步示範如何解碼圖片中的每一個條碼、判斷每個 PDF417 是否處於緊湊(截斷)模式,並乾淨利落地處理結果。 + +我們還會額外補充一些小技巧——例如當圖片包含不同條碼類型,或是掃描結果全無時該怎麼辦。完成後,你將擁有一個可直接執行的 Console 應用程式,能像專業人士一樣 **read multiple barcodes C#**。 + +## 需要的環境 + +在開始之前,請確保你的機器上已安裝以下項目: + +- **.NET 6.0** SDK 或更新版本(程式碼同樣支援 .NET Framework 4.6 以上,但 .NET 6 是最佳選擇)。 +- **Aspose.BarCode for .NET** NuGet 套件(`Install-Package Aspose.BarCode`)。 +- 一張包含 **PDF417** 條碼的範例圖片——最好同時混合緊湊與完整尺寸的符號。教學使用 `CompactPdf417.png`,但任何 PNG/JPEG 都可。 +- 你慣用的 IDE(Visual Studio、Rider 或 VS Code)。 + +就這樣——不需要額外的 DLL,也不需要原生相依套件。Aspose.BarCode 完全採用受管理程式碼,你可以直接放入任何 .NET 專案。 + +![讀取多個條碼 C# 主控台輸出](image.png "讀取多個條碼 C# 主控台輸出") + +*圖片說明:讀取多個條碼 C# – 主控台畫面截圖,顯示 PDF417 條碼的緊湊模式狀態。* + +## Step 1 – 安裝並參考 BarCodeReader C# 函式庫 + +首先,你需要 **BarCodeReader C#** 類別來執行解碼。打開終端機(或 Package Manager Console)並執行: + +```powershell +dotnet add package Aspose.BarCode +``` + +或者,在 Visual Studio 的 NuGet 管理員中直接搜尋 *Aspose.BarCode*,然後點擊 **Install**。這會下載最新的穩定版(截至 2026 年 7 月為 23.9),支援 PDF417、QR、DataMatrix 以及其他數十種條碼類型。 + +為什麼這很重要:此函式庫將影像處理、錯誤更正與符號辨識的繁重工作抽象化。你完全可以自行開發掃描器,但那會花上數週時間去追蹤各種邊緣案例。Aspose 為你提供一套經過實戰驗證、**C# barcode library**,且已針對現代 .NET 執行環境進行最佳化。 + +## Step 2 – 建立最小化 Console 專案 + +建立一個全新的 Console 應用程式,讓我們只專注於條碼邏輯,免除 UI 干擾: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +將產生的 `Program.cs` 替換成下方完整範例。你可以保留預設的命名空間,或自行更名——沒有特別限制。 + +## Step 3 – 撰寫完整的「Read Multiple Barcodes C#」實作 + +以下是一段 **完整、可執行** 的程式碼範例。它涵蓋原始片段的四個步驟,加入錯誤處理,並輸出實用的診斷資訊。 + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### 為什麼這段程式碼可行 + +- **`BarCodeReader`** 是 **BarCodeReader C#** API 的核心。它會開啟影像、執行前置處理,並搜尋你指定的條碼類型。 +- **`ReadBarCodes()`** 回傳陣列,而非單一結果。這正是 **read multiple barcodes C#** 的關鍵——此方法會自動收集所有找到的匹配項目。 +- **`result.Extended.Pdf417.IsTruncated`** 告訴我們 PDF417 是否處於 *compact*(亦稱 truncated)模式。此旗標僅在 PDF417 時存在,因此使用空值條件運算子 (`?.`) 以避免其他條碼類型導致例外。 +- `foreach` 迴圈同時印出解碼文字與緊湊狀態,讓你快速驗證結果。 + +## Step 4 – 處理不同條碼類型(可選) + +如果你的圖片可能同時包含除 PDF417 之外的其他條碼,只需要把 `BarCodeReader` 的第二個參數改成 `DecodeType.AllSupported`。迴圈本身不變,但必須針對非 PDF417 符號的 `result.Extended` 為 null 做防護: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +這個小調整即可把你的 **C# barcode library** 變成通用掃描器,完美支援混合條碼批次。 + +## Step 5 – 邊緣案例與最佳實踐 + +### 1️⃣ 未偵測到條碼 +若 `ReadBarCodes()` 回傳空陣列,最常見的原因包括: + +- 檔案路徑錯誤或缺乏讀取權限。 +- 影像品質過低(模糊、對比度低)。可考慮使用 `reader.ImagePreprocessingOptions` 進行前置處理,例如 `reader.ImagePreprocessingOptions.Denoise = true;`。 + +### 2️⃣ 超大型影像 +處理 10 MP 照片會佔用大量記憶體。你可以限制掃描區域: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ 執行緒安全性 +`BarCodeReader` 實作 `IDisposable`,且 **非** 執行緒安全。若需平行處理,請為每條執行緒建立獨立實例。 + +### 4️⃣ 授權 +Aspose.BarCode 以試用模式可直接使用,但輸出影像會加上浮水印。正式環境請盡早設定授權: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ 日誌記錄 +將此程式整合至更大的服務時,建議以結構化日誌(Serilog、NLog)取代 `Console.WriteLine`。如此即可將 `CodeText`、`CodeType`、`IsTruncated` 等欄位記錄下來,供後續分析使用。 + +## 完整範例回顧 + +以下即為可直接貼到 `Program.cs` 的 **完整程式**: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## 接下來該學什麼? + +以下教學與本篇內容緊密相關,能進一步深化你對 API 的掌握,並探索在專案中實作的其他方式。 + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hongkong/net/one-dimensional-barcode-types/_index.md b/barcode/hongkong/net/one-dimensional-barcode-types/_index.md index 5802bdbba..ff65bb43d 100644 --- a/barcode/hongkong/net/one-dimensional-barcode-types/_index.md +++ b/barcode/hongkong/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ url: /zh-hant/net/one-dimensional-barcode-types/ 了解如何使用 Aspose.BarCode for .NET 產生一維條碼時處理例外狀況。本逐步指南可確保條碼解決方案具有容錯性。現在就開始吧! ### [一維寬窄比配置](./one-dimensional-wide-narrow-ratio-configuration/) 使用 Aspose.BarCode for .NET 輕鬆產生自訂條碼。一維寬窄比配置的分步指南。 +### [從圖像讀取條碼 – C# 條碼閱讀器範例](./read-barcode-from-image-c-barcode-reader-example/) +了解如何使用 Aspose.BarCode 在 .NET 中從圖像讀取條碼。 ## 結論 @@ -89,4 +91,4 @@ url: /zh-hant/net/one-dimensional-barcode-types/ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hongkong/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/hongkong/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..7dffac64d --- /dev/null +++ b/barcode/hongkong/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,279 @@ +--- +category: general +date: 2026-07-30 +description: 使用 Aspose.BarCode for .NET 從圖像讀取條碼 – 完整的 C# 條碼閱讀器範例,展示如何解碼 Macro PDF417 + 條碼。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: zh-hant +lastmod: 2026-07-30 +og_description: 使用 Aspose.BarCode for .NET 從圖像讀取條碼。此逐步 C# 條碼讀取範例展示如何提取所有 Macro PDF417 + 元資料。 +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: 從圖像讀取條碼 – 完整的 C# 條碼閱讀器範例 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: 從圖片讀取條碼 – C# 條碼閱讀器範例 +url: /zh-hant/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 從圖像讀取條碼 – C# 條碼閱讀器範例 + +需要在 C# 應用程式中 **從圖像讀取條碼** 嗎?您來對地方了。在本教學中,我們將逐步說明一個完整的 *c# barcode reader example*,使用 Aspose.BarCode for .NET 函式庫解碼 Macro PDF417 條碼,並提取標準提供的所有擴充資訊。 + +想像您剛剛掃描了一張運送標籤、登機證或嵌入 Macro PDF417 區段的政府身分證。您想取得檔案 ID、區段數量、時間戳記,甚至寄件者姓名——全部不必離開程式碼。這正是我們即將完成的目標,且我們會以易於直接 copy‑paste 到您專案的方式實作。 + +--- + +## 您將學到什麼 + +- 如何將 Aspose.BarCode NuGet 套件加入 .NET 專案。 +- 如何開啟包含 Macro PDF417 條碼的圖像檔案。 +- 如何遍歷 **read barcode from image** 結果並存取每個擴充欄位。 +- 處理多個區段、驗證檢查碼以及排除常見問題的技巧。 + +完成本指南後,您將擁有一個可列印所有 Macro PDF417 中繼資料的控制台應用程式,隨時可整合至庫存追蹤或文件管理等大型系統。 + +--- + +## 前置條件 + +在開始之前,請確保您具備以下項目: + +| 需求 | 原因說明 | +|------|----------| +| .NET 6.0 SDK 或更新版本(任何近期版本皆可) | 為控制台應用程式提供執行環境。 | +| Visual Studio 2022(或安裝 C# 擴充功能的 VS Code) | 讓編輯與除錯變得輕鬆。 | +| Aspose.BarCode for .NET(免費試用或正式授權) | 真正執行條碼解碼的函式庫。 | +| 一張包含 Macro PDF417 條碼的圖像檔 (`MacroPdf417Meta.png`) | 我們將從此檔案讀取資料。 | + +如果尚未取得 Aspose.BarCode,您可以從 NuGet 取得: + +```bash +dotnet add package Aspose.BarCode +``` + +上述單行指令會安裝所有必需的元件,包括 `BarCodeReader`、`DecodeType` 以及我們即將探索的豐富 `Extended` 屬性集合。 + +--- + +## Step 1 – 設定專案並匯入函式庫 + +建立一個全新的控制台專案(或將程式碼放入既有專案)。`using` 指令相當重要,它會將條碼相關類別帶入作用域。 + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** 若您使用 Visual Studio,IDE 會自動提示加入缺少的 `using` 陳述式——只要按 *Ctrl+.`* 即可。 + +--- + +## Step 2 – 準備圖像路徑 + +硬編碼絕對路徑雖能快速示範,但正式環境通常會接受命令列參數或設定檔。為了說明清楚,我們仍保持簡單寫法: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** `BarCodeReader` 需要有效的檔案位置;若路徑錯誤會在解碼前拋出 `FileNotFoundException`。 + +--- + +## Step 3 – **Read barcode from image** 並擷取 Macro PDF417 詳細資訊 + +現在進入 **c# barcode reader example** 的核心。我們會以 `DecodeType.MacroPdf417` 旗標建立 `BarCodeReader`,遍歷所有結果(單張圖像可能包含多個條碼),並列印每個擴充屬性。 + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### 程式碼在做什麼(為什麼,而不只是怎麼做) + +1. **`using` block** – 確保原生資源(檔案句柄、原生解碼器記憶體)在操作結束後立即釋放。若省略此步驟,Windows 可能會出現檔案被鎖定的情況。 +2. **`DecodeType.MacroPdf417`** – 告訴 Aspose 僅搜尋 Macro PDF417 符號,其他條碼類型會被忽略,從而加快掃描速度。 +3. **`ReadBarCodes()`** – 回傳集合,因為一張圖像可能包含多個 Macro PDF417 區段(例如跨多頁的文件被切割成多個條碼)。 +4. **`macroResult.Extended?.Pdf417`** – `Extended` 物件可能為 null;安全導向運算子 (`?.`) 可防止在條碼缺少擴充資料時拋出 `NullReferenceException`。 +5. **列印每個欄位** – 讓您看到檔案識別碼、區段順序、檢查碼驗證,以及寄件者或收件者等可選文字欄位。 + +--- + +## Step 4 – 執行應用程式並驗證輸出 + +編譯並執行程式: + +```bash +dotnet run +``` + +若一切設定正確,您應該會在控制台看到類似以下的資訊: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** 具體數值取決於您所解碼的條碼。若出現 “No Macro PDF417 extension data found”,請再次確認圖像確實包含 Macro PDF417 代碼,且使用了正確的 `DecodeType`。 + +--- + +## 處理多個區段與驗證(進階) + +Macro PDF417 為大型資料負載設計,會分散於多個符號。當您遇到超過一個區段時,通常需要: + +1. **Collect all segments** into a dictionary keyed by `SegmentID`。 +2. **Sort** them by `SegmentID` to reassemble the original file。 +3. **Validate** the `Checksum` against the concatenated payload (Aspose does this internally, but you can re‑run a CRC if you need extra safety)。 + +以下提供快速示意: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +您需要根據自己的資料格式實作 `AssembleSegments` 與 `VerifyChecksum`——通常只需將位元組陣列串接後再進行 CRC‑16 檢查即可。 + +--- + +## 常見問題與避免方式 + +| 症狀 | 可能原因 | 解決方法 | +|------|----------|----------| +| 從 `macroResult.Extended` 返回 `null` | 圖像只包含普通 PDF417,未使用 Macro 版本。 | 改用 `DecodeType.Pdf417`,或確認來源條碼為 Macro。 | +| 完全沒有輸出 | `imagePath` 錯誤或檔案無法存取。 | 再次檢查檔案路徑,確保應用程式具備讀取權限。 | +| 出現 “Object disposed” 例外 | 在 `using` 區塊結束後仍嘗試使用 `reader`。 | 將所有處理邏輯保留在 `using` 區塊內。 | + +--- + +## 接下來該學什麼? + +以下教學與本指南緊密相關,能進一步擴展您對 API 的掌握,並提供其他實作方式的範例程式碼與步驟說明。 + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hungarian/net/compact-pdf417-encoding/_index.md b/barcode/hungarian/net/compact-pdf417-encoding/_index.md index 17598f023..16ee5654e 100644 --- a/barcode/hungarian/net/compact-pdf417-encoding/_index.md +++ b/barcode/hungarian/net/compact-pdf417-encoding/_index.md @@ -83,6 +83,10 @@ Az alapok mellett itt van néhány gyakorlati tipp a munkafolyamat egyszerűsít ## Compact PDF417 kódolási útmutatók ### [Compact PDF417 vonalkódok létrehozása](./compact-pdf417-basic-configuration/) Ismerje meg, hogyan generáljon Compact PDF417 vonalkódokat az Aspose.BarCode for .NET használatával. Átfogó útmutató lépésről‑lépésre utasításokkal és kódrészletekkel. +### [PDF417 vonalkód kép generálása C#-ban az Aspose segítségével](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Ismerje meg, hogyan hozhat létre PDF417 vonalkód képet C#-ban az Aspose.BarCode használatával. +### [Több vonalkód olvasása C#‑ban – Teljes útmutató PDF417‑vel](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Ismerje meg, hogyan olvashat több vonalkódot C#‑ban a PDF417 használatával, részletes példákkal és beállításokkal. ## Gyakran Ismételt Kérdések @@ -112,4 +116,4 @@ A: Nem szükséges külső betűtípus; a könyvtár minden megjelenítést bels {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hungarian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/hungarian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..373516973 --- /dev/null +++ b/barcode/hungarian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: PDF417 vonalkód kép generálása C#-ban az Aspose segítségével. Tanulja + meg lépésről‑lépésre, hogyan hozhat létre vonalkódot az Aspose-szal, hogyan állíthat + be MacroPDF417 metaadatokat, és hogyan mentheti PNG formátumban. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: hu +lastmod: 2026-07-30 +og_description: Hogyan generáljunk PDF417 vonalkód képet C#-ban az Aspose használatával. + Kövesse ezt a teljes útmutatót a vonalkód létrehozásához az Aspose-szal, a MacroPDF417 + metaadatok beállításához és a PNG fájl kimenethez. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: PDF417 vonalkód kép generálása C#-ban az Aspose segítségével +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Hogyan generáljunk PDF417 vonalkód képet C#-ban az Aspose segítségével +url: /hu/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hogyan generáljunk PDF417 vonalkód képet C#-ban az Aspose segítségével + +A PDF417 vonalkód kép generálása C#-ban az Aspose használatával gyakori akadály mindenki számára, aki nagy sűrűségű adatkódolással foglalkozik. Ebben az útmutatóban minden lépést végigvezetünk – a generátor beállítását, a MacroPDF417 metaadatok finomhangolását, és végül egy tiszta PNG fájl mentését. + +Ha valaha is **generate barcode image c#** próbálkoztál, és csak egy üres vásznat vagy olvashatatlan szkennert kaptál, nem vagy egyedül. A jó hír, hogy az Aspose.BarCode szinte fájdalommentessé teszi a teljes folyamatot, és a cikk végére képes leszel **create barcode with Aspose** minden vállalati munkafolyamatban. + +## Amit megtanulsz + +- Az Aspose.BarCode .NET könyvtár telepítése és hivatkozása. +- PDF417 generátor inicializálása egy egyedi payload-dal. +- MacroPDF417‑specifikus mezők alkalmazása, mint például fájlazonosító, szegmensazonosító és időbélyeg. +- Az eredmény exportálása PNG képként, amelyet jelentésekbe vagy mobilalkalmazásokba ágyazhatsz. +- Tippek a gyakori hibák (pl. helytelen modul szélesség, hiányzó szegmensek) elhárításához. + +A MacroPDF417 előzetes ismerete nem szükséges; elegendő a C# és a Visual Studio alapvető tudása. + +## Előfeltételek + +| Követelmény | Indok | +|-------------|------| +| .NET 6.0 vagy újabb | Aktuális LTS verzió, amelyet az Aspose teljes mértékben támogat | +| Visual Studio 2022 (vagy bármely IDE) | A minta lefordításához és futtatásához | +| Aspose.BarCode for .NET (NuGet) | Biztosítja a `BarcodeGenerator` és a PDF417 támogatást | + +A könyvtár hozzáadható a NuGet-en keresztül: + +```bash +dotnet add package Aspose.BarCode +``` + +Most, hogy az alapok megvannak, merüljünk el a kódban. + +## Hogyan generáljunk PDF417 vonalkód képet C#‑ban – Beállítás + +Az első lépés egy `BarcodeGenerator` példány létrehozása a **MacroPdf417** kódolási típushoz. Ez az objektum tartalmazza az összes konfigurációs beállítást, a modulmérettől a MacroPDF417 által elvárt gazdag metaadatokig. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Miért fontos:** Az `EncodeTypes.MacroPdf417` azt mondja az Aspose-nak, hogy PDF417 vonalkódot hozzon létre, amely több szegmensre bontható – elengedhetetlen nagy fájlok vagy kötegelt feldolgozás esetén. + +## Alapvető megjelenés konfigurálása + +Egy olvasható vonalkód a megfelelő vizuális beállításokkal kezdődik. Az `XDimension` szabályozza minden modul (a kis fekete/fehér négyzetek) szélességét, míg a `Columns` határozza meg, hány oszlopot foglal el a vonalkód. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tipp:** Ha a vonalkód túl sűrűnek tűnik egy nyugtatiszternél, növeld az `XDimension` értékét `3`‑ra vagy `4`‑re. +- **Csapda:** A `Columns` túl alacsonyra állítása azt eredményezheti, hogy a vonalkód kilóg a kép határain, és olvashatatlan lesz a szkenner számára. + +## MacroPDF417 specifikus metaadatok beállítása + +A MacroPDF417 lehetővé teszi, hogy fájlszintű információkat ágyazzunk közvetlenül a vonalkódba. Ez tökéletes nagy dokumentumok nyomon követésére vagy egy fájl több szkennel való felosztására. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Az egyes mezők funkciói:** + +| Tulajdonság | Leírás | +|-------------|--------| +| `MacroPdf417FileID` | Egyedi azonosító a teljes fájlhoz. | +| `MacroPdf417SegmentID` | Az aktuális szegmens indexe (0‑tól kezdődik). | +| `MacroPdf417SegmentsCount` | A fájlra bontott szegmensek teljes száma. | +| `MacroPdf417FileName` | Ember által olvasható név, hasznos audit naplózáshoz. | +| `MacroPdf417Checksum` | 16‑bit CRC az adat integritásának ellenőrzéséhez. | +| `MacroPdf417FileSize` | Az eredeti fájl mérete bájtokban, segít a fogadó félnek a pufferek lefoglalásában. | +| `MacroPdf417TimeStamp` | A fájl generálásának dátuma/ideje. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Opcionális karakterláncok a feladó/fogadó azonosításához. | +| `MacroPdf417Terminator` | Jelzi az utolsó szegmenst; szükséges a helyes dekódoláshoz. | + +> **Miért érdemes:** Ezek a mezők nélkül a szkenner csak a nyers adatot tudja beolvasni, a kontextus nélkül. A metaadatok hozzáadásával a fogadó rendszer automatikusan újraösszeállíthatja az eredeti fájlt. + +## A vonalkód mentése PNG‑ként + +Miután a generátor teljesen be van állítva, a kép mentése egyetlen sorban megoldható: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Fájlformátum:** A PNG veszteségmentes, biztosítva, hogy minden modul éles maradjon a szkennerek számára. +- **Alternatíva:** Használd a `BarCodeImageFormat.Jpeg`‑et, ha kisebb fájlméretre van szükség, de számíts egy enyhe olvashatósági veszteségre. + +### Várható kimenet + +A kódrészlet futtatása után a megadott mappában megtalálod a `MacroPdf417Meta.png` fájlt. A megjelenése hasonló lesz az alábbi ábrához: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Hogyan generáljunk PDF417 vonalkód képet C#-ban"} + +A kép egy sűrű fekete‑fehér négyzetrácsot tartalmaz, a kódolt payloaddal és a MacroPDF417 metaadatokkal beágyazva. + +## Teljes működő példa + +Az alábbi program teljes, másolás‑beillesztés‑kész kód. Bármely .NET 6+ projektben lefordítható, és csak az Aspose.BarCode NuGet csomagra van szüksége. + + + +## Mit érdemes még megtanulni? + +A következő oktatóanyagok szorosan kapcsolódó témákat fednek le, amelyek a jelen útmutatóban bemutatott technikákra épülnek. Minden forrás tartalmaz teljes, működő kódrészleteket lépésről‑lépésre magyarázatokkal, hogy segítsen elsajátítani további API funkciókat és alternatív megvalósítási megközelítéseket a saját projektjeidben. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hungarian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/hungarian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..670dd674f --- /dev/null +++ b/barcode/hungarian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Olvass több vonalkódot C#‑ban az Aspose.BarCode használatával. Tanulja + meg lépésről lépésre, hogyan dekódolja a PDF417‑et, hogyan észlelje a kompakt módot, + és hogyan kezeljen sok vonalkódot egy képen. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: hu +lastmod: 2026-07-30 +og_description: Olvass több vonalkódot C#-ban az Aspose.BarCode segítségével. Ez az + útmutató megmutatja, hogyan dekódolhatja a kép összes vonalkódját, ellenőrizheti + a kompakt módot, és integrálhatja .NET alkalmazásokba. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Több vonalkód beolvasása C# – Teljes útmutató a PDF417-hez +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Több vonalkód olvasása C#-ban – Teljes útmutató a PDF417-hez +url: /hu/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Több vonalkód olvasása C#‑ban – Teljes útmutató PDF417‑el + +Valaha is elgondolkodtál, hogyan **read multiple barcodes C#** egyetlen képből? Lehet, hogy van egy csomag szállítási címke, egy jegyzetkollázs, vagy egy PDF417 dokumentum, amely több kódot is egy képre sűrít. A mindennapi munkám során én is pontosan ebbe a helyzetbe ütköztem – egészen addig, amíg fel nem fedeztem az Aspose.BarCode `BarCodeReader` osztályát. Ez a tutorial végigvezet a képben lévő minden vonalkód dekódolásán, megmutatja, hogyan deríthető ki, hogy egy PDF417 kompakt (truncált) módban van‑e, és hogyan kezelhetők tisztán az eredmények. + +Néhány extra tippet is megosztunk – például, mit tegyünk, ha a kép különböző vonalkód‑szimbólumokat tartalmaz, vagy ha a szkennelés egyáltalán nem ad eredményt. A végére egy kész, futtatható konzolalkalmazást kapsz, amely **read multiple barcodes C#**‑t tud végezni profi módon. + +## Amire szükséged lesz + +Mielőtt belevágnánk, győződj meg róla, hogy a következők telepítve vannak a gépeden: + +- **.NET 6.0** SDK vagy újabb (a kód .NET Framework 4.6+‑tal is működik, de a .NET 6 a legoptimálisabb). +- **Aspose.BarCode for .NET** NuGet csomag (`Install-Package Aspose.BarCode`). +- Egy minta kép, amely **PDF417** vonalkódokat tartalmaz – lehetőleg keverve kompakt és teljes méretű szimbólumokkal. A tutorial a `CompactPdf417.png`‑t használja, de bármely PNG/JPEG megfelel. +- Kedvenc IDE‑d (Visual Studio, Rider vagy VS Code). + +Ennyi – nincs extra DLL, nincs natív függőség. Az Aspose.BarCode tisztán managed kód, így bármely .NET projektbe beilleszthető. + +![Több vonalkód olvasása C# konzol kimenet](image.png "Több vonalkód olvasása C# – konzol képernyő a PDF417 vonalkódok kompakt mód állapotával") + +*Image alt text: Több vonalkód olvasása C# – képernyőkép a konzolról, amely a PDF417 vonalkódok kompakt mód státuszát mutatja.* + +## 1. lépés – Telepítsd és hivatkozz a BarCodeReader C# könyvtárra + +Először is szükséged van a **BarCodeReader C#** osztályra, amely a dekódolást végzi. Nyisd meg a terminált (vagy a Package Manager Console‑t), és futtasd: + +```powershell +dotnet add package Aspose.BarCode +``` + +Vagy ha a Visual Studio NuGet kezelőjében vagy, egyszerűen keresd meg az *Aspose.BarCode*‑t, és kattints a **Install** gombra. Ez a legújabb stabil verziót (2026. júliusban ez a 23.9) hozza be, amely támogatja a PDF417, QR, DataMatrix és számos más szimbólumot. + +Miért fontos ez: a könyvtár elvégzi a képfeldolgozás, hibajavítás és szimbólumfelismerés nehéz részét. Írhatsz saját szkennert, de hetekig kellene küzdened a szélsőséges esetekkel. Az Aspose egy kipróbált, **C# barcode library**‑t biztosít, amely a modern .NET futtatókörnyezetekhez van optimalizálva. + +## 2. lépés – Hozz létre egy minimális konzolprojektet + +Készíts egy új konzolalkalmazást, hogy a vonalkód‑logikára koncentrálhass UI‑zaj nélkül: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Cseréld le a generált `Program.cs`‑t az alábbi teljes példára. Nyugodtan hagyd meg az alapértelmezett névteret, vagy nevezd át – nincs különösebb követelmény. + +## 3. lépés – Írd meg a teljes “Read Multiple Barcodes C#” megvalósítást + +Az alábbi **teljes, futtatható** kódrészlet lefedi az eredeti snippet négy lépését, hibakezelést ad hozzá, és hasznos diagnosztikát nyomtat. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Miért működik ez a kód + +- **`BarCodeReader`** a **BarCodeReader C#** API motorja. Megnyitja a képet, előfeldolgoz, és a megadott típusú szimbólumokat keresi. +- **`ReadBarCodes()`** egy tömböt ad vissza, nem csak egyetlen eredményt. Ez a kulcs a **read multiple barcodes C#**‑hez – a metódus automatikusan összegyűjti az összes megtalált egyezést. +- **`result.Extended.Pdf417.IsTruncated`** megmondja, hogy a PDF417 *compact* (azaz truncált) módban van‑e. Ez a jelző csak PDF417‑hez létezik, ezért a null‑conditional operátorral (`?.`) védünk a kivételektől, ha más szimbólum csúszik be. +- A `foreach` ciklus kiírja a dekódolt szöveget és a kompakt státuszt, így gyors ellenőrzést biztosít. + +## 4. lépés – Különböző vonalkódtípusok kezelése (opcionális) + +Ha a képed PDF417‑on kívül más szimbólumokat is tartalmazhat, egyszerűen állítsd a `BarCodeReader` második argumentumát `DecodeType.AllSupported`‑ra. A ciklus változatlan marad, de a `result.Extended` null értékét le kell ellenőrizni a nem‑PDF417 szimbólumoknál: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Ez a kis módosítás a **C# barcode library**‑t egy univerzális szkennerré alakítja, amely tökéletes kevert‑szimbólumú kötegekhez. + +## 5. lépés – Szélsőséges esetek és legjobb gyakorlatok + +### 1️⃣ Nincsenek vonalkódok észlelve +Ha a `ReadBarCodes()` egy üres tömböt ad vissza, a leggyakoribb okok: + +- Hibás fájlútvonal vagy hiányzó olvasási jogosultság. +- Túl alacsony képminőség (elmosódás, alacsony kontraszt). Érdemes előfeldolgozni a `reader.ImagePreprocessingOptions`‑szel (pl. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Rendkívül nagy képek +Egy 10 MP fotó memóriaigényes lehet. Korlátozhatod a vizsgálati területet: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Szálbiztonság +A `BarCodeReader` implementálja az `IDisposable`‑t, és **nem** szálbiztos. Hozz létre külön példányokat szálanként, ha párhuzamos feldolgozást tervezel. + +### 4️⃣ Licencelés +Az Aspose.BarCode alapból trial módban működik, de vízjelet helyez a kimeneti képre. Éles környezetben állítsd be a licencet a kezdetekkor: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Naplózás +Ha ezt egy nagyobb szolgáltatásba integrálod, cseréld le a `Console.WriteLine`‑t egy strukturált naplózóval (Serilog, NLog). Így a `CodeText`, `CodeType` és `IsTruncated` mezőket is rögzítheted későbbi elemzésekhez. + +## Teljes működő példa összefoglaló + +Az alábbi *teljes* programot egyszerűen másold be a `Program.cs`‑be: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Mit tanulj meg legközelebb? + + +Az alábbi tutorialok szorosan kapcsolódó témákat fednek le, amelyek a jelen útmutatóban bemutatott technikákra épülnek. Minden forrás tartalmaz teljes, működő kódrészleteket lépésről‑lépésre magyarázatokkal, hogy mesterségbeli szinten saját projektjeidben is kiaknázhasd az API további funkcióit és alternatív megvalósítási megközelítéseket. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hungarian/net/one-dimensional-barcode-types/_index.md b/barcode/hungarian/net/one-dimensional-barcode-types/_index.md index 5717cda04..2311840ec 100644 --- a/barcode/hungarian/net/one-dimensional-barcode-types/_index.md +++ b/barcode/hungarian/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ megtudhatja, hogyan hozhat létre vonalkódokat .NET-ben az Aspose.BarCode for . Ismerje meg, hogyan kezelheti a kivételeket, miközben egydimenziós vonalkódokat állít elő az Aspose.BarCode for .NET használatával. Ez a lépésenkénti útmutató hibatűrő vonalkód-megoldásokat biztosít. Kezd el most! ### [Egydimenziós széles-keskeny arány konfiguráció](./one-dimensional-wide-narrow-ratio-configuration/) Az Aspose.BarCode for .NET segítségével egyszerűen hozhat létre testreszabott vonalkódokat. Lépésről lépésre útmutató az egydimenziós széles-keskeny arány konfigurációhoz. +### [Vonalkód olvasása képből – C# vonalkódolvasó példa](./read-barcode-from-image-c-barcode-reader-example/) +Ismerje meg, hogyan olvashat vonalkódot képből C#-ban az Aspose.BarCode használatával. ## Következtetés @@ -89,4 +91,4 @@ Ezzel a cikkel nemcsak ismereteket szerezhet a különféle egydimenziós vonalk {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hungarian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/hungarian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..d841ae085 --- /dev/null +++ b/barcode/hungarian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,279 @@ +--- +category: general +date: 2026-07-30 +description: Olvassa be a vonalkódot képről az Aspose.BarCode for .NET használatával + – egy teljes C# vonalkódolvasó példa, amely bemutatja, hogyan lehet dekódolni a + Macro PDF417 vonalkódokat. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: hu +lastmod: 2026-07-30 +og_description: Olvassa be a vonalkódot képről az Aspose.BarCode for .NET segítségével. + Ez a lépésről‑lépésre bemutatott C# vonalkódolvasó példa megmutatja, hogyan lehet + kinyerni az összes Macro PDF417 metaadatot. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Vonalkód olvasása képről – Teljes C# vonalkódolvasó példa +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Vonalkód olvasása képből – C# vonalkódolvasó példa +url: /hu/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Olvassa be a vonalkódot képről – C# vonalkódolvasó példa + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +Képzelje el, hogy épp most szkennelt be egy szállítási címkét, egy beszállókártyát vagy egy kormányzati személyi igazolványt, amely Macro PDF417 szegmenst tartalmaz. Ki szeretné nyerni a fájlazonosítót, a szegmens számát, az időbélyegeket, sőt akár a feladó nevét – mindezt anélkül, hogy elhagyná a kódot. Pontosan ezt fogjuk elérni, és úgy tesszük, hogy könnyen másolható‑beilleszthető legyen a saját projektjébe. + +--- + +## Mit fogsz megtanulni + +- How to add the Aspose.BarCode NuGet package to a .NET project. +- How to open an image file that contains a Macro PDF417 barcode. +- How to iterate over **read barcode from image** results and access every extended field. +- Tips for handling multiple segments, validating checksums, and troubleshooting common pitfalls. + +A végére egy működő konzolalkalmazást kap, amely kiírja az összes Macro PDF417 metaadatot, készen állva a nagyobb rendszerekbe, például készletkövető vagy dokumentumkezelő csővezetékekbe való integrálásra. + +--- + +## Előfeltételek + +| Requirement | Why it matters | +|-------------|----------------| +| .NET 6.0 SDK vagy újabb (bármely friss verzió működik) | Biztosítja a futtatókörnyezetet a konzolalkalmazáshoz. | +| Visual Studio 2022 (vagy VS Code C# kiegészítővel) | Egyszerűvé teszi a szerkesztést és a hibakeresést. | +| Aspose.BarCode for .NET (ingyenes próba vagy licencelt) | A könyvtár, amely ténylegesen dekódolja a vonalkódot. | +| Egy képfájl (`MacroPdf417Meta.png`), amely Macro PDF417 vonalkódot tartalmaz | A forrás, amelyből olvasni fogunk. | + +Ha még nincs meg az Aspose.BarCode, letöltheti a NuGet‑ből: + +```bash +dotnet add package Aspose.BarCode +``` + +Ez az egyetlen sor telepíti mindazt, amire szüksége van, beleértve a `BarCodeReader`, `DecodeType` és a gazdag `Extended` tulajdonságkészletet, amelyet majd felfedezünk. + +--- + +## 1. lépés – A projekt beállítása és a könyvtár importálása + +Create a fresh console project (or drop the code into an existing one). The `using` directives are essential; they bring the barcode classes into scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Ha Visual Studio‑t használ, az IDE felajánlja a hiányzó `using` utasítások automatikus hozzáadását – csak nyomja meg a *Ctrl+.`* kombinációt. + +--- + +## 2. lépés – Kép elérési útjának előkészítése + +Hard‑coding an absolute path works for a quick demo, but in production you’d probably accept a command‑line argument or a configuration setting. For clarity we’ll keep it simple: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** A `BarCodeReader` érvényes fájlhelyet vár; egy helytelen útvonal `FileNotFoundException`‑t dob, mielőtt a dekódolás elkezdődne. + +--- + +## 3. lépés – **Read barcode from image** és a Macro PDF417 részletek kinyerése + +Now comes the heart of the **c# barcode reader example**. We’ll instantiate `BarCodeReader` with the `DecodeType.MacroPdf417` flag, loop through all results (there can be more than one barcode in a single image), and print every extended property. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Mit csinál a kód (miért, nem csak hogyan) + +1. **`using` block** – Guarantees the native resources (file handles, native decoder memory) are freed immediately after the operation. Skipping this can lead to locked files on Windows. +2. **`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 symbols; other barcode types are ignored, which speeds up scanning. +3. **`ReadBarCodes()`** – Returns a collection because an image might contain multiple Macro PDF417 segments (think of a multi‑page document split across several barcodes). +4. **`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the barcode lacks extended data. +5. **Printing each field** – Gives you visibility into the file identifier, segment ordering, checksum verification, and optional textual fields like sender or addressee. + +--- + +## 4. lépés – Az alkalmazás futtatása és a kimenet ellenőrzése + +Compile and execute the program: + +```bash +dotnet run +``` + +If everything is wired correctly, you should see something akin to the following in your console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** A pontos értékek a dekódolt vonalkódtól függenek. Ha a „No Macro PDF417 extension data found” üzenetet kapja, ellenőrizze, hogy a kép valóban Macro PDF417 kódot tartalmaz‑e, és hogy a megfelelő `DecodeType`‑ot használja. + +--- + +## Több szegmens kezelése és validálás (haladó) + +Macro PDF417 is designed for large data payloads split across several symbols. When you encounter more than one segment, you’ll typically need to: + +1. **Collect all segments** into a dictionary keyed by `SegmentID`. +2. **Sort** them by `SegmentID` to reassemble the original file. +3. **Validate** the `Checksum` against the concatenated payload (Aspose does this internally, but you can re‑run a CRC if you need extra safety). + +Here’s a quick sketch: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +You’ll need to implement `AssembleSegments` and `VerifyChecksum` based on your payload format—often it’s just a byte array concatenation followed by a CRC‑16 check. + +--- + +## Gyakori hibák és elkerülésük + +| Symptom | Likely cause | Fix | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | A kép egyszerű PDF417‑et tartalmaz, nem Macro változatot. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` hibás vagy a fájl nem érhető el. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Keep all processing inside the `using` block. | + +--- + +## Mit érdemes még megtanulni? + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [DataMatrix olvasó programozás az Aspose.BarCode for .NET használatával](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode olvasó inicializálása az Aspose.BarCode for .NET használatával](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Hogyan olvassunk DataMatrix vonalkódokat az Aspose.BarCode for .NET használatával](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/indonesian/net/compact-pdf417-encoding/_index.md b/barcode/indonesian/net/compact-pdf417-encoding/_index.md index e49f3f784..d8aad2685 100644 --- a/barcode/indonesian/net/compact-pdf417-encoding/_index.md +++ b/barcode/indonesian/net/compact-pdf417-encoding/_index.md @@ -78,6 +78,12 @@ Aspose.BarCode memungkinkan Anda mengatur properti `Pdf417ErrorCorrectionLevel` ### [Creating Compact PDF417 Barcodes](./compact-pdf417-basic-configuration/) Pelajari cara menghasilkan barcode Compact PDF417 menggunakan Aspose.BarCode untuk .NET. Panduan komprehensif dengan instruksi langkah‑demi‑langkah dan contoh kode. +### [Cara Membuat Gambar Barcode PDF417 di C# dengan Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Panduan langkah demi langkah menghasilkan gambar barcode PDF417 menggunakan Aspose di C#. + +### [Baca Banyak Barcode C# – Panduan Lengkap dengan PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Panduan lengkap untuk membaca banyak barcode, termasuk PDF417, menggunakan C# dan Aspose.BarCode. + ## Frequently Asked Questions **Q: Apa jumlah maksimum data yang dapat saya simpan dalam barcode Compact PDF417?** @@ -106,4 +112,4 @@ A: Tidak diperlukan font eksternal; pustaka menangani semua rendering secara int {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/indonesian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/indonesian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..5359091eb --- /dev/null +++ b/barcode/indonesian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Cara menghasilkan gambar barcode PDF417 di C# dengan Aspose. Pelajari + langkah demi langkah cara membuat barcode dengan Aspose, mengatur metadata MacroPDF417, + dan menyimpannya sebagai PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: id +lastmod: 2026-07-30 +og_description: Cara menghasilkan gambar barcode PDF417 di C# dengan Aspose. Ikuti + panduan lengkap ini untuk membuat barcode dengan Aspose, mengonfigurasi metadata + MacroPDF417, dan menghasilkan file PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Cara Membuat Gambar Barcode PDF417 di C# dengan Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Cara Menghasilkan Gambar Barcode PDF417 di C# dengan Aspose +url: /id/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cara Membuat Gambar Barcode PDF417 di C# dengan Aspose + +Cara membuat gambar barcode PDF417 di C# dengan Aspose sering menjadi tantangan bagi siapa saja yang menangani pengkodean data berkapasitas tinggi. Dalam panduan ini kami akan membahas setiap langkah—menyiapkan generator, menyesuaikan metadata MacroPDF417, dan akhirnya menyimpan file PNG yang tajam. + +Jika Anda pernah mencoba **generate barcode image c#** dan berakhir dengan kanvas kosong atau pemindaian yang tidak dapat dibaca, Anda tidak sendirian. Kabar baiknya, Aspose.BarCode membuat seluruh proses hampir tanpa rasa sakit, dan pada akhir artikel ini Anda akan dapat **create barcode with Aspose** untuk alur kerja perusahaan apa pun. + +## Apa yang Akan Anda Pelajari + +- Menginstal dan mereferensikan pustaka Aspose.BarCode untuk .NET. +- Menginisialisasi generator PDF417 dengan payload khusus. +- Menerapkan bidang spesifik MacroPDF417 seperti file ID, segment ID, dan timestamp. +- Mengekspor hasil ke gambar PNG yang dapat disisipkan dalam laporan atau aplikasi seluler. +- Tips untuk memecahkan masalah umum (misalnya, lebar modul yang salah, segmen yang hilang). + +Tidak diperlukan pengalaman sebelumnya dengan MacroPDF417; pemahaman dasar tentang C# dan Visual Studio sudah cukup. + +## Prasyarat + +| Persyaratan | Alasan | +|-------------|--------| +| .NET 6.0 atau lebih baru | Versi LTS terkini, sepenuhnya didukung oleh Aspose | +| Visual Studio 2022 (atau IDE apa pun) | Untuk mengkompilasi dan menjalankan contoh | +| Aspose.BarCode untuk .NET (NuGet) | Menyediakan `BarcodeGenerator` dan dukungan PDF417 | + +Anda dapat menambahkan pustaka melalui NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Setelah fondasi selesai, mari kita selami kode. + +## Cara Membuat Gambar Barcode PDF417 di C# – Penyiapan + +Hal pertama yang kami lakukan adalah membuat instance `BarcodeGenerator` untuk tipe enkode **MacroPdf417**. Objek ini memuat semua opsi konfigurasi, mulai dari ukuran modul hingga metadata kaya yang diharapkan MacroPDF417. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Mengapa ini penting:** `EncodeTypes.MacroPdf417` memberi tahu Aspose untuk menghasilkan barcode PDF417 yang dapat dibagi menjadi beberapa segmen—fitur penting untuk file besar atau pemrosesan batch. + +## Mengonfigurasi Penampilan Dasar + +Barcode yang dapat dibaca dimulai dengan pengaturan visual yang tepat. `XDimension` mengontrol lebar setiap modul (kotak hitam/putih kecil), sementara `Columns` menentukan berapa banyak kolom yang akan ditempati barcode. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tip:** Jika barcode terlihat terlalu padat pada printer struk, naikkan `XDimension` menjadi `3` atau `4`. +- **Jebakan:** Menetapkan `Columns` terlalu rendah dapat menyebabkan barcode melampaui batas gambar, menghasilkan pemindaian yang tidak dapat dibaca. + +## Menetapkan Metadata Khusus MacroPDF417 + +MacroPDF417 memungkinkan Anda menyematkan informasi tingkat file langsung ke dalam barcode. Ini sangat cocok untuk melacak pengiriman dokumen besar atau membagi file menjadi beberapa pemindaian. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Apa fungsi masing‑masing bidang:** + +| Properti | Deskripsi | +|----------|-----------| +| `MacroPdf417FileID` | Pengidentifikasi unik untuk seluruh file. | +| `MacroPdf417SegmentID` | Indeks segmen saat ini (dimulai dari 0). | +| `MacroPdf417SegmentsCount` | Jumlah total segmen yang file dibagi. | +| `MacroPdf417FileName` | Nama yang dapat dibaca manusia, berguna untuk log audit. | +| `MacroPdf417Checksum` | CRC 16‑bit untuk verifikasi integritas data. | +| `MacroPdf417FileSize` | Ukuran file asli dalam byte, membantu penerima mengalokasikan buffer. | +| `MacroPdf417TimeStamp` | Tanggal/waktu saat file dibuat. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | String opsional untuk mengidentifikasi pengirim/penerima. | +| `MacroPdf417Terminator` | Menandai segmen terakhir; diperlukan untuk dekoding yang tepat. | + +> **Mengapa repot?** Tanpa bidang‑bidang ini, pemindai hanya dapat membaca data mentah, bukan konteksnya. Menambahkan metadata berarti sistem penerima dapat menyusun kembali file asli secara otomatis. + +## Menyimpan Barcode sebagai PNG + +Setelah generator sepenuhnya dikonfigurasi, menyimpan gambar cukup dengan satu baris kode: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Format file:** PNG bersifat lossless, memastikan setiap modul tetap tajam untuk pemindai. +- **Alternatif:** Gunakan `BarCodeImageFormat.Jpeg` jika Anda memerlukan ukuran file yang lebih kecil, namun harapkan sedikit penurunan keterbacaan. + +### Output yang Diharapkan + +Setelah menjalankan potongan kode, Anda akan menemukan `MacroPdf417Meta.png` di folder yang ditentukan. Gambar tersebut seharusnya mirip dengan ilustrasi di bawah ini: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Cara menghasilkan gambar barcode PDF417 di C#"} + +Gambar tersebut berisi kisi‑kisi padat kotak hitam dan putih, dengan payload yang terenkode serta metadata MacroPDF417 yang disematkan. + +## Contoh Lengkap yang Siap Pakai + +Berikut adalah program lengkap yang dapat Anda salin‑tempel. Program ini dapat dikompilasi dengan proyek .NET 6+ apa pun dan hanya memerlukan paket NuGet Aspose.BarCode. + + + +## Apa yang Harus Anda Pelajari Selanjutnya? + +Tutorial berikut mencakup topik terkait yang membangun teknik yang ditunjukkan dalam panduan ini. Setiap sumber menyertakan contoh kode lengkap dengan penjelasan langkah‑demi‑langkah untuk membantu Anda menguasai fitur API tambahan dan mengeksplorasi pendekatan implementasi alternatif dalam proyek Anda sendiri. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/indonesian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/indonesian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..604501885 --- /dev/null +++ b/barcode/indonesian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Baca beberapa barcode C# menggunakan Aspose.BarCode. Pelajari langkah + demi langkah cara mendekode PDF417, mendeteksi mode kompak, dan menangani banyak + barcode dalam satu gambar. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: id +lastmod: 2026-07-30 +og_description: Baca beberapa barcode C# dengan Aspose.BarCode. Panduan ini menunjukkan + cara mendekode semua barcode dalam sebuah gambar, memeriksa mode kompak, dan mengintegrasikannya + ke dalam aplikasi .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Baca Beberapa Barcode C# – Tutorial Lengkap untuk PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Membaca Banyak Barcode C# – Panduan Lengkap dengan PDF417 +url: /id/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Membaca Banyak Barcode C# – Panduan Lengkap dengan PDF417 + +Pernah bertanya-tanya bagaimana cara **membaca banyak barcode C#** dari satu gambar? Mungkin Anda memiliki sekumpulan label pengiriman, kolase tiket, atau dokumen PDF417 yang memuat beberapa kode dalam satu foto. Dalam pekerjaan sehari‑hari saya, saya pernah menemui situasi itu—sampai saya menemukan `BarCodeReader` dari Aspose.BarCode. Tutorial ini akan memandu Anda melalui proses mendekode setiap barcode dalam sebuah gambar, menentukan apakah setiap PDF417 berada dalam mode kompak (truncated), dan menangani hasilnya dengan bersih. + +Kami juga akan menambahkan beberapa tips tambahan—seperti apa yang harus dilakukan ketika gambar berisi simbol barcode yang berbeda, atau ketika pemindaian tidak menghasilkan apa‑apa. Pada akhir tutorial Anda akan memiliki aplikasi konsol siap‑jalankan yang **membaca banyak barcode C#** seperti seorang profesional. + +## Apa yang Anda Butuhkan + +Sebelum kita mulai, pastikan Anda memiliki hal‑hal berikut di mesin Anda: + +- **.NET 6.0** SDK atau yang lebih baru (kode ini juga bekerja dengan .NET Framework 4.6+ tetapi .NET 6 adalah pilihan yang paling optimal). +- **Aspose.BarCode for .NET** paket NuGet (`Install-Package Aspose.BarCode`). +- Gambar contoh yang berisi barcode **PDF417**—sebaiknya yang mencampur simbol kompak dan ukuran penuh. Tutorial ini menggunakan `CompactPdf417.png`, tetapi PNG/JPEG apa pun dapat dipakai. +- IDE favorit Anda (Visual Studio, Rider, atau VS Code). + +Itu saja—tidak ada DLL tambahan, tidak ada dependensi native. Aspose.BarCode adalah kode yang sepenuhnya dikelola, sehingga Anda dapat menambahkannya ke proyek .NET apa pun. + +![Read multiple barcodes C# console output](image.png "Output konsol membaca banyak barcode C#") + +*Teks alt gambar: Membaca banyak barcode C# – tangkapan layar konsol yang menampilkan status mode kompak untuk barcode PDF417.* + +## Langkah 1 – Instal dan Referensikan Perpustakaan BarCodeReader C# + +Langkah pertama, Anda memerlukan kelas **BarCodeReader C#** yang menggerakkan proses dekoding. Buka terminal Anda (atau Package Manager Console) dan jalankan: + +```powershell +dotnet add package Aspose.BarCode +``` + +Atau, jika Anda berada di dalam NuGet manager Visual Studio, cukup cari *Aspose.BarCode* dan klik **Install**. Ini akan mengunduh versi stabil terbaru (per Juli 2026 versi 23.9), yang mendukung PDF417, QR, DataMatrix, dan puluhan simbol lainnya. + +Mengapa ini penting: perpustakaan ini mengabstraksi pekerjaan berat pemrosesan gambar, koreksi kesalahan, dan pengenalan simbol. Anda bisa menulis pemindai sendiri, tetapi akan menghabiskan minggu-minggu untuk mengatasi kasus tepi. Aspose memberi Anda **perpustakaan barcode C#** yang telah teruji di medan perang dan terus diperbarui untuk runtime .NET modern. + +## Langkah 2 – Siapkan Proyek Konsol Minimal + +Buat aplikasi konsol baru agar kita dapat fokus pada logika barcode tanpa gangguan UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Ganti `Program.cs` yang dihasilkan dengan contoh lengkap di bawah ini. Anda boleh tetap memakai namespace default atau menggantinya—tidak ada hal khusus yang diperlukan. + +## Langkah 3 – Tulis Implementasi “Read Multiple Barcodes C#” Lengkap + +Berikut adalah contoh kode **lengkap dan dapat dijalankan**. Ia mencakup keempat langkah dari cuplikan asli, menambahkan penanganan error, dan mencetak diagnostik yang berguna. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Mengapa Kode Ini Berfungsi + +- **`BarCodeReader`** adalah mesin utama dari API **BarCodeReader C#**. Ia membuka gambar, menerapkan pra‑pemrosesan, dan mencari simbol dengan tipe yang Anda tentukan. +- **`ReadBarCodes()`** mengembalikan sebuah array, bukan hanya satu hasil. Inilah kunci untuk **membaca banyak barcode C#**—metode ini secara otomatis mengumpulkan setiap kecocokan yang ditemukan. +- **`result.Extended.Pdf417.IsTruncated`** memberi tahu kita apakah PDF417 berada dalam mode *kompak* (alias truncated). Flag ini hanya ada untuk PDF417, sehingga kami melindungi dengan operator null‑conditional (`?.`) untuk menghindari exception bila simbol lain muncul. +- Loop `foreach` mencetak teks terdekripsi serta status kompak, memberikan Anda pemeriksaan cepat. + +## Langkah 4 – Menangani Berbagai Tipe Barcode (Opsional) + +Jika gambar Anda mungkin berisi lebih dari PDF417, cukup ubah argumen kedua `BarCodeReader` menjadi `DecodeType.AllSupported`. Loop tetap sama, tetapi Anda perlu melindungi terhadap `result.Extended` yang null untuk simbol non‑PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Penyesuaian kecil ini mengubah **perpustakaan barcode C#** Anda menjadi pemindai universal, cocok untuk batch dengan simbol campuran. + +## Langkah 5 – Kasus Tepi dan Tips Praktik Terbaik + +### 1️⃣ Tidak Ada Barcode yang Terdeteksi +Jika `ReadBarCodes()` mengembalikan array kosong, penyebab paling umum adalah: + +- Jalur file salah atau izin baca yang hilang. +- Kualitas gambar terlalu rendah (blur, kontras rendah). Pertimbangkan pra‑pemrosesan dengan `reader.ImagePreprocessingOptions` (misalnya `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Gambar Sangat Besar +Memproses foto 10 MP dapat menghabiskan memori. Anda dapat membatasi area pemindaian: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Keamanan Thread +`BarCodeReader` mengimplementasikan `IDisposable` dan **tidak** thread‑safe. Buat instance terpisah per thread bila Anda memerlukan pemrosesan paralel. + +### 4️⃣ Lisensi +Aspose.BarCode berfungsi dalam mode trial secara default, tetapi Anda akan melihat watermark pada gambar output. Untuk produksi, setel lisensi di awal: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +Saat mengintegrasikan ini ke layanan yang lebih besar, ganti `Console.WriteLine` dengan logger terstruktur (Serilog, NLog). Dengan begitu Anda dapat menangkap `CodeText`, `CodeType`, dan `IsTruncated` sebagai field untuk analitik downstream. + +## Ringkasan Contoh Kerja Penuh + +Menggabungkan semuanya, berikut adalah *seluruh* program yang dapat Anda salin‑tempel ke `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Apa yang Harus Anda Pelajari Selanjutnya? + + +Tutorial berikut mencakup topik terkait yang membangun teknik yang ditunjukkan dalam panduan ini. Setiap sumber menyertakan contoh kode lengkap dengan penjelasan langkah‑demi‑langkah untuk membantu Anda menguasai fitur API tambahan dan mengeksplorasi pendekatan implementasi alternatif dalam proyek Anda sendiri. + +- [Cara Menghasilkan Barcode PDF417 – Encoding PDF417 Kompak](/barcode/english/net/compact-pdf417-encoding/) +- [Cara Membuat Barcode – PDF417 Kompak dengan Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Cara Membaca Barcode DataMatrix dengan Aspose.BarCode untuk .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/indonesian/net/one-dimensional-barcode-types/_index.md b/barcode/indonesian/net/one-dimensional-barcode-types/_index.md index 7f12b70c9..708f6fa25 100644 --- a/barcode/indonesian/net/one-dimensional-barcode-types/_index.md +++ b/barcode/indonesian/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,7 @@ dapatkan cara membuat kode batang di .NET dengan Aspose.BarCode untuk .NET. Tuto Pelajari cara menangani pengecualian saat membuat kode batang satu dimensi menggunakan Aspose.BarCode untuk .NET. Panduan langkah demi langkah ini memastikan solusi kode batang yang toleran terhadap kesalahan. Mulai sekarang! ### [Konfigurasi Rasio Lebar-Sempit Satu Dimensi](./one-dimensional-wide-narrow-ratio-configuration/) Hasilkan kode batang khusus dengan mudah menggunakan Aspose.BarCode untuk .NET. Panduan langkah demi langkah untuk konfigurasi rasio lebar-sempit satu dimensi. +### [Baca barcode dari gambar – contoh pembaca barcode C#](./read-barcode-from-image-c-barcode-reader-example/) ## Kesimpulan @@ -89,4 +90,4 @@ Dengan artikel ini, Anda tidak hanya akan memperoleh pengetahuan tentang berbaga {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/indonesian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/indonesian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..1cd45e237 --- /dev/null +++ b/barcode/indonesian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,279 @@ +--- +category: general +date: 2026-07-30 +description: Baca kode batang dari gambar menggunakan Aspose.BarCode untuk .NET – + contoh lengkap pembaca kode batang C# yang menunjukkan cara mendekode kode batang + Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: id +lastmod: 2026-07-30 +og_description: Baca kode batang dari gambar dengan Aspose.BarCode untuk .NET. Contoh + pembaca kode batang C# langkah demi langkah ini menunjukkan cara mengekstrak semua + metadata Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Baca kode batang dari gambar – Contoh lengkap pembaca kode batang C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Baca kode batang dari gambar – contoh pembaca kode batang C# +url: /id/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Baca barcode dari gambar – contoh pembaca barcode C# + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +Bayangkan Anda baru saja memindai label pengiriman, boarding pass, atau KTP pemerintah yang menyisipkan segmen Macro PDF417. Anda ingin mengambil ID file, jumlah segmen, cap waktu, dan bahkan nama pengirim—semua tanpa meninggalkan kode Anda. Itulah yang akan kita capai, dan kita akan melakukannya dengan cara yang mudah disalin‑tempel ke proyek Anda sendiri. + +--- + +## Apa yang akan Anda pelajari + +- Cara menambahkan paket NuGet Aspose.BarCode ke proyek .NET. +- Cara membuka file gambar yang berisi barcode Macro PDF417. +- Cara mengiterasi hasil **read barcode from image** dan mengakses setiap bidang tambahan. +- Tips untuk menangani beberapa segmen, memvalidasi checksum, dan memecahkan masalah umum. + +Pada akhir panduan ini Anda akan memiliki aplikasi konsol yang mencetak semua metadata Macro PDF417, siap diintegrasikan ke sistem yang lebih besar seperti pelacak inventaris atau alur kerja manajemen dokumen. + +--- + +## Prasyarat + +Sebelum kita mulai, pastikan Anda memiliki hal‑hal berikut: + +| Persyaratan | Mengapa penting | +|-------------|-----------------| +| .NET 6.0 SDK atau yang lebih baru (versi terbaru apa pun) | Menyediakan runtime untuk aplikasi konsol. | +| Visual Studio 2022 (atau VS Code dengan ekstensi C#) | Mempermudah pengeditan dan debugging. | +| Aspose.BarCode for .NET (free trial or licensed) | Pustaka yang sebenarnya mendekode barcode. | +| File gambar (`MacroPdf417Meta.png`) yang berisi barcode Macro PDF417 | Sumber yang akan kami baca. | + +Jika Anda belum memiliki Aspose.BarCode, Anda dapat mengunduhnya dari NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Baris tunggal itu menginstal semua yang Anda butuhkan, termasuk `BarCodeReader`, `DecodeType`, dan set properti `Extended` yang kaya yang akan kami jelajahi. + +--- + +## Langkah 1 – Siapkan proyek dan impor pustaka + +Buat proyek konsol baru (atau masukkan kode ke proyek yang sudah ada). Direktif `using` sangat penting; mereka membawa kelas barcode ke dalam ruang lingkup. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Jika Anda menggunakan Visual Studio, IDE akan menawarkan menambahkan pernyataan `using` yang hilang secara otomatis—cukup tekan *Ctrl+.`*. + +--- + +## Langkah 2 – Siapkan jalur gambar + +Hard‑coding jalur absolut bekerja untuk demo cepat, tetapi di produksi Anda mungkin menerima argumen baris perintah atau pengaturan konfigurasi. Untuk kejelasan kami akan tetap sederhana: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Mengapa penting:** `BarCodeReader` mengharapkan lokasi file yang valid; jalur yang salah akan melempar `FileNotFoundException` sebelum proses dekode dimulai. + +--- + +## Langkah 3 – **Baca barcode dari gambar** dan ekstrak detail Macro PDF417 + +Sekarang masuk ke inti **c# barcode reader example**. Kami akan menginstansiasi `BarCodeReader` dengan flag `DecodeType.MacroPdf417`, melintasi semua hasil (bisa lebih dari satu barcode dalam satu gambar), dan mencetak setiap properti tambahan. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Apa yang dilakukan kode (mengapa, bukan hanya bagaimana) + +1. **`using` block** – Menjamin sumber daya native (handle file, memori decoder native) dibebaskan segera setelah operasi. Melewatkannya dapat menyebabkan file terkunci di Windows. +2. **`DecodeType.MacroPdf417`** – Memerintahkan Aspose untuk mencari simbol Macro PDF417 secara khusus; tipe barcode lain diabaikan, yang mempercepat pemindaian. +3. **`ReadBarCodes()`** – Mengembalikan koleksi karena sebuah gambar mungkin berisi beberapa segmen Macro PDF417 (bayangkan dokumen multi‑halaman yang dibagi menjadi beberapa barcode). +4. **`macroResult.Extended?.Pdf417`** – Objek `Extended` dapat bernilai null; operator navigasi aman (`?.`) mencegah `NullReferenceException` jika barcode tidak memiliki data tambahan. +5. **Mencetak setiap field** – Memberikan visibilitas ke identifier file, urutan segmen, verifikasi checksum, dan field teks opsional seperti pengirim atau penerima. + +--- + +## Langkah 4 – Jalankan aplikasi dan verifikasi output + +Kompilasi dan jalankan program: + +```bash +dotnet run +``` + +Jika semuanya terhubung dengan benar, Anda akan melihat sesuatu yang mirip dengan berikut di konsol Anda: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Catatan:** Nilai tepat tergantung pada barcode yang Anda dekode. Jika Anda mendapatkan “No Macro PDF417 extension data found,” periksa kembali bahwa gambar benar‑benar berisi kode Macro PDF417 dan bahwa Anda menggunakan `DecodeType` yang tepat. + +--- + +## Menangani beberapa segmen dan validasi (lanjutan) + +Macro PDF417 dirancang untuk muatan data besar yang dibagi menjadi beberapa simbol. Ketika Anda menemukan lebih dari satu segmen, biasanya Anda perlu: + +1. Kumpulkan semua segmen ke dalam kamus yang diindeks oleh `SegmentID`. +2. Urutkan mereka berdasarkan `SegmentID` untuk menyusun kembali file asli. +3. Validasi `Checksum` terhadap payload yang digabungkan (Aspose melakukannya secara internal, tetapi Anda dapat menjalankan kembali CRC jika memerlukan keamanan tambahan). + +Berikut sketsa cepat: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Anda perlu mengimplementasikan `AssembleSegments` dan `VerifyChecksum` berdasarkan format payload Anda—seringkali hanya penggabungan array byte diikuti dengan pemeriksaan CRC‑16. + +--- + +## Kesalahan umum dan cara menghindarinya + +| Gejala | Penyebab kemungkinan | Perbaikan | +|--------|----------------------|-----------| +| `null` dikembalikan dari `macroResult.Extended` | Gambar berisi PDF417 biasa, bukan versi Macro. | Gunakan `DecodeType.Pdf417` sebagai gantinya, atau verifikasi barcode sumber. | +| Tidak ada output sama sekali | `imagePath` salah atau file tidak dapat diakses. | Periksa kembali jalur file; pastikan aplikasi memiliki izin membaca. | +| Exception “Object disposed” | Mencoba menggunakan `reader` setelah blok `using`. | Simpan semua pemrosesan di dalam ` | + +## Apa yang Harus Anda Pelajari Selanjutnya? + +Tutorial berikut mencakup topik terkait yang membangun teknik yang ditunjukkan dalam panduan ini. Setiap sumber mencakup contoh kode lengkap yang berfungsi dengan penjelasan langkah‑demi‑langkah untuk membantu Anda menguasai fitur API tambahan dan mengeksplorasi pendekatan implementasi alternatif dalam proyek Anda sendiri. + +- [Pemrograman Pembaca DataMatrix dengan Aspose.BarCode untuk .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Inisialisasi Pembaca DotCode dengan Aspose.BarCode untuk .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Cara Membaca Barcode DataMatrix dengan Aspose.BarCode untuk .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/italian/net/compact-pdf417-encoding/_index.md b/barcode/italian/net/compact-pdf417-encoding/_index.md index 9fd32044d..09454248c 100644 --- a/barcode/italian/net/compact-pdf417-encoding/_index.md +++ b/barcode/italian/net/compact-pdf417-encoding/_index.md @@ -84,7 +84,11 @@ Oltre alle basi, ecco alcuni consigli pratici per ottimizzare il tuo flusso di l ## Tutorial di codifica Compact PDF417 ### [Creating Compact PDF417 Barcodes](./compact-pdf417-basic-configuration/) -Scopri come generare codici a barre Compact PDF417 usando Aspose.BarCode per .NET. Guida completa con istruzioni passo‑per‑passo ed esempi di codice. +Scopri come generare codici a barre Compact PDF417 usando Aspose.BarCode per .NET. Guida completa con istruzioni passo‑per‑step ed esempi di codice. +### [Come generare un'immagine di codice a barre PDF417 in C# con Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Impara a creare un'immagine di codice a barre PDF417 in C# usando Aspose.BarCode. +### [Leggi più codici a barre C# – Guida completa con PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Scopri come leggere più codici a barre, incluso PDF417, usando C# e Aspose.BarCode. ## Domande frequenti @@ -114,4 +118,4 @@ R: No, non sono richiesti font esterni; la libreria gestisce tutto il rendering {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/italian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/italian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..169bf7db6 --- /dev/null +++ b/barcode/italian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Come generare un'immagine di codice a barre PDF417 in C# con Aspose. + Impara passo passo come creare il codice a barre con Aspose, impostare i metadati + MacroPDF417 e salvarlo come PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: it +lastmod: 2026-07-30 +og_description: Come generare un'immagine di codice a barre PDF417 in C# con Aspose. + Segui questa guida completa per creare un codice a barre con Aspose, configurare + i metadati MacroPDF417 e generare un file PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Come generare un'immagine di codice a barre PDF417 in C# con Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Come generare un'immagine di codice a barre PDF417 in C# con Aspose +url: /it/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Come generare un'immagine barcode PDF417 in C# con Aspose + +Generare un'immagine barcode PDF417 in C# con Aspose è un ostacolo frequente per chiunque lavori con la codifica di dati ad alta densità. In questa guida percorreremo ogni passaggio—configurare il generatore, modificare i metadati MacroPDF417 e, infine, salvare un file PNG nitido. + +Se hai mai provato a **generare barcode immagine c#** e ti sei ritrovato con una tela vuota o una scansione illeggibile, non sei solo. La buona notizia è che Aspose.BarCode rende l'intero processo quasi indolore, e alla fine di questo articolo sarai in grado di **creare barcode con Aspose** per qualsiasi flusso di lavoro aziendale. + +## Cosa imparerai + +- Installare e referenziare la libreria Aspose.BarCode per .NET. +- Inizializzare un generatore PDF417 con un payload personalizzato. +- Applicare i campi specifici MacroPDF417 come file ID, segment ID e timestamp. +- Esportare il risultato in un'immagine PNG da incorporare in report o app mobile. +- Suggerimenti per risolvere problemi comuni (ad es., larghezza modulo errata, segmenti mancanti). + +Non è necessaria alcuna esperienza pregressa con MacroPDF417; una comprensione di base di C# e Visual Studio sarà sufficiente. + +## Prerequisiti + +| Requisito | Motivo | +|-----------|--------| +| .NET 6.0 o successivo | Versione LTS attuale, pienamente supportata da Aspose | +| Visual Studio 2022 (o qualsiasi IDE) | Per compilare ed eseguire il campione | +| Aspose.BarCode per .NET (NuGet) | Fornisce `BarcodeGenerator` e il supporto PDF417 | + +Puoi aggiungere la libreria tramite NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Ora che le basi sono pronte, immergiamoci nel codice. + +## Come generare un'immagine barcode PDF417 in C# – Configurazione + +La prima cosa che facciamo è creare un'istanza di `BarcodeGenerator` per il tipo di codifica **MacroPdf417**. Questo oggetto contiene tutte le opzioni di configurazione, dalla dimensione del modulo ai ricchi metadati che MacroPDF417 si aspetta. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Perché è importante:** `EncodeTypes.MacroPdf417` indica ad Aspose di produrre un barcode PDF417 che può essere suddiviso in più segmenti—una necessità per file di grandi dimensioni o elaborazioni batch. + +## Configura l'aspetto di base + +Un barcode leggibile inizia con le impostazioni visive corrette. `XDimension` controlla la larghezza di ogni modulo (i piccoli quadrati nero/bianco), mentre `Columns` determina quante colonne occupa il barcode. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Suggerimento:** Se il barcode appare troppo denso su una stampante di ricevute, aumenta `XDimension` a `3` o `4`. +- **Insidia:** Impostare `Columns` troppo basso può far traboccare il barcode oltre i bordi dell'immagine, rendendo la scansione illeggibile. + +## Imposta i metadati specifici MacroPDF417 + +MacroPDF417 ti consente di incorporare informazioni a livello di file direttamente nel barcode. È perfetto per tracciare la spedizione di grandi documenti o suddividere un file in più scansioni. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Cosa fa ciascun campo:** + +| Proprietà | Descrizione | +|-----------|-------------| +| `MacroPdf417FileID` | Identificatore univoco per l'intero file. | +| `MacroPdf417SegmentID` | Indice del segmento corrente (parte da 0). | +| `MacroPdf417SegmentsCount` | Numero totale di segmenti in cui il file è suddiviso. | +| `MacroPdf417FileName` | Nome leggibile dall'uomo, utile per i log di audit. | +| `MacroPdf417Checksum` | CRC a 16 bit per la verifica dell'integrità dei dati. | +| `MacroPdf417FileSize` | Dimensione originale del file in byte, aiuta i destinatari a allocare buffer. | +| `MacroPdf417TimeStamp` | Data/ora di generazione del file. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Stringhe opzionali per identificare mittente/destinatario. | +| `MacroPdf417Terminator` | Segna l'ultimo segmento; richiesto per una corretta decodifica. | + +> **Perché farlo?** Senza questi campi, uno scanner può leggere solo i dati grezzi, non il contesto. Aggiungere metadati permette al sistema ricevente di ricomporre automaticamente il file originale. + +## Salva il barcode come PNG + +Una volta che il generatore è completamente configurato, salvare l'immagine è una riga di codice: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Formato file:** PNG è lossless, garantendo che ogni modulo rimanga nitido per gli scanner. +- **Alternativa:** Usa `BarCodeImageFormat.Jpeg` se ti serve una dimensione file più piccola, ma attenditi una leggera perdita di leggibilità. + +### Output previsto + +Dopo aver eseguito lo snippet, troverai `MacroPdf417Meta.png` nella cartella specificata. Dovrebbe apparire simile all'illustrazione qui sotto: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Come generare un'immagine barcode PDF417 in C#"} + +L'immagine contiene una griglia densa di quadrati neri e bianchi, con il payload codificato e i metadati MacroPDF417 incorporati. + +## Esempio completo funzionante + +Di seguito trovi il programma completo, pronto per il copia‑incolla. Compila con qualsiasi progetto .NET 6+ e richiede solo il pacchetto NuGet Aspose.BarCode. + + + +## Cosa dovresti imparare dopo? + +I tutorial seguenti trattano argomenti strettamente correlati che si basano sulle tecniche dimostrate in questa guida. Ogni risorsa include esempi di codice completi con spiegazioni passo‑passo per aiutarti a padroneggiare funzionalità API aggiuntive ed esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/italian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/italian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..a1baa527d --- /dev/null +++ b/barcode/italian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Leggi più codici a barre in C# usando Aspose.BarCode. Impara passo passo + come decodificare PDF417, rilevare la modalità compatta e gestire molti codici a + barre in un'unica immagine. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: it +lastmod: 2026-07-30 +og_description: Leggi più codici a barre in C# con Aspose.BarCode. Questa guida ti + mostra come decodificare tutti i codici a barre in un'immagine, verificare la modalità + compatta e integrare nelle applicazioni .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Leggi più codici a barre C# – Tutorial completo per PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Leggi più codici a barre C# – Guida completa con PDF417 +url: /it/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Leggi più codici a barre C# – Guida completa con PDF417 + +Ti sei mai chiesto come **leggere più codici a barre C#** da un’unica immagine? Forse hai un lotto di etichette di spedizione, un collage di biglietti o un documento PDF417 che raggruppa diversi codici in una sola foto. Nel mio lavoro quotidiano, mi sono imbattuto proprio in questo ostacolo—finché non ho scoperto `BarCodeReader` di Aspose.BarCode. Questo tutorial ti guiderà nella decodifica di ogni codice a barre presente in un’immagine, nel capire se ciascun PDF417 è in modalità compatta (troncata) e nella gestione pulita dei risultati. + +Inseriremo anche qualche suggerimento extra—come cosa fare quando l’immagine contiene diverse simbologie di codici a barre, o quando una scansione non restituisce alcun risultato. Alla fine avrai un’app console pronta all’uso che **legge più codici a barre C#** come un professionista. + +## Cosa ti servirà + +Prima di iniziare, assicurati di avere quanto segue sulla tua macchina: + +- **.NET 6.0** SDK o versioni successive (il codice funziona anche con .NET Framework 4.6+, ma .NET 6 è l’opzione consigliata). +- **Aspose.BarCode for .NET** pacchetto NuGet (`Install-Package Aspose.BarCode`). +- Un’immagine di esempio che contenga codici **PDF417**—preferibilmente una che mescoli simboli compatti e a grandezza intera. Il tutorial utilizza `CompactPdf417.png`, ma qualsiasi PNG/JPEG andrà bene. +- Il tuo IDE preferito (Visual Studio, Rider o VS Code). + +Questo è tutto—nessun DLL aggiuntivo, nessuna dipendenza nativa. Aspose.BarCode è puro codice gestito, quindi puoi inserirlo in qualsiasi progetto .NET. + +![Output della console per leggere più codici a barre C#](image.png "Output della console per leggere più codici a barre C#") + +*Testo alternativo dell’immagine: Leggi più codici a barre C# – screenshot della console che mostra lo stato della modalità compatta per i codici PDF417.* + +## Passo 1 – Installa e fai riferimento alla libreria BarCodeReader C# + +Prima di tutto, ti serve la classe **BarCodeReader C#** che alimenta la decodifica. Apri il terminale (o la Console di Gestione Pacchetti) ed esegui: + +```powershell +dotnet add package Aspose.BarCode +``` + +Oppure, se sei dentro il gestore NuGet di Visual Studio, cerca *Aspose.BarCode* e premi **Install**. Questo scarica l’ultima versione stabile (a luglio 2026 è la 23.9), che supporta PDF417, QR, DataMatrix e decine di altre simbologie. + +Perché è importante: la libreria astrae il lavoro pesante di elaborazione immagine, correzione errori e riconoscimento simboli. Potresti scrivere il tuo scanner, ma impiegheresti settimane a gestire i casi limite. Aspose ti fornisce una **libreria di codici a barre C#** collaudata, aggiornata per i runtime .NET moderni. + +## Passo 2 – Configura un progetto console minimale + +Crea una nuova app console così da concentrarti solo sulla logica dei codici a barre senza distrazioni UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Sostituisci il `Program.cs` generato con l’esempio completo qui sotto. Puoi mantenere lo spazio dei nomi predefinito o rinominarlo—non è richiesto nulla di speciale. + +## Passo 3 – Scrivi l'implementazione completa “Read Multiple Barcodes C#” + +Di seguito trovi un **codice completo, eseguibile**. Copre tutti e quattro i passaggi dello snippet originale, aggiunge la gestione degli errori e stampa diagnostica utile. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Perché questo codice funziona + +- **`BarCodeReader`** è il motore principale dell’API **BarCodeReader C#**. Apre l’immagine, applica il pre‑processing e ricerca i simboli del tipo specificato. +- **`ReadBarCodes()`** restituisce un array, non un singolo risultato. Questa è la chiave per **leggere più codici a barre C#**—il metodo raccoglie automaticamente ogni corrispondenza trovata. +- **`result.Extended.Pdf417.IsTruncated`** indica se il PDF417 è in modalità *compact* (nota anche come troncata). Questa proprietà esiste solo per PDF417, quindi usiamo l’operatore condizionale null (`?.`) per evitare eccezioni se compare un’altra simbologia. +- Il ciclo `foreach` stampa sia il testo decodificato sia lo stato della modalità compatta, fornendoti un rapido controllo di coerenza. + +## Passo 4 – Gestione di diversi tipi di codici a barre (Opzionale) + +Se la tua immagine può contenere più di PDF417, cambia semplicemente il secondo argomento di `BarCodeReader` in `DecodeType.AllSupported`. Il ciclo rimane invariato, ma dovrai verificare che `result.Extended` sia null per simboli non PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Questa piccola modifica trasforma la tua **libreria di codici a barre C#** in uno scanner universale, perfetto per lotti con simbologie miste. + +## Passo 5 – Casi limite e consigli di best practice + +### 1️⃣ Nessun codice a barre rilevato +Se `ReadBarCodes()` restituisce un array vuoto, i colpevoli più comuni sono: + +- Percorso file errato o permessi di lettura mancanti. +- Qualità dell’immagine troppo bassa (sfocatura, basso contrasto). Considera il pre‑processing con `reader.ImagePreprocessingOptions` (es. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Immagini estremamente grandi +Elaborare una foto da 10 MP può consumare molta memoria. Puoi limitare l’area di scansione: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Sicurezza dei thread +`BarCodeReader` implementa `IDisposable` e **non** è thread‑safe. Crea istanze separate per ogni thread se ti serve l’elaborazione parallela. + +### 4️⃣ Licenza +Aspose.BarCode funziona in modalità trial subito dopo l’installazione, ma vedrai una filigrana sull’immagine di output. Per la produzione, imposta la licenza all’inizio: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +Quando integri questo codice in un servizio più ampio, sostituisci `Console.WriteLine` con un logger strutturato (Serilog, NLog). In questo modo potrai catturare `CodeText`, `CodeType` e `IsTruncated` come campi per analisi successive. + +## Riepilogo dell'esempio completo funzionante + +Mettendo tutto insieme, ecco il *programma intero* che puoi copiare‑incollare in `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Cosa dovresti imparare dopo? + +I tutorial seguenti trattano argomenti strettamente correlati che si basano sulle tecniche dimostrate in questa guida. Ogni risorsa include esempi di codice completi con spiegazioni passo‑passo per aiutarti a padroneggiare funzionalità aggiuntive dell’API ed esplorare approcci alternativi nei tuoi progetti. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/italian/net/one-dimensional-barcode-types/_index.md b/barcode/italian/net/one-dimensional-barcode-types/_index.md index dc08df975..f704b8029 100644 --- a/barcode/italian/net/one-dimensional-barcode-types/_index.md +++ b/barcode/italian/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ guadagna come generare codici a barre in .NET con Aspose.BarCode per .NET. Quest Scopri come gestire le eccezioni durante la generazione di codici a barre unidimensionali utilizzando Aspose.BarCode per .NET. Questa guida passo passo garantisce soluzioni per codici a barre tolleranti agli errori. Inizia ora! ### [Configurazione unidimensionale del rapporto largo-stretto](./one-dimensional-wide-narrow-ratio-configuration/) Genera facilmente codici a barre personalizzati con Aspose.BarCode per .NET. Guida passo passo per la configurazione unidimensionale del rapporto largo-stretto. +### [Leggi il codice a barre da immagine – esempio lettore C#](./read-barcode-from-image-c-barcode-reader-example/) +Scopri come leggere codici a barre da un'immagine in C# usando Aspose.BarCode con un esempio pratico passo passo. ## Conclusione @@ -89,4 +91,4 @@ Con questo articolo non solo acquisirai conoscenze sui vari tipi di codici a bar {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/italian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/italian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..2749f4e01 --- /dev/null +++ b/barcode/italian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,281 @@ +--- +category: general +date: 2026-07-30 +description: Leggi il codice a barre da un'immagine usando Aspose.BarCode per .NET + – un esempio completo di lettore di codici a barre in C# che mostra come decodificare + i codici a barre Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: it +lastmod: 2026-07-30 +og_description: Leggi il codice a barre da un'immagine con Aspose.BarCode per .NET. + Questo esempio passo‑passo di lettura di codici a barre in C# mostra come estrarre + tutti i metadati Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Leggi il codice a barre da un'immagine – Esempio completo di lettore di + codici a barre in C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Leggi il codice a barre dall'immagine – esempio di lettore di codici a barre + C# +url: /it/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Leggere il codice a barre da un'immagine – esempio di lettore di codici a barre C# + +Hai bisogno di **leggere il codice a barre da un'immagine** in un'applicazione C#? Sei nel posto giusto. In questo tutorial percorreremo un *esempio di lettore di codici a barre c#* completo che utilizza la libreria Aspose.BarCode per .NET per decodificare un codice a barre Macro PDF417 e estrarre ogni informazione estesa fornita dallo standard. + +Immagina di aver appena scansionato un'etichetta di spedizione, una carta d'imbarco o un documento d'identità governativo che incorpora un segmento Macro PDF417. Vuoi estrarre l'ID del file, il conteggio dei segmenti, i timestamp e magari anche il nome del mittente—tutto senza uscire dal tuo codice. È esattamente quello che otterremo, e lo faremo in modo da poter copiare‑incollare facilmente nel tuo progetto. + +--- + +## Cosa imparerai + +- Come aggiungere il pacchetto NuGet Aspose.BarCode a un progetto .NET. +- Come aprire un file immagine che contiene un codice a barre Macro PDF417. +- Come iterare sui risultati di **leggere il codice a barre da un'immagine** e accedere a ogni campo esteso. +- Suggerimenti per gestire più segmenti, convalidare i checksum e risolvere problemi comuni. + +Alla fine di questa guida avrai un'app console funzionante che stampa tutti i metadati Macro PDF417, pronta per essere integrata in sistemi più grandi come tracker di inventario o pipeline di gestione documentale. + +--- + +## Prerequisiti + +Prima di immergerci, assicurati di avere quanto segue: + +| Requisito | Perché è importante | +|-------------|----------------| +| .NET 6.0 SDK o versioni successive (qualsiasi versione recente va bene) | Fornisce il runtime per l'app console. | +| Visual Studio 2022 (o VS Code con estensione C#) | Rende la modifica e il debug indolori. | +| Aspose.BarCode per .NET (versione di prova gratuita o licenziata) | La libreria che effettivamente decodifica il codice a barre. | +| Un file immagine (`MacroPdf417Meta.png`) che contiene un codice a barre Macro PDF417 | La sorgente da cui leggeremo. | + +Se non hai ancora Aspose.BarCode, puoi scaricarlo da NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Quella singola riga installa tutto il necessario, inclusi `BarCodeReader`, `DecodeType` e il ricco set di proprietà `Extended` che esploreremo. + +--- + +## Passo 1 – Configura il progetto e importa la libreria + +Crea un nuovo progetto console (o inserisci il codice in uno esistente). Le direttive `using` sono essenziali; portano le classi del codice a barre nello scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Se usi Visual Studio, l'IDE offrirà di aggiungere automaticamente le dichiarazioni `using` mancanti—basta premere *Ctrl+.`*. + +--- + +## Passo 2 – Prepara il percorso dell'immagine + +Hard‑coding di un percorso assoluto funziona per una dimostrazione rapida, ma in produzione probabilmente accetteresti un argomento da riga di comando o una impostazione di configurazione. Per chiarezza lo manterremo semplice: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Perché è importante:** `BarCodeReader` si aspetta una posizione file valida; un percorso errato genera una `FileNotFoundException` prima ancora che inizi la decodifica. + +--- + +## Passo 3 – **Leggere il codice a barre da un'immagine** e estrarre i dettagli Macro PDF417 + +Ora arriva il cuore del **esempio di lettore di codici a barre c#**. Istanzieremo `BarCodeReader` con il flag `DecodeType.MacroPdf417`, cicleremo tutti i risultati (potrebbero esserci più di un codice a barre in una singola immagine) e stamperemo ogni proprietà estesa. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Cosa fa il codice (perché, non solo come) + +1. **`using` block** – Garantisce che le risorse native (handle di file, memoria del decoder nativo) vengano rilasciate immediatamente dopo l'operazione. Saltare questo passaggio può provocare file bloccati su Windows. +2. **`DecodeType.MacroPdf417`** – Indica ad Aspose di cercare specificamente simboli Macro PDF417; gli altri tipi di codice a barre vengono ignorati, velocizzando la scansione. +3. **`ReadBarCodes()`** – Restituisce una collezione perché un'immagine può contenere più segmenti Macro PDF417 (pensa a un documento multipagina suddiviso in diversi codici a barre). +4. **`macroResult.Extended?.Pdf417`** – L'oggetto `Extended` è nullable; l'operatore di navigazione sicura (`?.`) previene una `NullReferenceException` se il codice a barre non contiene dati estesi. +5. **Printing each field** – Ti offre visibilità sull'identificatore del file, l'ordinamento dei segmenti, la verifica del checksum e i campi testuali opzionali come mittente o destinatario. + +--- + +## Passo 4 – Esegui l'applicazione e verifica l'output + +Compila ed esegui il programma: + +```bash +dotnet run +``` + +Se tutto è collegato correttamente, dovresti vedere qualcosa di simile nella console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Nota:** I valori esatti dipendono dal codice a barre che stai decodificando. Se ottieni “No Macro PDF417 extension data found”, ricontrolla che l'immagine contenga davvero un codice Macro PDF417 e che tu stia usando il `DecodeType` corretto. + +--- + +## Gestione di più segmenti e validazione (avanzato) + +Macro PDF417 è progettato per grandi payload di dati suddivisi su più simboli. Quando incontri più di un segmento, tipicamente dovrai: + +1. **Raccogliere tutti i segmenti** in un dizionario indicizzato per `SegmentID`. +2. **Ordinare** i segmenti per `SegmentID` per ricostruire il file originale. +3. **Validare** il `Checksum` rispetto al payload concatenato (Aspose lo fa internamente, ma puoi rieseguire un CRC se desideri ulteriore sicurezza). + +Ecco uno schizzo veloce: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Dovrai implementare `AssembleSegments` e `VerifyChecksum` in base al formato del tuo payload—spesso è semplicemente una concatenazione di array di byte seguita da un controllo CRC‑16. + +--- + +## Problemi comuni e come evitarli + +| Sintomo | Probabile causa | Soluzione | +|---------|-----------------|-----------| +| `null` restituito da `macroResult.Extended` | L'immagine contiene un PDF417 normale, non una versione Macro. | Usa `DecodeType.Pdf417` invece, o verifica il codice a barre di origine. | +| Nessun output | `imagePath` errato o file non accessibile. | Ricontrolla il percorso del file; assicurati che l'app abbia i permessi di lettura. | +| Eccezione “Object disposed” | Tentativo di usare `reader` dopo il blocco `using`. | Mantieni tutta l'elaborazione all'interno del ` + +## Cosa dovresti imparare dopo? + +I tutorial seguenti trattano argomenti strettamente correlati che si basano sulle tecniche dimostrate in questa guida. Ogni risorsa include esempi di codice completi e funzionanti con spiegazioni passo‑passo per aiutarti a padroneggiare funzionalità API aggiuntive ed esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [Programmazione del lettore DataMatrix con Aspose.BarCode per .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Inizializzazione del lettore DotCode con Aspose.BarCode per .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Come leggere i codici a barre DataMatrix con Aspose.BarCode per .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/japanese/net/compact-pdf417-encoding/_index.md b/barcode/japanese/net/compact-pdf417-encoding/_index.md index a3cc7ebe8..915c967e7 100644 --- a/barcode/japanese/net/compact-pdf417-encoding/_index.md +++ b/barcode/japanese/net/compact-pdf417-encoding/_index.md @@ -84,7 +84,9 @@ Aspose.BarCode では `Pdf417ErrorCorrectionLevel` プロパティ(0‑8)を ### [Compact PDF417 バーコードの作成](./compact-pdf417-basic-configuration/) -Aspose.BarCode for .NET を使用して Compact PDF417 バーコードを生成する方法を学びます。ステップバイステップの手順とコード例を含む包括的なガイドです。 +### [Aspose を使用した C# での PDF417 バーコード画像生成方法](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) + +### [PDF417 を使用した C# の複数バーコード読み取り – 完全ガイド](./read-multiple-barcodes-c-complete-guide-with-pdf417/) ## よくある質問 @@ -114,4 +116,4 @@ A: 外部フォントは不要です。ライブラリが内部で全てのレ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/japanese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/japanese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..6e4d883b4 --- /dev/null +++ b/barcode/japanese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,174 @@ +--- +category: general +date: 2026-07-30 +description: Aspose を使用して C# で PDF417 バーコード画像を生成する方法。Aspose でバーコードを作成し、MacroPDF417 + メタデータを設定し、PNG として保存する手順をステップバイステップで学びましょう。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: ja +lastmod: 2026-07-30 +og_description: Aspose を使用して C# で PDF417 バーコード画像を生成する方法。Aspose でバーコードを作成し、MacroPDF417 + メタデータを設定し、PNG ファイルとして出力する完全ガイドです。 +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Aspose を使用して C# で PDF417 バーコード画像を生成する方法 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Aspose を使用して C# で PDF417 バーコード画像を生成する方法 +url: /ja/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# と Aspose を使用して PDF417 バーコード画像を生成する方法 + +C# と Aspose を使用して PDF417 バーコード画像を生成することは、高密度データエンコードを扱う人にとって頻繁に直面するハードルです。このガイドでは、ジェネレータの設定、MacroPDF417 メタデータの調整、そして最終的に鮮明な PNG ファイルとして保存するまでのすべての手順を順に解説します。 + +もし **generate barcode image c#** を試してみて、空白のキャンバスや読み取れないスキャンになってしまったことがあるなら、あなただけではありません。良いニュースは、Aspose.BarCode がプロセス全体をほぼ痛みなくしてくれることで、この記事の最後までに、あらゆるエンタープライズワークフローで **create barcode with Aspose** ができるようになります。 + +## 学べること + +- .NET 用の Aspose.BarCode ライブラリをインストールし、参照する。 +- カスタムペイロードで PDF417 ジェネレータを初期化する。 +- ファイル ID、セグメント ID、タイムスタンプなど、MacroPDF417 固有のフィールドを適用する。 +- 結果を PNG 画像としてエクスポートし、レポートやモバイルアプリに埋め込める。 +- 一般的な落とし穴(例:モジュール幅が間違っている、セグメントが欠落している)をトラブルシューティングするためのヒント。 + +MacroPDF417 の事前経験は不要です。C# と Visual Studio の基本的な理解があれば十分です。 + +## 前提条件 + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 以降 | 現在の LTS バージョンで、Aspose に完全にサポートされています。 | +| Visual Studio 2022(または任意の IDE) | サンプルをコンパイルして実行するため。 | +| Aspose.BarCode for .NET(NuGet) | `BarcodeGenerator` と PDF417 のサポートを提供します。 | + +NuGet 経由でライブラリを追加できます: + +```bash +dotnet add package Aspose.BarCode +``` + +基礎が整ったので、コードに入りましょう。 + +## C# で PDF417 バーコード画像を生成する – セットアップ + +最初に行うのは、**MacroPdf417** エンコードタイプ用の `BarcodeGenerator` インスタンスを作成することです。このオブジェクトは、モジュールサイズから MacroPDF417 が期待するリッチなメタデータまで、すべての設定オプションを保持します。 + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Why this matters:** `EncodeTypes.MacroPdf417` は、Aspose に PDF417 バーコードを生成させ、複数のセグメントに分割できるように指示します。これは大容量ファイルやバッチ処理に必須です。 + +## 基本的な外観の設定 + +読み取り可能なバーコードは、適切なビジュアル設定から始まります。`XDimension` は各モジュール(小さな黒白の正方形)の幅を制御し、`Columns` はバーコードが占める列数を決定します。 + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tip:** レシートプリンターでバーコードが密すぎる場合は、`XDimension` を `3` または `4` に上げてください。 +- **Pitfall:** `Columns` を低すぎる値に設定すると、バーコードが画像の境界を超えてしまい、読み取れないスキャンになる可能性があります。 + +## MacroPDF417 固有のメタデータを設定 + +MacroPDF417 を使用すると、ファイルレベルの情報を直接バーコードに埋め込むことができます。これは、大容量文書の配送追跡や、ファイルを複数のスキャンに分割するのに最適です。 + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**各フィールドの役割:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | ファイル全体の一意の識別子。 | +| `MacroPdf417SegmentID` | 現在のセグメントのインデックス(0 から開始)。 | +| `MacroPdf417SegmentsCount` | ファイルが分割される総セグメント数。 | +| `MacroPdf417FileName` | 人間が読める名前。監査ログに有用。 | +| `MacroPdf417Checksum` | データ整合性検証用の 16 ビット CRC。 | +| `MacroPdf417FileSize` | バイト単位の元ファイルサイズ。受信側がバッファを割り当てる際に役立ちます。 | +| `MacroPdf417TimeStamp` | ファイルが生成された日時。 | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | 送信者/受信者を識別するオプション文字列。 | +| `MacroPdf417Terminator` | 最終セグメントを示すマーカー。正しいデコードに必須。 | + +> **Why bother?** これらのフィールドがなければ、スキャナーは生データしか読み取れず、コンテキストは得られません。メタデータを追加することで、受信システムは元のファイルを自動的に再構築できます。 + +## バーコードを PNG として保存 + +ジェネレータの設定が完了したら、画像の保存はワンライナーで行えます: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **File format:** PNG はロスレスで、すべてのモジュールがスキャナーに対して鮮明に保たれます。 +- **Alternative:** ファイルサイズを小さくしたい場合は `BarCodeImageFormat.Jpeg` を使用できますが、可読性が若干低下することが予想されます。 + +### 期待される出力 + +スニペットを実行すると、指定フォルダーに `MacroPdf417Meta.png` が作成されます。以下の図と同様の外観になるはずです: + +![Aspose で生成された PDF417 バーコード](path/to/your/image.png){alt="C# で PDF417 バーコード画像を生成する方法"} + +画像は黒と白の正方形が密に並んだグリッドで、エンコードされたペイロードと MacroPDF417 メタデータが埋め込まれています。 + +## 完全な動作例 + +以下は、完全なコピー&ペースト可能なプログラムです。.NET 6 以降のプロジェクトでコンパイルでき、必要なのは Aspose.BarCode の NuGet パッケージだけです。 + + + +## 次に学ぶべきこと + +以下のチュートリアルは、本ガイドで示した手法を基にした密接に関連するトピックをカバーしています。各リソースには、完全な動作コード例とステップバイステップの解説が含まれており、追加の API 機能を習得し、独自プロジェクトで代替実装アプローチを検討するのに役立ちます。 + +- [Aspose.BarCode でコンパクト PDF417 バーコードを作成する方法](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Aspose.BarCode for .NET で DataMatrix バーコード(ECC 200)を生成する方法](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Aspose.BarCode for .NET を使用してカスタムアスペクト比の Aztec バーコードを生成する方法](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/japanese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/japanese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..c1624d65b --- /dev/null +++ b/barcode/japanese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode を使用して C# で複数のバーコードを読み取ります。PDF417 のデコード方法、コンパクトモードの検出、1 + つの画像内の多数のバーコードの処理方法をステップバイステップで学びましょう。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: ja +lastmod: 2026-07-30 +og_description: Aspose.BarCode を使用して C# で複数のバーコードを読み取ります。このガイドでは、画像内のすべてのバーコードをデコードする方法、コンパクトモードの確認方法、.NET + アプリへの統合方法を示します。 +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: C#で複数のバーコードを読み取る – PDF417 完全チュートリアル +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: C#で複数のバーコードを読み取る – PDF417を含む完全ガイド +url: /ja/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 複数のバーコードを読み取る C# – PDF417 完全ガイド + +単一の画像から **read multiple barcodes C#** を読み取る方法を考えたことはありますか? たとえば、出荷ラベルのバッチやチケットのコラージュ、あるいは複数のコードが1枚の画像に詰め込まれた PDF417 文書などです。私の日常業務でもまさに同じ壁にぶつかっていましたが、Aspose.BarCode の `BarCodeReader` を見つけたことで解決しました。このチュートリアルでは、画像内のすべてのバーコードをデコードし、各 PDF417 がコンパクト(トランケート)モードかどうかを判定し、結果をきれいに処理する方法をステップバイステップで解説します。 + +画像に異なるバーコードシンボルが混在している場合や、スキャン結果がまったく得られない場合の対処法など、いくつかの追加ヒントも交えて紹介します。最後まで読めば、**read multiple barcodes C#** をプロのように実行できるコンソールアプリが完成します。 + +## 必要な環境 + +作業を始める前に、以下がマシンにインストールされていることを確認してください。 + +- **.NET 6.0** SDK 以上(コードは .NET Framework 4.6+ でも動作しますが、.NET 6 が推奨です)。 +- **Aspose.BarCode for .NET** NuGet パッケージ(`Install-Package Aspose.BarCode`)。 +- **PDF417** バーコードを含むサンプル画像(できればコンパクトとフルサイズのシンボルが混在したもの)。本チュートリアルでは `CompactPdf417.png` を使用しますが、任意の PNG/JPEG で構いません。 +- お好みの IDE(Visual Studio、Rider、または VS Code)。 + +以上だけです。追加の DLL やネイティブ依存関係は不要です。Aspose.BarCode は純粋なマネージドコードなので、任意の .NET プロジェクトにそのまま組み込めます。 + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*画像代替テキスト: Read multiple barcodes C# – コンソールが PDF417 バーコードのコンパクトモードステータスを表示しているスクリーンショット。* + +## Step 1 – Install and Reference the BarCodeReader C# Library + +まず最初に、デコード処理の中心となる **BarCodeReader C#** クラスを入手します。ターミナル(または Package Manager Console)で次のコマンドを実行してください。 + +```powershell +dotnet add package Aspose.BarCode +``` + +あるいは Visual Studio の NuGet マネージャーから *Aspose.BarCode* を検索して **Install** をクリックします。これにより最新の安定版(2026年7月時点で 23.9)が取得され、PDF417、QR、DataMatrix など多数のシンボルがサポートされます。 + +なぜこれが重要かというと、ライブラリが画像処理・誤り訂正・シンボル認識といった重い処理を抽象化してくれるからです。自前でスキャナを実装すると、エッジケースの対応に数週間を要することもありますが、Aspose が提供する **C# barcode library** は実績のあるコードで、最新の .NET ランタイムに最適化されています。 + +## Step 2 – Set Up a Minimal Console Project + +UI の雑音を排除してバーコードロジックに集中できるよう、シンプルなコンソールアプリを作成します。 + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +生成された `Program.cs` を以下の完全サンプルに置き換えてください。デフォルトの名前空間をそのまま使っても、リネームしても構いません。 + +## Step 3 – Write the Full “Read Multiple Barcodes C#” Implementation + +以下は **実行可能な完全サンプル** です。元のスニペットの 4 ステップを網羅し、エラーハンドリングと有用な診断情報の出力を追加しています。 + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### このコードが機能する理由 + +- **`BarCodeReader`** は **BarCodeReader C#** API の中核です。画像を開き、前処理を行い、指定したタイプのシンボルを検索します。 +- **`ReadBarCodes()`** は単一の結果ではなく配列を返します。これが **read multiple barcodes C#** を実現する鍵で、メソッドが見つけたすべてのマッチを自動的に収集します。 +- **`result.Extended.Pdf417.IsTruncated`** は PDF417 が *compact*(別名 truncated)モードかどうかを示します。このフラグは PDF417 にのみ存在するため、他のシンボルが混在した場合に例外が発生しないよう `?.` 演算子でガードしています。 +- `foreach` ループはデコードテキストとコンパクトステータスの両方を出力し、簡易的な検証を可能にします。 + +## Step 4 – Handling Different Barcode Types (Optional) + +画像に PDF417 以外のバーコードが含まれる可能性がある場合は、`BarCodeReader` の第2引数を `DecodeType.AllSupported` に変更するだけです。ループ自体は同じですが、非 PDF417 シンボルに対しては `result.Extended` が null になる可能性があるため、適切にガードしてください。 + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +この小さな変更で **C# barcode library** が汎用スキャナに変身し、混在シンボルのバッチ処理に最適になります。 + +## Step 5 – Edge Cases and Best‑Practice Tips + +### 1️⃣ バーコードが検出されない場合 +`ReadBarCodes()` が空配列を返したときに最も多い原因は次の通りです。 + +- ファイルパスが間違っている、または読み取り権限がない。 +- 画像の品質が低すぎる(ぼやけ、コントラスト不足)。`reader.ImagePreprocessingOptions` で前処理を検討してください(例: `reader.ImagePreprocessingOptions.Denoise = true;`)。 + +### 2️⃣ 極端に大きな画像 +10 MP の写真を処理するとメモリ消費が激しくなります。スキャン領域を限定することで対策できます。 + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ スレッド安全性 +`BarCodeReader` は `IDisposable` を実装していますが **スレッドセーフではありません**。並列処理が必要な場合は、スレッドごとに別インスタンスを生成してください。 + +### 4️⃣ ライセンス +Aspose.BarCode はトライアルモードでそのまま使用できますが、出力画像に透かしが入ります。本番環境では早めにライセンスを設定してください。 + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ ロギング +このコードを大規模サービスに組み込む際は、`Console.WriteLine` を構造化ロガー(Serilog、NLog など)に置き換えましょう。これにより `CodeText`、`CodeType`、`IsTruncated` をフィールドとして取得でき、 downstream の分析に活用できます。 + +## Full Working Example Recap + +すべてをまとめると、以下が `Program.cs` に貼り付け可能な **完全版プログラム** です。 + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## 次に学ぶべきことは? + +以下のチュートリアルは、本ガイドで示したテクニックを基に、さらに関連するトピックを深掘りできる内容です。各リソースには、ステップバイステップの解説と完全動作サンプルが含まれているので、API の追加機能や代替実装方法を自分のプロジェクトでマスターできます。 + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/japanese/net/one-dimensional-barcode-types/_index.md b/barcode/japanese/net/one-dimensional-barcode-types/_index.md index 5127ab85a..ff4a0de48 100644 --- a/barcode/japanese/net/one-dimensional-barcode-types/_index.md +++ b/barcode/japanese/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ Aspose.BarCode for .NET を使用して .NET でバーコードを生成する Aspose.BarCode for .NET を使用して 1 次元バーコードを生成する際に例外を処理する方法を学びます。このステップバイステップのガイドは、エラー耐性のあるバーコード ソリューションを保証します。今すぐ始めましょう! ### [1 次元のワイド/ナロー比構成](./one-dimensional-wide-narrow-ratio-configuration/) Aspose.BarCode for .NET を使用して、カスタマイズされたバーコードを簡単に生成します。 1 次元のワイド/ナロー比構成のステップバイステップ ガイド。 +### [画像からバーコードを読み取る – C# バーコードリーダーの例](./read-barcode-from-image-c-barcode-reader-example/) +Aspose.BarCode を使用して C# で画像からバーコードを読み取る方法を学びます。 ## 結論 @@ -89,4 +91,4 @@ Aspose.BarCode for .NET を使用して、カスタマイズされたバーコ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/japanese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/japanese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..9472c2efa --- /dev/null +++ b/barcode/japanese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,279 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode for .NET を使用して画像からバーコードを読み取る – Macro PDF417 バーコードのデコード方法を示す、完全な + C# バーコードリーダーのサンプルです。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: ja +lastmod: 2026-07-30 +og_description: Aspose.BarCode for .NET を使用して画像からバーコードを読み取ります。このステップバイステップの C# バーコードリーダー例では、すべての + Macro PDF417 メタデータを抽出する方法を示します。 +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: 画像からバーコードを読み取る – 完全なC#バーコードリーダーの例 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: 画像からバーコードを読み取る – C# バーコードリーダーの例 +url: /ja/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 画像からバーコードを読み取る – C# バーコードリーダーの例 + +Need to **read barcode from image** in a C# application? You’re in the right place. In this tutorial we’ll walk through a complete *c# barcode reader example* that uses the Aspose.BarCode for .NET library to decode a Macro PDF417 barcode and pull out every piece of extended information the standard provides. + +画像からバーコードを読み取る必要がありますか?ここが正しい場所です。このチュートリアルでは、Aspose.BarCode for .NET ライブラリを使用して Macro PDF417 バーコードをデコードし、標準が提供するすべての拡張情報を取得する完全な *C# バーコードリーダーの例* を順に解説します。 + +Imagine you’ve just scanned a shipping label, a boarding pass, or a government ID that embeds a Macro PDF417 segment. You want to pull the file ID, segment count, timestamps, and maybe even the sender’s name—all without leaving your code. That’s exactly what we’ll achieve, and we’ll do it in a way that’s easy to copy‑paste into your own project. + +--- + +## 学べること + +- .NET プロジェクトに Aspose.BarCode NuGet パッケージを追加する方法。 +- Macro PDF417 バーコードを含む画像ファイルを開く方法。 +- **画像からバーコードを読み取る** 結果を列挙し、すべての拡張フィールドにアクセスする方法。 +- 複数セグメントの処理、チェックサムの検証、一般的な落とし穴のトラブルシューティングのヒント。 + +このガイドの最後までに、Macro PDF417 のメタデータをすべて出力する動作するコンソール アプリが完成し、在庫トラッカーや文書管理パイプラインなどの大規模システムに統合できるようになります。 + +--- + +## 前提条件 + +Before we dive in, make sure you have the following: + +| 要件 | 重要な理由 | +|-------------|----------------| +| .NET 6.0 SDK or later (any recent version works) | コンソール アプリのランタイムを提供します。 | +| Visual Studio 2022 (or VS Code with C# extension) | 編集とデバッグが簡単になります。 | +| Aspose.BarCode for .NET (free trial or licensed) | 実際にバーコードをデコードするライブラリです。 | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | 読み取り対象となるソースです。 | + +If you don’t already have Aspose.BarCode, you can pull it from NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +That single line installs everything you need, including the `BarCodeReader`, `DecodeType`, and the rich `Extended` property set we’ll explore. + +--- + +## 手順 1 – プロジェクトの設定とライブラリのインポート + +Create a fresh console project (or drop the code into an existing one). The `using` directives are essential; they bring the barcode classes into scope. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** If you’re using Visual Studio, the IDE will offer to add the missing `using` statements automatically—just hit *Ctrl+.`*. + +--- + +## 手順 2 – 画像パスの準備 + +Hard‑coding an absolute path works for a quick demo, but in production you’d probably accept a command‑line argument or a configuration setting. For clarity we’ll keep it simple: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** The `BarCodeReader` expects a valid file location; an incorrect path throws a `FileNotFoundException` before any decoding even starts. + +--- + +## 手順 3 – **画像からバーコードを読み取る** と Macro PDF417 の詳細抽出 + +Now comes the heart of the **c# barcode reader example**. We’ll instantiate `BarCodeReader` with the `DecodeType.MacroPdf417` flag, loop through all results (there can be more than one barcode in a single image), and print every extended property. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### コードが行っていること(なぜ、どのように) + +1. **`using` ブロック** – ネイティブ リソース(ファイルハンドル、ネイティブ デコーダ メモリ)を操作後すぐに解放することを保証します。これを省略すると Windows でファイルがロックされる可能性があります。 +2. **`DecodeType.MacroPdf417`** – Aspose に Macro PDF417 シンボルだけを対象にさせます。他のバーコードタイプは無視され、スキャンが高速化されます。 +3. **`ReadBarCodes()`** – 画像に複数の Macro PDF417 セグメントが含まれる可能性があるため、コレクションを返します(例:複数ページに分割されたドキュメント)。 +4. **`macroResult.Extended?.Pdf417`** – `Extended` オブジェクトは nullable です。安全ナビゲーション演算子 (`?.`) により、拡張データが無い場合の `NullReferenceException` を防ぎます。 +5. **各フィールドの出力** – ファイル識別子、セグメント順序、チェックサム検証、送信者や受取人といった任意のテキスト フィールドの可視化を提供します。 + +--- + +## 手順 4 – アプリケーションの実行と出力の確認 + +Compile and execute the program: + +```bash +dotnet run +``` + +If everything is wired correctly, you should see something akin to the following in your console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** The exact values depend on the barcode you’re decoding. If you get “No Macro PDF417 extension data found,” double‑check that the image truly contains a Macro PDF417 code and that you’re using the correct `DecodeType`. + +--- + +## 複数セグメントと検証の取り扱い(上級) + +Macro PDF417 は大容量データを複数シンボルに分割して格納するよう設計されています。複数のセグメントに遭遇した場合、通常は次の手順が必要です。 + +1. **すべてのセグメント** を `SegmentID` をキーとしたディクショナリに収集する。 +2. `SegmentID` で **ソート** し、元のファイルを再構築する。 +3. 連結したペイロードに対して `Checksum` を **検証** する(Aspose は内部で行いますが、追加の安全性が必要な場合は CRC を再実行できます)。 + +Here’s a quick sketch: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +You’ll need to implement `AssembleSegments` and `VerifyChecksum` based on your payload format—often it’s just a byte array concatenation followed by a CRC‑16 check. + +--- + +## よくある落とし穴と回避策 + +| 症状 | 考えられる原因 | 対策 | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | Image contains a plain PDF417, not a Macro version. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` wrong or file not accessible. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Keep all processing inside the ` + +## 次に学ぶべきことは? + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/korean/net/compact-pdf417-encoding/_index.md b/barcode/korean/net/compact-pdf417-encoding/_index.md index 0ecfa04d3..2d3550b00 100644 --- a/barcode/korean/net/compact-pdf417-encoding/_index.md +++ b/barcode/korean/net/compact-pdf417-encoding/_index.md @@ -86,6 +86,12 @@ Aspose.BarCode는 `Pdf417ErrorCorrectionLevel` 속성(0‑8)을 설정할 수 ### [Compact PDF417 바코드 만들기](./compact-pdf417-basic-configuration/) Aspose.BarCode for .NET를 사용해 Compact PDF417 바코드를 생성하는 방법을 배웁니다. 단계별 지침과 코드 예제가 포함된 포괄적인 가이드입니다. +### [Aspose를 사용하여 C#에서 PDF417 바코드 이미지 생성 방법](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Aspose.BarCode for .NET를 활용해 C#에서 PDF417 바코드 이미지를 만드는 단계별 가이드입니다. + +### [C#에서 PDF417을 사용한 다중 바코드 읽기 – 완전 가이드](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +C#에서 PDF417을 활용해 여러 바코드를 읽는 방법을 단계별로 안내합니다. + ## 자주 묻는 질문 **Q: Compact PDF417 바코드에 저장할 수 있는 최대 데이터 양은?** @@ -114,4 +120,4 @@ A: 외부 폰트가 필요하지 않으며, 라이브러리가 내부적으로 {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/korean/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/korean/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..0114e724b --- /dev/null +++ b/barcode/korean/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,174 @@ +--- +category: general +date: 2026-07-30 +description: Aspose를 사용하여 C#에서 PDF417 바코드 이미지를 생성하는 방법. Aspose로 바코드를 만들고, MacroPDF417 + 메타데이터를 설정한 뒤 PNG로 저장하는 과정을 단계별로 배웁니다. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: ko +lastmod: 2026-07-30 +og_description: Aspose를 사용하여 C#에서 PDF417 바코드 이미지를 생성하는 방법. 이 완전한 가이드를 따라 Aspose로 바코드를 + 만들고, MacroPDF417 메타데이터를 구성하며, PNG 파일로 출력하세요. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Aspose를 사용하여 C#에서 PDF417 바코드 이미지 생성하는 방법 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Aspose를 사용하여 C#에서 PDF417 바코드 이미지 생성하는 방법 +url: /ko/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C#와 Aspose를 사용하여 PDF417 바코드 이미지 생성 방법 + +C#와 Aspose를 사용하여 PDF417 바코드 이미지를 생성하는 것은 고밀도 데이터 인코딩을 다루는 사람들에게 흔히 겪는 어려움입니다. 이 가이드에서는 생성기 설정, MacroPDF417 메타데이터 조정, 그리고 최종적으로 선명한 PNG 파일 저장까지 모든 단계를 자세히 안내합니다. + +만약 **generate barcode image c#** 를 시도했지만 빈 캔버스나 읽을 수 없는 스캔 결과가 나왔다면, 당신만 그런 것이 아닙니다. 좋은 소식은 Aspose.BarCode가 전체 과정을 거의 수월하게 만들어 주며, 이 글을 끝까지 읽으면 **create barcode with Aspose** 를 통해 모든 기업 워크플로에 사용할 바코드를 만들 수 있게 됩니다. + +## 배울 내용 + +- .NET용 Aspose.BarCode 라이브러리를 설치하고 참조합니다. +- 사용자 정의 페이로드로 PDF417 생성기를 초기화합니다. +- 파일 ID, 세그먼트 ID, 타임스탬프와 같은 MacroPDF417 전용 필드를 적용합니다. +- 결과를 PNG 이미지로 내보내어 보고서나 모바일 앱에 삽입할 수 있습니다. +- 일반적인 문제점(예: 잘못된 모듈 너비, 누락된 세그먼트) 해결 팁을 제공합니다. + +MacroPDF417에 대한 사전 경험은 필요하지 않으며, C#와 Visual Studio에 대한 기본적인 이해만 있으면 충분합니다. + +## 사전 요구 사항 + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 이상 | 현재 LTS 버전이며, Aspose에서 완전히 지원됩니다. | +| Visual Studio 2022 (또는 기타 IDE) | 샘플을 컴파일하고 실행하기 위해 필요합니다. | +| Aspose.BarCode for .NET (NuGet) | `BarcodeGenerator`와 PDF417 지원을 제공합니다. | + +NuGet을 통해 라이브러리를 추가할 수 있습니다: + +```bash +dotnet add package Aspose.BarCode +``` + +이제 기본 준비가 끝났으니, 코드로 들어가 보겠습니다. + +## C#에서 PDF417 바코드 이미지 생성 – 설정 + +먼저 **MacroPdf417** 인코드 타입에 대한 `BarcodeGenerator` 인스턴스를 생성합니다. 이 객체는 모듈 크기부터 MacroPDF417이 기대하는 풍부한 메타데이터까지 모든 구성 옵션을 보유합니다. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **왜 중요한가:** `EncodeTypes.MacroPdf417`은 Aspose에게 PDF417 바코드를 여러 세그먼트로 분할할 수 있도록 생성하도록 지시합니다—대용량 파일이나 배치 처리에 필수적인 기능입니다. + +## 기본 외관 구성 + +읽기 쉬운 바코드는 올바른 시각적 설정에서 시작됩니다. `XDimension`은 각 모듈(작은 검은색/흰색 사각형)의 너비를 제어하고, `Columns`는 바코드가 차지하는 열 수를 결정합니다. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tip:** 영수증 프린터에서 바코드가 너무 촘촘해 보이면 `XDimension`을 `3` 또는 `4`로 높이세요. +- **Pitfall:** `Columns` 값을 너무 낮게 설정하면 바코드가 이미지 경계를 넘어가 읽을 수 없는 스캔이 발생할 수 있습니다. + +## MacroPDF417 전용 메타데이터 설정 + +MacroPDF417은 파일 수준 정보를 바코드에 직접 삽입할 수 있게 해줍니다. 이는 대용량 문서 전송을 추적하거나 파일을 여러 스캔에 걸쳐 분할할 때 이상적입니다. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**각 필드의 역할:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | 전체 파일에 대한 고유 식별자. | +| `MacroPdf417SegmentID` | 현재 세그먼트의 인덱스(0부터 시작). | +| `MacroPdf417SegmentsCount` | 파일이 분할된 전체 세그먼트 수. | +| `MacroPdf417FileName` | 감사 로그 등에 유용한 사람이 읽을 수 있는 파일 이름. | +| `MacroPdf417Checksum` | 데이터 무결성 검증을 위한 16비트 CRC. | +| `MacroPdf417FileSize` | 바이트 단위의 원본 파일 크기, 수신자가 버퍼를 할당하는 데 도움. | +| `MacroPdf417TimeStamp` | 파일이 생성된 날짜/시간. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | 송신자/수신자를 식별하기 위한 선택적 문자열. | +| `MacroPdf417Terminator` | 마지막 세그먼트를 표시; 올바른 디코딩에 필요. | + +> **왜 신경 써야 할까?** 이러한 필드가 없으면 스캐너는 원시 데이터만 읽을 수 있어 컨텍스트를 알 수 없습니다. 메타데이터를 추가하면 수신 시스템이 원본 파일을 자동으로 재조립할 수 있습니다. + +## 바코드를 PNG로 저장 + +생성기가 완전히 구성되면 이미지를 저장하는 코드는 한 줄로 끝납니다: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **File format:** PNG는 무손실 형식으로, 모든 모듈이 스캐너에 선명하게 유지됩니다. +- **Alternative:** 파일 크기를 줄여야 한다면 `BarCodeImageFormat.Jpeg`를 사용할 수 있지만, 가독성이 약간 감소할 수 있습니다. + +### 예상 출력 + +코드를 실행하면 지정된 폴더에 `MacroPdf417Meta.png` 파일이 생성됩니다. 아래 그림과 비슷하게 보일 것입니다: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="C#에서 PDF417 바코드 이미지 생성 방법"} + +이미지는 검은색과 흰색 사각형이 촘촘히 배열된 그리드이며, 인코딩된 페이로드와 MacroPDF417 메타데이터가 포함되어 있습니다. + +## 전체 작동 예제 + +아래는 완전한 복사‑붙여넣기 가능한 프로그램입니다. .NET 6 이상 프로젝트라면 모두 컴파일되며, Aspose.BarCode NuGet 패키지만 있으면 됩니다. + + + +## 다음에 배워야 할 내용은? + +다음 튜토리얼들은 이 가이드에서 시연한 기술을 기반으로 하는 밀접한 관련 주제를 다룹니다. 각 자료는 단계별 설명과 함께 완전한 동작 코드 예제를 제공하여 추가 API 기능을 마스터하고 자체 프로젝트에서 대체 구현 방식을 탐색하도록 돕습니다. + +- [바코드 생성 방법 – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Aspose.BarCode for .NET를 사용한 DataMatrix 바코드 생성 (ECC 200)](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Aspose.BarCode for .NET를 사용한 맞춤 종횡비 Aztec 바코드 생성](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/korean/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/korean/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..b51cee79a --- /dev/null +++ b/barcode/korean/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode를 사용하여 C#에서 여러 바코드를 읽습니다. PDF417을 디코딩하고, 컴팩트 모드를 감지하며, + 하나의 이미지에서 다수의 바코드를 처리하는 방법을 단계별로 배웁니다. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: ko +lastmod: 2026-07-30 +og_description: Aspose.BarCode를 사용하여 C#에서 여러 바코드를 읽습니다. 이 가이드는 이미지에서 모든 바코드를 디코딩하고, + 컴팩트 모드를 확인하며, .NET 애플리케이션에 통합하는 방법을 보여줍니다. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: C#에서 다중 바코드 읽기 – PDF417 전체 튜토리얼 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: C# 다중 바코드 읽기 – PDF417 완전 가이드 +url: /ko/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 여러 바코드 읽기 C# – PDF417 완전 가이드 + +한 장의 이미지에서 **read multiple barcodes C#** 를 어떻게 읽을 수 있을지 궁금하셨나요? 배송 라벨 묶음, 티켓 콜라주, 혹은 여러 코드를 하나의 사진에 담은 PDF417 문서가 있을 수도 있습니다. 일상 업무에서 바로 이런 상황을 마주했었는데, Aspose.BarCode의 `BarCodeReader` 를 발견하고 나서 해결했습니다. 이 튜토리얼에서는 이미지에 포함된 모든 바코드를 디코딩하고, 각 PDF417이 압축(잘린) 모드인지 확인하며, 결과를 깔끔하게 처리하는 방법을 단계별로 안내합니다. + +이미지에 다양한 바코드 심볼이 섞여 있거나 스캔 결과가 전혀 나오지 않을 때의 팁도 함께 제공합니다. 마지막까지 따라오시면 **read multiple barcodes C#** 를 전문가 수준으로 수행할 수 있는 콘솔 앱을 완성하게 됩니다. + +## 준비물 + +시작하기 전에 아래 항목들이 머신에 설치되어 있는지 확인하세요. + +- **.NET 6.0** SDK 이상 (코드는 .NET Framework 4.6+에서도 동작하지만 .NET 6이 가장 권장됩니다). +- **Aspose.BarCode for .NET** NuGet 패키지 (`Install-Package Aspose.BarCode`). +- **PDF417** 바코드가 포함된 샘플 이미지 – 압축 및 전체 크기 심볼이 혼합된 것이 이상적입니다. 튜토리얼에서는 `CompactPdf417.png` 를 사용하지만 PNG/JPEG 형식이면 모두 가능합니다. +- 선호하는 IDE (Visual Studio, Rider, VS Code 등). + +이것만 있으면 됩니다 – 별도 DLL이나 네이티브 의존성은 없습니다. Aspose.BarCode는 순수 관리 코드이므로 어떤 .NET 프로젝트에도 바로 추가할 수 있습니다. + +![여러 바코드 읽기 C# 콘솔 출력](image.png "여러 바코드 읽기 C# 콘솔 출력") + +*이미지 대체 텍스트: 여러 바코드 읽기 C# – PDF417 바코드의 압축 모드 상태를 콘솔에 표시한 스크린샷.* + +## 1단계 – BarCodeReader C# 라이브러리 설치 및 참조 + +먼저 디코딩을 담당하는 **BarCodeReader C#** 클래스를 받아야 합니다. 터미널(또는 Package Manager Console)에서 다음 명령을 실행하세요. + +```powershell +dotnet add package Aspose.BarCode +``` + +또는 Visual Studio의 NuGet 관리자를 열어 *Aspose.BarCode* 를 검색하고 **Install** 버튼을 클릭하면 됩니다. 최신 안정 버전(2026년 7월 현재 23.9)이 설치되며, PDF417, QR, DataMatrix 등 수십 가지 심볼을 지원합니다. + +왜 중요한가요? 이 라이브러리는 이미지 처리, 오류 정정, 심볼 인식 등 복잡한 작업을 추상화해 줍니다. 직접 스캐너를 구현한다면 가장자리 케이스를 잡느라 몇 주가 걸릴 수 있지만, Aspose는 최신 .NET 런타임에 최적화된 **C# barcode library** 를 제공해 줍니다. + +## 2단계 – 최소 콘솔 프로젝트 설정 + +UI 없이 바코드 로직에만 집중할 수 있도록 새 콘솔 앱을 만들고 아래 코드를 넣으세요. + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +생성된 `Program.cs` 를 아래 전체 예제로 교체합니다. 기본 네임스페이스를 유지하거나 원하는 대로 바꿔도 무방합니다. + +## 3단계 – 전체 “Read Multiple Barcodes C#” 구현 작성 + +아래는 **완전하고 실행 가능한** 코드 샘플입니다. 원본 스니펫의 네 단계 전체를 포함하고, 오류 처리와 유용한 진단 출력까지 추가했습니다. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### 코드가 작동하는 이유 + +- **`BarCodeReader`** 는 **BarCodeReader C#** API의 핵심 클래스입니다. 이미지를 열고 전처리를 적용한 뒤 지정한 타입의 심볼을 검색합니다. +- **`ReadBarCodes()`** 는 단일 결과가 아니라 배열을 반환합니다. 이것이 **read multiple barcodes C#** 를 가능하게 하는 핵심 포인트이며, 메서드가 찾은 모든 매치를 자동으로 수집합니다. +- **`result.Extended.Pdf417.IsTruncated`** 는 PDF417이 *압축*(또는 truncated) 모드인지 알려줍니다. 이 플래그는 PDF417 전용이므로, 다른 심볼이 들어올 경우 예외가 발생하지 않도록 null‑조건 연산자(`?.`)로 방어합니다. +- `foreach` 루프는 디코딩된 텍스트와 압축 상태를 동시에 출력해 빠른 검증을 할 수 있게 해 줍니다. + +## 4단계 – 다양한 바코드 유형 처리 (선택 사항) + +이미지에 PDF417 외에 다른 심볼이 포함될 수 있다면 `BarCodeReader` 두 번째 인자를 `DecodeType.AllSupported` 로 바꾸면 됩니다. 루프는 동일하게 유지되지만, PDF417이 아닌 경우 `result.Extended` 가 null일 수 있으니 방어 코드를 추가해야 합니다. + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +이 작은 수정만으로 **C# barcode library** 가 혼합 심볼 배치를 처리하는 범용 스캐너로 변신합니다. + +## 5단계 – 엣지 케이스 및 베스트 프랙티스 팁 + +### 1️⃣ 바코드가 전혀 감지되지 않을 때 +`ReadBarCodes()` 가 빈 배열을 반환한다면 가장 흔한 원인은 다음과 같습니다. + +- 파일 경로가 잘못됐거나 읽기 권한이 부족함. +- 이미지 품질이 낮음(흐림, 저대비). `reader.ImagePreprocessingOptions` 로 전처리를 시도해 보세요(예: `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ 매우 큰 이미지 처리 +10 MP 사진은 메모리를 많이 차지합니다. 스캔 영역을 제한해 보세요. + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ 스레드 안전성 +`BarCodeReader` 는 `IDisposable` 을 구현하지만 **스레드‑안전** 하지 않습니다. 병렬 처리가 필요하면 스레드당 별도 인스턴스를 생성하세요. + +### 4️⃣ 라이선스 +Aspose.BarCode는 체험 모드에서도 바로 사용할 수 있지만, 출력 이미지에 워터마크가 표시됩니다. 실제 서비스에서는 초기화 시 라이선스를 설정해야 합니다. + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ 로깅 +이 코드를 더 큰 서비스에 통합할 때는 `Console.WriteLine` 대신 구조화된 로거(Serilog, NLog 등)를 사용하세요. 이렇게 하면 `CodeText`, `CodeType`, `IsTruncated` 등을 필드로 기록해 downstream 분석에 활용할 수 있습니다. + +## 전체 예제 요약 + +아래는 `Program.cs` 에 그대로 복사해 넣을 수 있는 **전체 프로그램** 입니다. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## 다음에 배울 내용은? + +다음 튜토리얼들은 이 가이드에서 다룬 기술을 확장하는 주제들을 다룹니다. 각각 완전한 코드 예제와 단계별 설명을 제공하므로, 추가 API 기능을 마스터하고 프로젝트에 다양한 구현 방식을 적용하는 데 도움이 됩니다. + +- [PDF417 바코드 생성 방법 – Compact PDF417 인코딩](/barcode/english/net/compact-pdf417-encoding/) +- [바코드 만들기 – Aspose.BarCode 로 Compact PDF417 구현](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Aspose.BarCode for .NET 로 DataMatrix 바코드 읽기](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/korean/net/one-dimensional-barcode-types/_index.md b/barcode/korean/net/one-dimensional-barcode-types/_index.md index 5196c2e2a..a70552b9a 100644 --- a/barcode/korean/net/one-dimensional-barcode-types/_index.md +++ b/barcode/korean/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ Aspose.BarCode를 사용하여 .NET에서 Databar GS1 인코딩 바코드를 만 .NET용 Aspose.BarCode를 사용하여 1차원 바코드를 생성하는 동안 예외를 처리하는 방법을 알아보세요. 이 단계별 가이드는 오류 방지 바코드 솔루션을 보장합니다. 지금 시작하세요! ### [1차원 광폭-협폭 구성](./one-dimensional-wide-narrow-ratio-configuration/) .NET용 Aspose.BarCode를 사용하여 맞춤형 바코드를 쉽게 생성하세요. 1차원 광폭-협폭 비율 구성을 위한 단계별 가이드입니다. +### [이미지에서 바코드 읽기 – C# 바코드 리더 예제](./read-barcode-from-image-c-barcode-reader-example/) +Aspose.BarCode를 사용하여 C#에서 이미지 파일의 바코드를 읽는 방법을 단계별로 안내합니다. ## 결론 @@ -89,4 +91,4 @@ Aspose.BarCode를 사용하여 .NET에서 Databar GS1 인코딩 바코드를 만 {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/korean/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/korean/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..e33410e7a --- /dev/null +++ b/barcode/korean/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,277 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode for .NET을 사용하여 이미지에서 바코드 읽기 – 매크로 PDF417 바코드를 디코딩하는 방법을 + 보여주는 완전한 C# 바코드 리더 예제. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: ko +lastmod: 2026-07-30 +og_description: Aspose.BarCode for .NET를 사용하여 이미지에서 바코드를 읽습니다. 이 단계별 C# 바코드 리더 예제는 + 모든 Macro PDF417 메타데이터를 추출하는 방법을 보여줍니다. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: 이미지에서 바코드 읽기 – 전체 C# 바코드 리더 예제 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: 이미지에서 바코드 읽기 – C# 바코드 리더 예제 +url: /ko/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 이미지에서 바코드 읽기 – C# 바코드 리더 예제 + +C# 애플리케이션에서 **이미지에서 바코드 읽기**가 필요하신가요? 바로 여기입니다. 이번 튜토리얼에서는 Aspose.BarCode for .NET 라이브러리를 사용해 Macro PDF417 바코드를 디코딩하고 표준이 제공하는 모든 확장 정보를 추출하는 *c# barcode reader example*을 단계별로 살펴보겠습니다. + +예를 들어, 배송 라벨, 탑승권, 혹은 정부 발급 신분증을 스캔했는데 그 안에 Macro PDF417 세그먼트가 포함되어 있다고 가정해 보세요. 파일 ID, 세그먼트 개수, 타임스탬프, 그리고 발신자 이름까지—코드를 떠나지 않고 모두 가져오고 싶을 겁니다. 바로 그 작업을 수행할 것이며, 여러분의 프로젝트에 복사‑붙여넣기만 하면 되는 형태로 제공됩니다. + +--- + +## 배울 내용 + +- .NET 프로젝트에 Aspose.BarCode NuGet 패키지를 추가하는 방법. +- Macro PDF417 바코드가 포함된 이미지 파일을 여는 방법. +- **이미지에서 바코드 읽기** 결과를 반복하면서 모든 확장 필드에 접근하는 방법. +- 여러 세그먼트를 처리하고, 체크섬을 검증하며, 일반적인 함정을 해결하는 팁. + +이 가이드를 마치면 모든 Macro PDF417 메타데이터를 출력하는 콘솔 앱을 갖게 되며, 재고 추적기나 문서 관리 파이프라인 같은 대규모 시스템에 쉽게 통합할 수 있습니다. + +--- + +## 사전 요구 사항 + +시작하기 전에 다음이 준비되어 있는지 확인하세요: + +| Requirement | Why it matters | +|-------------|----------------| +| .NET 6.0 SDK 또는 그 이후 버전 (최근 버전이면 모두 가능) | 콘솔 앱 실행에 필요한 런타임을 제공합니다. | +| Visual Studio 2022 (또는 C# 확장 기능이 설치된 VS Code) | 편집 및 디버깅을 손쉽게 해줍니다. | +| Aspose.BarCode for .NET (무료 체험판 또는 정식 라이선스) | 실제로 바코드를 디코딩하는 라이브러리입니다. | +| Macro PDF417 바코드가 포함된 이미지 파일 (`MacroPdf417Meta.png`) | 읽어올 소스 이미지입니다. | + +Aspose.BarCode가 아직 없다면 NuGet에서 가져올 수 있습니다: + +```bash +dotnet add package Aspose.BarCode +``` + +위 한 줄로 `BarCodeReader`, `DecodeType`, 그리고 우리가 살펴볼 풍부한 `Extended` 속성 집합 등을 모두 설치합니다. + +--- + +## 1단계 – 프로젝트 설정 및 라이브러리 가져오기 + +새 콘솔 프로젝트를 만들거나 기존 프로젝트에 코드를 추가합니다. `using` 지시문은 바코드 클래스를 사용하기 위해 필수입니다. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Visual Studio를 사용한다면 IDE가 누락된 `using` 문을 자동으로 추가해 줍니다—*Ctrl+.`* 를 눌러 보세요. + +--- + +## 2단계 – 이미지 경로 준비 + +절대 경로를 하드코딩하면 빠른 데모에는 괜찮지만, 실제 환경에서는 명령줄 인수나 설정 파일을 받아들이는 것이 일반적입니다. 여기서는 이해를 돕기 위해 간단히 유지합니다: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** `BarCodeReader`는 유효한 파일 위치를 요구합니다; 잘못된 경로는 디코딩이 시작되기도 전에 `FileNotFoundException`을 발생시킵니다. + +--- + +## 3단계 – **이미지에서 바코드 읽기** 및 Macro PDF417 세부 정보 추출 + +이제 **c# barcode reader example**의 핵심 부분입니다. `DecodeType.MacroPdf417` 플래그와 함께 `BarCodeReader`를 인스턴스화하고, 모든 결과를 순회(한 이미지에 여러 바코드가 있을 수 있음)하면서 각 확장 속성을 출력합니다. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### 코드가 수행하는 작업 (왜, 어떻게) + +1. **`using` 블록** – 네이티브 리소스(파일 핸들, 네이티브 디코더 메모리)를 즉시 해제합니다. 이를 생략하면 Windows에서 파일이 잠길 수 있습니다. +2. **`DecodeType.MacroPdf417`** – Aspose에게 Macro PDF417 심볼만 찾도록 지시합니다; 다른 바코드 유형은 무시되어 스캔 속도가 빨라집니다. +3. **`ReadBarCodes()`** – 이미지에 여러 Macro PDF417 세그먼트가 포함될 수 있기 때문에 컬렉션을 반환합니다(예: 여러 페이지 문서를 여러 바코드에 나눠 담은 경우). +4. **`macroResult.Extended?.Pdf417`** – `Extended` 객체는 nullable이며, 안전 탐색 연산자(`?.`)를 사용해 바코드에 확장 데이터가 없을 때 `NullReferenceException`을 방지합니다. +5. **각 필드 출력** – 파일 식별자, 세그먼트 순서, 체크섬 검증, 발신자나 수신자와 같은 선택적 텍스트 필드 등을 확인할 수 있습니다. + +--- + +## 4단계 – 애플리케이션 실행 및 출력 확인 + +프로그램을 컴파일하고 실행합니다: + +```bash +dotnet run +``` + +설정이 모두 올바르면 콘솔에 다음과 유사한 내용이 표시됩니다: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** 정확한 값은 디코딩하는 바코드에 따라 달라집니다. “No Macro PDF417 extension data found”라는 메시지가 나오면 이미지에 실제로 Macro PDF417 코드가 포함되어 있는지, 그리고 올바른 `DecodeType`을 사용했는지 다시 확인하세요. + +--- + +## 다중 세그먼트 처리 및 검증 (고급) + +Macro PDF417은 큰 데이터 페이로드를 여러 심볼에 나눠 저장하도록 설계되었습니다. 여러 세그먼트를 만나면 일반적으로 다음과 같이 진행합니다: + +1. **`SegmentID`를 키로 하는 사전**에 모든 세그먼트를 수집합니다. +2. **`SegmentID` 순으로 정렬**하여 원본 파일을 재조립합니다. +3. **`Checksum`을 연결된 페이로드와 비교**하여 검증합니다(Aspose가 내부적으로 수행하지만, 추가 안전을 위해 CRC를 직접 실행할 수도 있습니다). + +간단한 예시 스케치: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +`AssembleSegments`와 `VerifyChecksum`은 페이로드 형식에 맞게 구현해야 합니다—대부분은 바이트 배열을 이어 붙인 뒤 CRC‑16 검사를 수행하는 방식입니다. + +--- + +## 흔히 발생하는 문제와 해결 방법 + +| Symptom | Likely cause | Fix | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | Image contains a plain PDF417, not a Macro version. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` wrong or file not accessible. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Keep all processing inside the ` | + +## 다음에 배울 내용은? + +다음 튜토리얼들은 이번 가이드에서 다룬 기술을 기반으로 하며, 단계별 설명과 완전한 코드 예제를 포함하고 있어 추가 API 기능을 마스터하고 다양한 구현 방식을 탐색하는 데 도움이 됩니다. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/polish/net/compact-pdf417-encoding/_index.md b/barcode/polish/net/compact-pdf417-encoding/_index.md index 90d161b27..3dfd2caaa 100644 --- a/barcode/polish/net/compact-pdf417-encoding/_index.md +++ b/barcode/polish/net/compact-pdf417-encoding/_index.md @@ -86,7 +86,9 @@ Poza podstawami, oto kilka praktycznych wskazówek, które usprawnią Twój prze ### [Tworzenie kodów Compact PDF417](./compact-pdf417-basic-configuration/) -Dowiedz się, jak generować kody Compact PDF417 przy użyciu Aspose.BarCode dla .NET. Kompleksowy przewodnik z instrukcjami krok po kroku i przykładami kodu. +### [Jak wygenerować obraz kodu kreskowego PDF417 w C# przy użyciu Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) + +### [Odczyt wielu kodów kreskowych C# – Kompletny przewodnik z PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) ## Najczęściej zadawane pytania @@ -116,4 +118,4 @@ Dowiedz się, jak generować kody Compact PDF417 przy użyciu Aspose.BarCode dla {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/polish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/polish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..3aa286bbf --- /dev/null +++ b/barcode/polish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Jak wygenerować obraz kodu kreskowego PDF417 w C# przy użyciu Aspose. + Dowiedz się krok po kroku, jak stworzyć kod kreskowy za pomocą Aspose, ustawić metadane + MacroPDF417 i zapisać jako PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: pl +lastmod: 2026-07-30 +og_description: Jak wygenerować obraz kodu kreskowego PDF417 w C# przy użyciu Aspose. + Przejdź przez ten kompletny przewodnik, aby stworzyć kod kreskowy za pomocą Aspose, + skonfigurować metadane MacroPDF417 i wyeksportować plik PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Jak wygenerować obraz kodu kreskowego PDF417 w C# przy użyciu Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Jak wygenerować obraz kodu kreskowego PDF417 w C# przy użyciu Aspose +url: /pl/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak wygenerować obraz kodu kreskowego PDF417 w C# przy użyciu Aspose + +Generowanie obrazu kodu kreskowego PDF417 w C# przy użyciu Aspose jest częstą przeszkodą dla każdego, kto pracuje z kodowaniem danych o wysokiej gęstości. W tym przewodniku przeprowadzimy Cię przez każdy krok — konfigurację generatora, dostosowanie metadanych MacroPDF417 oraz ostateczne zapisanie wyraźnego pliku PNG. + +Jeśli kiedykolwiek próbowałeś **generate barcode image c#** i skończyło to pustym płótnem lub nieczytelnym skanem, nie jesteś sam. Dobrą wiadomością jest to, że Aspose.BarCode sprawia, że cały proces jest prawie bezbolesny, a pod koniec tego artykułu będziesz w stanie **create barcode with Aspose** dla dowolnego przepływu pracy w przedsiębiorstwie. + +## Czego się nauczysz + +- Zainstaluj i odwołaj się do biblioteki Aspose.BarCode dla .NET. +- Zainicjalizuj generator PDF417 z niestandardowym ładunkiem. +- Zastosuj pola specyficzne dla MacroPDF417, takie jak ID pliku, ID segmentu i znacznik czasu. +- Wyeksportuj wynik do obrazu PNG, który możesz osadzić w raportach lub aplikacjach mobilnych. +- Wskazówki dotyczące rozwiązywania typowych problemów (np. nieprawidłowa szerokość modułu, brakujące segmenty). + +Wcześniejsze doświadczenie z MacroPDF417 nie jest wymagane; wystarczy podstawowa znajomość C# i Visual Studio. + +## Wymagania wstępne + +| Wymaganie | Powód | +|-------------|--------| +| .NET 6.0 lub nowszy | Aktualna wersja LTS, w pełni wspierana przez Aspose | +| Visual Studio 2022 (lub dowolne IDE) | Do kompilacji i uruchomienia przykładu | +| Aspose.BarCode dla .NET (NuGet) | Dostarcza `BarcodeGenerator` oraz obsługę PDF417 | + +Możesz dodać bibliotekę za pomocą NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Teraz, gdy podłoże jest przygotowane, zanurzmy się w kodzie. + +## Jak wygenerować obraz kodu kreskowego PDF417 w C# – Konfiguracja + +Pierwszą rzeczą, którą robimy, jest stworzenie instancji `BarcodeGenerator` dla typu kodowania **MacroPdf417**. Ten obiekt przechowuje wszystkie opcje konfiguracji, od rozmiaru modułu po bogate metadane, których oczekuje MacroPDF417. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Dlaczego to ważne:** `EncodeTypes.MacroPdf417` informuje Aspose, aby wygenerował kod kreskowy PDF417, który może być podzielony na wiele segmentów — niezbędne przy dużych plikach lub przetwarzaniu wsadowym. + +## Skonfiguruj podstawowy wygląd + +Czytelny kod kreskowy zaczyna się od odpowiednich ustawień wizualnych. `XDimension` kontroluje szerokość każdego modułu (małych czarnych/białych kwadratów), natomiast `Columns` określa, ile kolumn zajmuje kod kreskowy. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Wskazówka:** Jeśli kod kreskowy wygląda zbyt gęsto na drukarce paragonów, zwiększ `XDimension` do `3` lub `4`. +- **Pułapka:** Ustawienie `Columns` zbyt nisko może spowodować, że kod kreskowy wyjdzie poza granice obrazu, co skutkuje nieczytelnym skanem. + +## Ustaw specyficzne metadane MacroPDF417 + +MacroPDF417 pozwala osadzić informacje na poziomie pliku bezpośrednio w kodzie kreskowym. Jest to idealne rozwiązanie do śledzenia dużych przesyłek dokumentów lub podziału pliku na kilka skanów. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Co robi każde pole:** + +| Właściwość | Opis | +|----------|-------------| +| `MacroPdf417FileID` | Unikalny identyfikator całego pliku. | +| `MacroPdf417SegmentID` | Indeks bieżącego segmentu (zaczyna się od 0). | +| `MacroPdf417SegmentsCount` | Łączna liczba segmentów, na które podzielono plik. | +| `MacroPdf417FileName` | Nazwa czytelna dla człowieka, przydatna w logach audytu. | +| `MacroPdf417Checksum` | 16‑bitowy CRC do weryfikacji integralności danych. | +| `MacroPdf417FileSize` | Oryginalny rozmiar pliku w bajtach, pomaga odbiorcom przydzielić bufor. | +| `MacroPdf417TimeStamp` | Data/godzina, kiedy plik został wygenerowany. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Opcjonalne ciągi znaków identyfikujące odbiorcę/nadawcę. | +| `MacroPdf417Terminator` | Oznacza ostatni segment; wymagane do prawidłowego dekodowania. | + +> **Po co to robić?** Bez tych pól skaner może odczytać tylko surowe dane, a nie kontekst. Dodanie metadanych oznacza, że system odbierający może automatycznie złożyć oryginalny plik. + +## Zapisz kod kreskowy jako PNG + +Gdy generator jest w pełni skonfigurowany, zapisanie obrazu to jednowierszowy kod: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Format pliku:** PNG jest bezstratny, zapewniając, że każdy moduł pozostaje ostry dla skanerów. +- **Alternatywa:** Użyj `BarCodeImageFormat.Jpeg`, jeśli potrzebny jest mniejszy rozmiar pliku, ale spodziewaj się niewielkiej utraty czytelności. + +### Oczekiwany wynik + +Po uruchomieniu fragmentu kodu znajdziesz `MacroPdf417Meta.png` w określonym folderze. Powinien wyglądać podobnie do ilustracji poniżej: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Jak wygenerować obraz kodu kreskowego PDF417 w C#"} + +Obraz zawiera gęstą siatkę czarnych i białych kwadratów, z zakodowanym ładunkiem i osadzonymi metadanymi MacroPDF417. + +## Pełny działający przykład + +Poniżej znajduje się kompletny, gotowy do skopiowania program. Kompiluje się z dowolnym projektem .NET 6+ i wymaga jedynie pakietu NuGet Aspose.BarCode. + + + +## Co powinieneś się nauczyć dalej? + +Poniższe samouczki obejmują ściśle powiązane tematy, które rozwijają techniki przedstawione w tym przewodniku. Każde źródło zawiera kompletne działające przykłady kodu z wyjaśnieniami krok po kroku, aby pomóc Ci opanować dodatkowe funkcje API i odkrywać alternatywne podejścia implementacyjne w własnych projektach. + +- [Jak utworzyć kod kreskowy – Compact PDF417 z Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Jak wygenerować kody DataMatrix (ECC 200) z Aspose.BarCode dla .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Jak wygenerować kod Aztec z niestandardowym współczynnikiem proporcji przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/polish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/polish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..02e10bad4 --- /dev/null +++ b/barcode/polish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,261 @@ +--- +category: general +date: 2026-07-30 +description: Odczytuj wiele kodów kreskowych w C# przy użyciu Aspose.BarCode. Dowiedz + się krok po kroku, jak dekodować PDF417, wykrywać tryb kompaktowy i obsługiwać wiele + kodów w jednym obrazie. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: pl +lastmod: 2026-07-30 +og_description: Odczytaj wiele kodów kreskowych w C# za pomocą Aspose.BarCode. Ten + przewodnik pokazuje, jak zdekodować wszystkie kody kreskowe na obrazie, sprawdzić + tryb kompaktowy i zintegrować je z aplikacjami .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Odczyt wielu kodów kreskowych C# – Pełny poradnik PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Odczyt wielu kodów kreskowych w C# – Kompletny przewodnik z PDF417 +url: /pl/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Odczyt wielu kodów kreskowych C# – Kompletny przewodnik z PDF417 + +Czy kiedykolwiek zastanawiałeś się, jak **odczytywać wiele kodów kreskowych C#** z jednego obrazu? Być może masz partię etykiet wysyłkowych, kolaż biletów lub dokument PDF417, który zawiera kilka kodów w jednym zdjęciu. W mojej codziennej pracy natrafiłem właśnie na taki problem — dopóki nie odkryłem `BarCodeReader` z Aspose.BarCode. Ten samouczek przeprowadzi Cię przez dekodowanie każdego kodu kreskowego na obrazie, ustalenie, czy każdy PDF417 jest w trybie kompaktowym (skróconym), oraz czyste obsłużenie wyników. + +Dodamy również kilka dodatkowych wskazówek — np. co zrobić, gdy obraz zawiera różne symbologie kodów kreskowych lub gdy skan nie zwraca żadnych wyników. Po zakończeniu będziesz mieć gotową do uruchomienia aplikację konsolową, która **odczytuje wiele kodów kreskowych C#** jak profesjonalista. + +## Czego będziesz potrzebować + +- **.NET 6.0** SDK lub nowszy (kod działa również z .NET Framework 4.6+, ale .NET 6 jest optymalnym wyborem). +- **Aspose.BarCode for .NET** pakiet NuGet (`Install-Package Aspose.BarCode`). +- Przykładowy obraz zawierający kody **PDF417** — najlepiej taki, który miesza symbole kompaktowe i pełnowymiarowe. W samouczku użyto `CompactPdf417.png`, ale dowolny plik PNG/JPEG się sprawdzi. +- Twoje ulubione IDE (Visual Studio, Rider lub VS Code). + +To wszystko — bez dodatkowych DLL‑ów, bez natywnych zależności. Aspose.BarCode jest czystym kodem zarządzanym, więc możesz go dodać do dowolnego projektu .NET. + +![Odczyt wielu kodów kreskowych C# – zrzut ekranu konsoli wyświetlający status trybu kompaktowego dla kodów PDF417](image.png "Wyjście konsoli odczytu wielu kodów kreskowych C#") + +## Krok 1 – Zainstaluj i odwołaj się do biblioteki BarCodeReader C# + +Na początek potrzebujesz klasy **BarCodeReader C#**, która napędza dekodowanie. Otwórz terminal (lub Package Manager Console) i uruchom: + +```powershell +dotnet add package Aspose.BarCode +``` + +Albo, jeśli jesteś w menedżerze NuGet w Visual Studio, po prostu wyszukaj *Aspose.BarCode* i kliknij **Install**. Pobierze to najnowszą stabilną wersję (stan na lipiec 2026 to 23.9), która obsługuje PDF417, QR, DataMatrix i wiele innych symbologii. + +Dlaczego to ważne: biblioteka ukrywa skomplikowaną logikę przetwarzania obrazu, korekcji błędów i rozpoznawania symboli. Mógłbyś napisać własny skaner, ale spędziłbyś tygodnie na rozwiązywaniu przypadków brzegowych. Aspose dostarcza sprawdzoną w boju, **bibliotekę kodów kreskowych C#**, która jest aktualizowana pod kątem nowoczesnych środowisk .NET. + +## Krok 2 – Utwórz minimalny projekt konsolowy + +Utwórz nową aplikację konsolową, abyśmy mogli skupić się na logice kodów kreskowych bez zbędnego interfejsu UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Zastąp wygenerowany plik `Program.cs` pełnym przykładem poniżej. Możesz zachować domyślną przestrzeń nazw lub ją zmienić — nie jest to konieczne. + +## Krok 3 – Napisz pełną implementację „Read Multiple Barcodes C#” + +Poniżej znajduje się **kompletny, gotowy do uruchomienia** przykład kodu. Obejmuje wszystkie cztery kroki z oryginalnego fragmentu, dodaje obsługę błędów i wypisuje przydatne informacje diagnostyczne. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Dlaczego ten kod działa + +- **`BarCodeReader`** jest głównym elementem API **BarCodeReader C#**. Otwiera obraz, stosuje wstępne przetwarzanie i wyszukuje symbole określonego typu. +- **`ReadBarCodes()`** zwraca tablicę, a nie pojedynczy wynik. To klucz do **odczytywania wielu kodów kreskowych C#** — metoda automatycznie zbiera wszystkie znalezione dopasowania. +- **`result.Extended.Pdf417.IsTruncated`** informuje, czy PDF417 jest w trybie *compact* (znanym również jako truncated). Ten znacznik istnieje tylko dla PDF417, więc używamy operatora warunkowego (`?.`), aby uniknąć wyjątków, gdy pojawi się inna symbologia. +- Pętla `foreach` wypisuje zarówno zdekodowany tekst, jak i status trybu kompaktowego, zapewniając szybki przegląd. + +## Krok 4 – Obsługa różnych typów kodów kreskowych (Opcjonalnie) + +Jeśli Twój obraz może zawierać więcej niż tylko PDF417, po prostu zmień drugi argument `BarCodeReader` na `DecodeType.AllSupported`. Pętla pozostaje bez zmian, ale musisz zabezpieczyć się przed tym, że `result.Extended` może być null dla symboli nie‑PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Ta mała zmiana przekształca Twoją **bibliotekę kodów kreskowych C#** w uniwersalny skaner, idealny dla partii z mieszanymi symbologiami. + +## Krok 5 – Przypadki brzegowe i wskazówki najlepszych praktyk + +### 1️⃣ Nie wykryto kodów kreskowych +Jeśli `ReadBarCodes()` zwraca pustą tablicę, najczęstsze przyczyny to: + +- Nieprawidłowa ścieżka pliku lub brak uprawnień do odczytu. +- Zbyt niska jakość obrazu (rozmycie, niski kontrast). Rozważ wstępne przetwarzanie przy użyciu `reader.ImagePreprocessingOptions` (np. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Bardzo duże obrazy +Przetwarzanie zdjęcia 10 MP może wymagać dużo pamięci. Możesz ograniczyć obszar skanowania: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Bezpieczeństwo wątków +`BarCodeReader` implementuje `IDisposable` i **nie** jest bezpieczny wątkowo. Uruchom oddzielne instancje na każdy wątek, jeśli potrzebujesz przetwarzania równoległego. + +### 4️⃣ Licencjonowanie +Aspose.BarCode działa w trybie próbnym od razu, ale na wyjściowym obrazie pojawi się znak wodny. W środowisku produkcyjnym ustaw licencję na początku: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logowanie +Gdy integrujesz to z większą usługą, zamień `Console.WriteLine` na strukturalny logger (Serilog, NLog). Dzięki temu będziesz mógł przechwycić `CodeText`, `CodeType` i `IsTruncated` jako pola do dalszej analizy. + +## Pełny działający przykład – podsumowanie + +Łącząc wszystko razem, oto *cały* program, który możesz skopiować i wkleić do `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Co powinieneś nauczyć się dalej? + +Poniższe samouczki obejmują tematy ściśle powiązane, które rozwijają techniki przedstawione w tym przewodniku. Każde źródło zawiera kompletne działające przykłady kodu z krok po kroku wyjaśnieniami, aby pomóc Ci opanować dodatkowe funkcje API i odkrywać alternatywne podejścia implementacyjne w własnych projektach. + +- [Jak generować kody PDF417 – Kompaktowe kodowanie PDF417](/barcode/english/net/compact-pdf417-encoding/) +- [Jak tworzyć kody kreskowe – Kompaktowy PDF417 z Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Jak odczytywać kody DataMatrix przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/polish/net/one-dimensional-barcode-types/_index.md b/barcode/polish/net/one-dimensional-barcode-types/_index.md index 8fef375f6..9ffb15765 100644 --- a/barcode/polish/net/one-dimensional-barcode-types/_index.md +++ b/barcode/polish/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ zarabiaj, jak generować kody kreskowe w .NET za pomocą Aspose.BarCode dla .NET Dowiedz się, jak obsługiwać wyjątki podczas generowania jednowymiarowych kodów kreskowych przy użyciu Aspose.BarCode dla .NET. Ten przewodnik krok po kroku zapewnia rozwiązania odporne na błędy w zakresie kodów kreskowych. Zacznij teraz! ### [Konfiguracja jednowymiarowego szerokiego i wąskiego współczynnika](./one-dimensional-wide-narrow-ratio-configuration/) Z łatwością generuj niestandardowe kody kreskowe za pomocą Aspose.BarCode dla .NET. Przewodnik krok po kroku dotyczący konfiguracji jednowymiarowego współczynnika szerokiego i wąskiego. +### [Odczyt kodu kreskowego z obrazu – przykład czytnika w C#](./read-barcode-from-image-c-barcode-reader-example/) +Dowiedz się, jak odczytać kod kreskowy z obrazu w C# przy użyciu Aspose.BarCode. ## Wniosek @@ -89,4 +91,4 @@ Dzięki temu artykułowi nie tylko zdobędziesz wiedzę na temat różnych typó {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/polish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/polish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..e10ad194c --- /dev/null +++ b/barcode/polish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,280 @@ +--- +category: general +date: 2026-07-30 +description: Odczytaj kod kreskowy z obrazu przy użyciu Aspose.BarCode dla .NET – + kompletny przykład czytnika kodów kreskowych w C#, który pokazuje, jak dekodować + kody Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: pl +lastmod: 2026-07-30 +og_description: Odczytaj kod kreskowy z obrazu przy użyciu Aspose.BarCode dla .NET. + Ten krok po kroku przykład czytnika kodów kreskowych w C# pokazuje, jak wyodrębnić + wszystkie metadane Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Odczytaj kod kreskowy z obrazu – Pełny przykład czytnika kodów kreskowych + w C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Odczytaj kod kreskowy z obrazu – przykład czytnika kodów kreskowych w C# +url: /pl/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Odczytaj kod kreskowy z obrazu – przykład czytnika kodów kreskowych w C# + +Potrzebujesz **odczytać kod kreskowy z obrazu** w aplikacji C#? Jesteś we właściwym miejscu. W tym samouczku przeprowadzimy Cię przez kompletny *c# barcode reader example*, który używa biblioteki Aspose.BarCode for .NET do dekodowania kodu Macro PDF417 i wyciągnięcia każdej części rozszerzonych informacji, które standard zapewnia. + +Wyobraź sobie, że właśnie zeskanowałeś etykietę wysyłkową, kartę pokładową lub rządowy dokument tożsamości, który zawiera segment Macro PDF417. Chcesz wyciągnąć identyfikator pliku, liczbę segmentów, znaczniki czasu i być może nawet nazwę nadawcy — wszystko bez opuszczania kodu. To właśnie zamierzamy osiągnąć, i zrobimy to w sposób łatwy do skopiowania‑wklejenia do własnego projektu. + +--- + +## Czego się nauczysz + +- Jak dodać pakiet NuGet Aspose.BarCode do projektu .NET. +- Jak otworzyć plik obrazu zawierający kod Macro PDF417. +- Jak iterować po wynikach **read barcode from image** i uzyskać dostęp do każdego rozszerzonego pola. +- Wskazówki dotyczące obsługi wielu segmentów, walidacji sum kontrolnych oraz rozwiązywania typowych problemów. + +Po zakończeniu tego przewodnika będziesz mieć działającą aplikację konsolową, która wypisuje wszystkie metadane Macro PDF417, gotową do integracji z większymi systemami, takimi jak systemy śledzenia zapasów czy potoki zarządzania dokumentami. + +--- + +## Wymagania wstępne + +Zanim zaczniemy, upewnij się, że masz następujące elementy: + +| Requirement | Why it matters | +|-------------|----------------| +| .NET 6.0 SDK lub nowszy (dowolna aktualna wersja działa) | Zapewnia środowisko uruchomieniowe dla aplikacji konsolowej. | +| Visual Studio 2022 (lub VS Code z rozszerzeniem C#) | Ułatwia edycję i debugowanie. | +| Aspose.BarCode for .NET (bezpłatna wersja próbna lub licencjonowana) | Biblioteka, która faktycznie dekoduje kod kreskowy. | +| Plik obrazu (`MacroPdf417Meta.png`) zawierający kod Macro PDF417 | Źródło, z którego będziemy odczytywać. | + +Jeśli nie masz jeszcze Aspose.BarCode, możesz pobrać go z NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +To pojedyncze polecenie zainstaluje wszystko, czego potrzebujesz, w tym `BarCodeReader`, `DecodeType` oraz rozbudowany zestaw właściwości `Extended`, który będziemy badać. + +--- + +## Krok 1 – Konfiguracja projektu i import biblioteki + +Utwórz nowy projekt konsolowy (lub wstaw kod do istniejącego). Dyrektywy `using` są niezbędne; wprowadzają klasy kodów kreskowych do zakresu. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Wskazówka:** Jeśli używasz Visual Studio, IDE zaoferuje automatyczne dodanie brakujących instrukcji `using` — po prostu naciśnij *Ctrl+.`*. + +--- + +## Krok 2 – Przygotowanie ścieżki do obrazu + +Wpisanie na stałe ścieżki bezwzględnej działa w szybkim demo, ale w produkcji prawdopodobnie przyjmiesz argument wiersza poleceń lub ustawienie konfiguracyjne. Dla przejrzystości pozostawimy to proste: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Dlaczego to ważne:** `BarCodeReader` oczekuje prawidłowej lokalizacji pliku; niepoprawna ścieżka powoduje wyrzucenie `FileNotFoundException` zanim rozpocznie się jakiekolwiek dekodowanie. + +--- + +## Krok 3 – **Read barcode from image** i wyodrębnienie szczegółów Macro PDF417 + +Teraz przychodzi serce **c# barcode reader example**. Utworzymy instancję `BarCodeReader` z flagą `DecodeType.MacroPdf417`, przeiterujemy wszystkie wyniki (w jednym obrazie może znajdować się więcej niż jeden kod) i wypiszemy każdą rozszerzoną właściwość. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Co robi kod (dlaczego, a nie tylko jak) + +1. **`using` block** – Gwarantuje, że natywne zasoby (uchwyty plików, pamięć dekodera natywnego) zostaną zwolnione natychmiast po zakończeniu operacji. Pominięcie tego może spowodować zablokowanie plików w systemie Windows. +2. **`DecodeType.MacroPdf417`** – Informuje Aspose, aby szukał konkretnie symboli Macro PDF417; inne typy kodów kreskowych są ignorowane, co przyspiesza skanowanie. +3. **`ReadBarCodes()`** – Zwraca kolekcję, ponieważ obraz może zawierać wiele segmentów Macro PDF417 (np. dokument wielostronicowy podzielony na kilka kodów). +4. **`macroResult.Extended?.Pdf417`** – Obiekt `Extended` jest nullable; operator bezpiecznej nawigacji (`?.`) zapobiega `NullReferenceException`, jeśli kod nie zawiera rozszerzonych danych. +5. **Wypisywanie każdego pola** – Daje wgląd w identyfikator pliku, kolejność segmentów, weryfikację sumy kontrolnej oraz opcjonalne pola tekstowe, takie jak nadawca lub odbiorca. + +--- + +## Krok 4 – Uruchom aplikację i zweryfikuj wynik + +Skompiluj i uruchom program: + +```bash +dotnet run +``` + +Jeśli wszystko jest poprawnie podłączone, powinieneś zobaczyć coś podobnego do poniższego w konsoli: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Uwaga:** Dokładne wartości zależą od dekodowanego kodu kreskowego. Jeśli otrzymasz komunikat „No Macro PDF417 extension data found”, sprawdź ponownie, czy obraz rzeczywiście zawiera kod Macro PDF417 i czy używasz właściwego `DecodeType`. + +--- + +## Obsługa wielu segmentów i walidacja (zaawansowane) + +Macro PDF417 jest przeznaczony do dużych ładunków danych podzielonych na kilka symboli. Gdy napotkasz więcej niż jeden segment, zazwyczaj będziesz musiał: + +1. **Zbierz wszystkie segmenty** w słowniku kluczowanym według `SegmentID`. +2. **Posortuj** je według `SegmentID`, aby złożyć ponownie oryginalny plik. +3. **Zweryfikuj** `Checksum` względem połączonego ładunku (Aspose robi to wewnętrznie, ale możesz ponownie wykonać CRC, jeśli potrzebujesz dodatkowego bezpieczeństwa). + +Oto szybki szkic: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Będziesz musiał zaimplementować `AssembleSegments` i `VerifyChecksum` w oparciu o format Twojego ładunku — często jest to po prostu konkatenacja tablicy bajtów, po której następuje sprawdzenie CRC‑16. + +--- + +## Typowe pułapki i jak ich unikać + +| Symptom | Likely cause | Fix | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | Obraz zawiera zwykły PDF417, a nie wersję Macro. | Użyj `DecodeType.Pdf417` zamiast tego, lub zweryfikuj źródłowy kod kreskowy. | +| No output at all | `imagePath` jest nieprawidłowy lub plik jest niedostępny. | Sprawdź ponownie ścieżkę do pliku; upewnij się, że aplikacja ma uprawnienia do odczytu. | +| Exception “Object disposed” | Próba użycia `reader` po zakończeniu bloku `using`. | Keep all processing inside the ` + +## Co powinieneś nauczyć się dalej? + +Poniższe samouczki obejmują ściśle powiązane tematy, które rozwijają techniki przedstawione w tym przewodniku. Każdy zasób zawiera kompletne działające przykłady kodu z wyjaśnieniami krok po kroku, aby pomóc Ci opanować dodatkowe funkcje API i odkrywać alternatywne podejścia implementacyjne w własnych projektach. + +- [Programowanie czytnika DataMatrix z Aspose.BarCode dla .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Inicjalizacja czytnika DotCode z Aspose.BarCode dla .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Jak odczytywać kody DataMatrix z Aspose.BarCode dla .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/portuguese/net/compact-pdf417-encoding/_index.md b/barcode/portuguese/net/compact-pdf417-encoding/_index.md index 9b00326c0..2060027dd 100644 --- a/barcode/portuguese/net/compact-pdf417-encoding/_index.md +++ b/barcode/portuguese/net/compact-pdf417-encoding/_index.md @@ -85,6 +85,12 @@ Beyond the basics, here are some practical tips to streamline your workflow: ### [Criando Códigos de Barras Compact PDF417](./compact-pdf417-basic-configuration/) Learn how to generate Compact PDF417 barcodes using Aspose.BarCode for .NET. Comprehensive guide with step-by-step instructions and code examples. +### [Como gerar imagem de código de barras PDF417 em C# com Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Aprenda a gerar imagens de códigos de barras PDF417 em C# usando Aspose. + +### [Ler Vários Códigos de Barras C# – Guia Completo com PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Aprenda a ler múltiplos códigos de barras, incluindo PDF417, usando C# com Aspose.BarCode. + ## Perguntas Frequentes **Q: Qual é a quantidade máxima de dados que posso armazenar em um código de barras Compact PDF417?** @@ -113,4 +119,4 @@ A: Não são necessárias fontes externas; a biblioteca lida com toda a renderiz {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/portuguese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/portuguese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..87a10760c --- /dev/null +++ b/barcode/portuguese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Como gerar imagem de código de barras PDF417 em C# com Aspose. Aprenda + passo a passo como criar o código de barras com Aspose, definir os metadados MacroPDF417 + e salvar como PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: pt +lastmod: 2026-07-30 +og_description: Como gerar imagem de código de barras PDF417 em C# com Aspose. Siga + este guia completo para criar um código de barras com Aspose, configurar os metadados + MacroPDF417 e gerar um arquivo PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Como gerar imagem de código de barras PDF417 em C# com Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Como gerar imagem de código de barras PDF417 em C# com Aspose +url: /pt/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Como Gerar Imagem de Código de Barras PDF417 em C# com Aspose + +Como gerar imagem de código de barras PDF417 em C# com Aspose é um obstáculo frequente para quem lida com codificação de dados de alta densidade. Neste guia, vamos percorrer cada passo — configurar o gerador, ajustar os metadados MacroPDF417 e, finalmente, salvar um arquivo PNG nítido. + +Se você já tentou **generate barcode image c#** e acabou com uma tela em branco ou uma leitura ilegível, não está sozinho. A boa notícia é que o Aspose.BarCode torna todo o processo quase indolor, e ao final deste artigo você será capaz de **create barcode with Aspose** para qualquer fluxo de trabalho empresarial. + +## O Que Você Vai Aprender + +- Instalar e referenciar a biblioteca Aspose.BarCode para .NET. +- Inicializar um gerador PDF417 com um payload personalizado. +- Aplicar campos específicos do MacroPDF417, como file ID, segment ID e timestamp. +- Exportar o resultado para uma imagem PNG que pode ser incorporada em relatórios ou apps móveis. +- Dicas para solucionar armadilhas comuns (ex.: largura de módulo incorreta, segmentos ausentes). + +Nenhuma experiência prévia com MacroPDF417 é necessária; um entendimento básico de C# e Visual Studio será suficiente. + +## Pré‑requisitos + +| Requisito | Motivo | +|-----------|--------| +| .NET 6.0 ou superior | Versão LTS atual, totalmente suportada pela Aspose | +| Visual Studio 2022 (ou qualquer IDE) | Para compilar e executar o exemplo | +| Aspose.BarCode para .NET (NuGet) | Fornece `BarcodeGenerator` e suporte a PDF417 | + +Você pode adicionar a biblioteca via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Agora que a base está pronta, vamos mergulhar no código. + +## Como Gerar Imagem de Código de Barras PDF417 em C# – Configuração + +A primeira coisa que fazemos é criar uma instância de `BarcodeGenerator` para o tipo de codificação **MacroPdf417**. Esse objeto contém todas as opções de configuração, desde o tamanho do módulo até os ricos metadados que o MacroPDF417 espera. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Por que isso importa:** `EncodeTypes.MacroPdf417` indica ao Aspose que ele deve produzir um código de barras PDF417 que pode ser dividido em múltiplos segmentos — essencial para arquivos grandes ou processamento em lote. + +## Configurar Aparência Básica + +Um código de barras legível começa com as configurações visuais corretas. O `XDimension` controla a largura de cada módulo (os pequenos quadrados pretos/brancos), enquanto `Columns` determina quantas colunas o código de barras ocupa. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Dica:** Se o código de barras parecer muito denso em uma impressora de recibos, aumente `XDimension` para `3` ou `4`. +- **Armadilha:** Definir `Columns` muito baixo pode fazer o código de barras ultrapassar os limites da imagem, resultando em uma leitura ilegível. + +## Definir Metadados Específicos do MacroPDF417 + +MacroPDF417 permite incorporar informações ao nível de arquivo diretamente no código de barras. Isso é perfeito para rastrear envios de documentos volumosos ou dividir um arquivo em várias leituras. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**O que cada campo faz:** + +| Propriedade | Descrição | +|-------------|-----------| +| `MacroPdf417FileID` | Identificador único para todo o arquivo. | +| `MacroPdf417SegmentID` | Índice do segmento atual (começa em 0). | +| `MacroPdf417SegmentsCount` | Número total de segmentos nos quais o arquivo foi dividido. | +| `MacroPdf417FileName` | Nome legível por humanos, útil para logs de auditoria. | +| `MacroPdf417Checksum` | CRC de 16 bits para verificação de integridade dos dados. | +| `MacroPdf417FileSize` | Tamanho original do arquivo em bytes, ajuda o receptor a alocar buffers. | +| `MacroPdf417TimeStamp` | Data/hora em que o arquivo foi gerado. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Strings opcionais para identificar remetente/destinatário. | +| `MacroPdf417Terminator` | Marca o último segmento; necessário para decodificação correta. | + +> **Por que se preocupar?** Sem esses campos, um scanner só lê os dados brutos, sem contexto. Ao adicionar metadados, o sistema receptor pode remontar o arquivo original automaticamente. + +## Salvar o Código de Barras como PNG + +Uma vez que o gerador esteja totalmente configurado, persistir a imagem é uma única linha: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Formato de arquivo:** PNG é sem perdas, garantindo que cada módulo permaneça nítido para os scanners. +- **Alternativa:** Use `BarCodeImageFormat.Jpeg` se precisar de um tamanho de arquivo menor, mas espere uma leve perda de legibilidade. + +### Saída Esperada + +Depois de executar o trecho, você encontrará `MacroPdf417Meta.png` na pasta especificada. Ele deve se parecer com a ilustração abaixo: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Como gerar imagem de código de barras PDF417 em C#"} + +A imagem contém uma grade densa de quadrados pretos e brancos, com o payload codificado e os metadados MacroPDF417 incorporados. + +## Exemplo Completo Funcional + +Abaixo está o programa completo, pronto para copiar e colar. Ele compila em qualquer projeto .NET 6+ e requer apenas o pacote NuGet Aspose.BarCode. + + + +## O Que Você Deve Aprender a Seguir? + +Os tutoriais a seguir abordam tópicos intimamente relacionados que ampliam as técnicas demonstradas neste guia. Cada recurso inclui exemplos de código completos com explicações passo a passo para ajudá‑lo a dominar recursos adicionais da API e explorar abordagens alternativas de implementação em seus próprios projetos. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/portuguese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/portuguese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..126870c99 --- /dev/null +++ b/barcode/portuguese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Leia vários códigos de barras em C# usando Aspose.BarCode. Aprenda passo + a passo como decodificar PDF417, detectar o modo compacto e lidar com muitos códigos + de barras em uma única imagem. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: pt +lastmod: 2026-07-30 +og_description: Leia vários códigos de barras em C# com Aspose.BarCode. Este guia + mostra como decodificar todos os códigos de barras em uma imagem, verificar o modo + compacto e integrar em aplicativos .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Ler Vários Códigos de Barras C# – Tutorial Completo para PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Ler Múltiplos Códigos de Barras C# – Guia Completo com PDF417 +url: /pt/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Ler Vários Códigos de Barras C# – Guia Completo com PDF417 + +Já se perguntou como **ler vários códigos de barras C#** a partir de uma única imagem? Talvez você tenha um lote de etiquetas de envio, um collage de ingressos ou um documento PDF417 que agrupa vários códigos em uma foto. No meu dia a dia, encontrei exatamente esse obstáculo—até descobrir o `BarCodeReader` da Aspose.BarCode. Este tutorial mostrará como decodificar cada código de barras em uma imagem, identificar se cada PDF417 está em modo compacto (truncado) e tratar os resultados de forma limpa. + +Também vamos acrescentar algumas dicas extras—como o que fazer quando a imagem contém diferentes simbologias de código de barras, ou quando uma varredura não retorna nenhum resultado. Ao final, você terá um aplicativo console pronto‑para‑executar que **lê vários códigos de barras C#** como um profissional. + +## O que você precisará + +Antes de começar, certifique‑se de que tem o seguinte instalado na sua máquina: + +- **.NET 6.0** SDK ou superior (o código também funciona com .NET Framework 4.6+ , mas .NET 6 é o ponto ideal). +- **Aspose.BarCode for .NET** pacote NuGet (`Install-Package Aspose.BarCode`). +- Uma imagem de exemplo que contenha códigos de barras **PDF417**—de preferência uma que misture símbolos compactos e de tamanho completo. O tutorial usa `CompactPdf417.png`, mas qualquer PNG/JPEG serve. +- Seu IDE favorito (Visual Studio, Rider ou VS Code). + +É só isso—sem DLLs extras, sem dependências nativas. Aspose.BarCode é código totalmente gerenciado, podendo ser inserido em qualquer projeto .NET. + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Texto alternativo da imagem: Ler vários códigos de barras C# – captura de tela do console exibindo o status do modo compacto para códigos de barras PDF417.* + +## Etapa 1 – Instalar e Referenciar a Biblioteca BarCodeReader C# + +Primeiro de tudo, você precisa da classe **BarCodeReader C#** que alimenta a decodificação. Abra seu terminal (ou Package Manager Console) e execute: + +```powershell +dotnet add package Aspose.BarCode +``` + +Ou, se estiver usando o gerenciador NuGet do Visual Studio, basta procurar por *Aspose.BarCode* e clicar em **Install**. Isso traz a versão estável mais recente (em julho 2026 é a 23.9), que suporta PDF417, QR, DataMatrix e dezenas de outras simbologias. + +Por que isso importa: a biblioteca abstrai todo o trabalho pesado de processamento de imagem, correção de erros e reconhecimento de símbolos. Você poderia escrever seu próprio scanner, mas gastaria semanas lidando com casos‑limite. Aspose oferece uma **biblioteca de códigos de barras C#** testada em batalha e atualizada para runtimes .NET modernos. + +## Etapa 2 – Configurar um Projeto Console Minimalista + +Crie um novo aplicativo console para focarmos na lógica de código de barras sem distrações de UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Substitua o `Program.cs` gerado pelo exemplo completo abaixo. Sinta‑se à vontade para manter o namespace padrão ou renomeá‑lo—não há nada especial exigido. + +## Etapa 3 – Escrever a Implementação Completa “Read Multiple Barcodes C#” + +A seguir, um exemplo de código **completo e executável**. Ele cobre todas as quatro etapas do trecho original, adiciona tratamento de erros e imprime diagnósticos úteis. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Por que este código funciona + +- **`BarCodeReader`** é o motor da API **BarCodeReader C#**. Ele abre a imagem, aplica pré‑processamento e procura símbolos do tipo especificado. +- **`ReadBarCodes()`** devolve um array, não apenas um único resultado. Esse é o ponto chave para **ler vários códigos de barras C#**—o método coleta automaticamente cada correspondência encontrada. +- **`result.Extended.Pdf417.IsTruncated`** indica se o PDF417 está em modo *compacto* (também chamado truncado). Essa flag só existe para PDF417, por isso usamos o operador condicional nulo (`?.`) para evitar exceções caso outra simbologia apareça. +- O laço `foreach` imprime tanto o texto decodificado quanto o status de compacto, oferecendo uma verificação rápida. + +## Etapa 4 – Tratando Diferentes Tipos de Código de Barras (Opcional) + +Se sua imagem puder conter mais que PDF417, basta mudar o segundo argumento do `BarCodeReader` para `DecodeType.AllSupported`. O laço permanece o mesmo, mas você precisará proteger contra `result.Extended` ser nulo para símbolos que não sejam PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Essa pequena alteração transforma sua **biblioteca de códigos de barras C#** em um scanner universal, perfeito para lotes com simbologias mistas. + +## Etapa 5 – Casos de Borda e Dicas de Boas Práticas + +### 1️⃣ Nenhum código de barras detectado +Se `ReadBarCodes()` retornar um array vazio, os culpados mais comuns são: + +- Caminho de arquivo errado ou permissões de leitura ausentes. +- Qualidade da imagem muito baixa (desfoque, baixo contraste). Considere pré‑processar com `reader.ImagePreprocessingOptions` (ex.: `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Imagens extremamente grandes +Processar uma foto de 10 MP pode consumir muita memória. Você pode limitar a área de varredura: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Segurança em threads +`BarCodeReader` implementa `IDisposable` e **não** é thread‑safe. Crie instâncias separadas por thread se precisar de processamento paralelo. + +### 4️⃣ Licenciamento +Aspose.BarCode funciona em modo de avaliação por padrão, mas exibirá uma marca d'água na imagem de saída. Para produção, defina a licença logo no início: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Registro de logs +Ao integrar isso a um serviço maior, substitua `Console.WriteLine` por um logger estruturado (Serilog, NLog). Assim você pode capturar `CodeText`, `CodeType` e `IsTruncated` como campos para análises posteriores. + +## Recapitulação do Exemplo Completo + +Juntando tudo, aqui está o *programa inteiro* que você pode copiar‑colar em `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## O que você deve aprender a seguir? + + +Os tutoriais a seguir abordam tópicos intimamente relacionados que expandem as técnicas demonstradas neste guia. Cada recurso inclui exemplos de código completos com explicações passo a passo para ajudá‑lo a dominar recursos adicionais da API e explorar abordagens alternativas de implementação em seus próprios projetos. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/portuguese/net/one-dimensional-barcode-types/_index.md b/barcode/portuguese/net/one-dimensional-barcode-types/_index.md index 5c81ef2a1..05370315d 100644 --- a/barcode/portuguese/net/one-dimensional-barcode-types/_index.md +++ b/barcode/portuguese/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ aprenda como gerar códigos de barras em .NET com Aspose.BarCode for .NET. Este Aprenda como lidar com exceções ao gerar códigos de barras unidimensionais usando Aspose.BarCode for .NET. Este guia passo a passo garante soluções de código de barras tolerantes a erros. Comece agora! ### [Configuração de relação ampla-estreita unidimensional](./one-dimensional-wide-narrow-ratio-configuration/) Gere códigos de barras personalizados facilmente com Aspose.BarCode for .NET. Guia passo a passo para configuração unidimensional de proporção larga-estreita. +### [Ler código de barras a partir de imagem – Exemplo de leitor de código de barras em C#](./read-barcode-from-image-c-barcode-reader-example/) +Aprenda a ler códigos de barras de imagens usando Aspose.BarCode em C# com este exemplo passo a passo. ## Conclusão @@ -89,4 +91,4 @@ Com este artigo, você não apenas obterá conhecimento sobre vários tipos de c {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/portuguese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/portuguese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..7bc1589d3 --- /dev/null +++ b/barcode/portuguese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,281 @@ +--- +category: general +date: 2026-07-30 +description: Ler código de barras a partir de imagem usando Aspose.BarCode para .NET + – um exemplo completo em C# de leitor de código de barras que mostra como decodificar + códigos de barras Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: pt +lastmod: 2026-07-30 +og_description: Leia o código de barras a partir de uma imagem com Aspose.BarCode + para .NET. Este exemplo passo a passo de leitor de código de barras em C# mostra + como extrair todos os metadados Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Ler código de barras a partir de imagem – Exemplo completo de leitor de + código de barras em C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Ler código de barras a partir de imagem – Exemplo de leitor de código de barras + em C# +url: /pt/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Ler código de barras de imagem – exemplo de leitor de código de barras em C# + +Precisa **ler código de barras de imagem** em uma aplicação C#? Você está no lugar certo. Neste tutorial vamos percorrer um *exemplo de leitor de código de barras c#* completo que usa a biblioteca Aspose.BarCode for .NET para decodificar um código de barras Macro PDF417 e extrair todas as informações estendidas que o padrão fornece. + +Imagine que você acabou de escanear uma etiqueta de envio, um cartão de embarque ou um documento de identidade governamental que incorpora um segmento Macro PDF417. Você quer obter o ID do arquivo, a contagem de segmentos, timestamps e talvez até o nome do remetente — tudo sem sair do seu código. É exatamente isso que vamos alcançar, e faremos de uma forma fácil de copiar‑colar para o seu próprio projeto. + +--- + +## O que você aprenderá + +- Como adicionar o pacote NuGet Aspose.BarCode a um projeto .NET. +- Como abrir um arquivo de imagem que contém um código de barras Macro PDF417. +- Como iterar sobre os resultados de **ler código de barras de imagem** e acessar cada campo estendido. +- Dicas para lidar com múltiplos segmentos, validar somas de verificação e solucionar armadilhas comuns. + +Ao final deste guia você terá um aplicativo console funcional que imprime todos os metadados do Macro PDF417, pronto para ser integrado a sistemas maiores como rastreadores de inventário ou pipelines de gerenciamento de documentos. + +--- + +## Pré-requisitos + +Antes de mergulharmos, certifique‑se de que você tem o seguinte: + +| Requisito | Por que é importante | +|-------------|----------------| +| .NET 6.0 SDK ou posterior (qualquer versão recente funciona) | Fornece o runtime para o aplicativo console. | +| Visual Studio 2022 (ou VS Code com extensão C#) | Facilita a edição e depuração. | +| Aspose.BarCode for .NET (versão de avaliação gratuita ou licenciada) | A biblioteca que realmente decodifica o código de barras. | +| Um arquivo de imagem (`MacroPdf417Meta.png`) que contém um código de barras Macro PDF417 | A fonte que leremos. | + +Se ainda não tem o Aspose.BarCode, você pode obtê‑lo no NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Essa única linha instala tudo o que você precisa, incluindo o `BarCodeReader`, `DecodeType` e o rico conjunto de propriedades `Extended` que exploraremos. + +--- + +## Etapa 1 – Configurar o projeto e importar a biblioteca + +Crie um novo projeto console (ou insira o código em um existente). As diretivas `using` são essenciais; elas trazem as classes de código de barras para o escopo. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Dica profissional:** Se você estiver usando o Visual Studio, a IDE oferecerá adicionar as declarações `using` ausentes automaticamente — basta pressionar *Ctrl+.`*. + +--- + +## Etapa 2 – Preparar o caminho da imagem + +Codificar um caminho absoluto funciona para uma demonstração rápida, mas em produção você provavelmente aceitará um argumento de linha de comando ou uma configuração. Para clareza, manteremos simples: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Por que isso importa:** O `BarCodeReader` espera uma localização de arquivo válida; um caminho incorreto lança um `FileNotFoundException` antes que qualquer decodificação comece. + +--- + +## Etapa 3 – **Ler código de barras de imagem** e extrair detalhes do Macro PDF417 + +Agora vem o coração do **exemplo de leitor de código de barras c#**. Instanciaremos `BarCodeReader` com a flag `DecodeType.MacroPdf417`, percorreremos todos os resultados (pode haver mais de um código de barras em uma única imagem) e imprimiremos cada propriedade estendida. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### O que o código está fazendo (por quê, não apenas como) + +1. **`using` block** – Garante que os recursos nativos (manipuladores de arquivo, memória do decodificador nativo) sejam liberados imediatamente após a operação. Pular isso pode causar arquivos bloqueados no Windows. +2. **`DecodeType.MacroPdf417`** – Diz ao Aspose para procurar especificamente símbolos Macro PDF417; outros tipos de código de barras são ignorados, o que acelera a varredura. +3. **`ReadBarCodes()`** – Retorna uma coleção porque uma imagem pode conter múltiplos segmentos Macro PDF417 (pense em um documento de várias páginas dividido em vários códigos de barras). +4. **`macroResult.Extended?.Pdf417`** – O objeto `Extended` é anulável; o operador de navegação segura (`?.`) impede um `NullReferenceException` se o código de barras não possuir dados estendidos. +5. **Printing each field** – Fornece visibilidade ao identificador do arquivo, ordem dos segmentos, verificação de checksum e campos textuais opcionais como remetente ou destinatário. + +--- + +## Etapa 4 – Executar o aplicativo e verificar a saída + +Compile e execute o programa: + +```bash +dotnet run +``` + +Se tudo estiver configurado corretamente, você deverá ver algo semelhante ao seguinte no console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Nota:** Os valores exatos dependem do código de barras que você está decodificando. Se aparecer “No Macro PDF417 extension data found”, verifique novamente se a imagem realmente contém um código Macro PDF417 e se você está usando o `DecodeType` correto. + +--- + +## Manipulação de múltiplos segmentos e validação (avançado) + +Macro PDF417 foi projetado para grandes cargas de dados divididas em vários símbolos. Quando você encontrar mais de um segmento, normalmente precisará: + +1. **Coletar todos os segmentos** em um dicionário indexado por `SegmentID`. +2. **Ordená‑los** por `SegmentID` para remontar o arquivo original. +3. **Validar** o `Checksum` contra a carga concatenada (o Aspose faz isso internamente, mas você pode refazer um CRC se precisar de segurança extra). + +Aqui está um esboço rápido: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Você precisará implementar `AssembleSegments` e `VerifyChecksum` com base no formato da sua carga — geralmente é apenas uma concatenação de array de bytes seguida de um verificador CRC‑16. + +--- + +## Armadilhas comuns e como evitá‑las + +| Sintoma | Causa provável | Correção | +|---------|----------------|----------| +| `null` retornado de `macroResult.Extended` | A imagem contém um PDF417 simples, não a versão Macro. | Use `DecodeType.Pdf417` em vez disso, ou verifique o código de barras de origem. | +| Nenhuma saída | `imagePath` errado ou arquivo inacessível. | Verifique novamente o caminho do arquivo; garanta que o aplicativo tenha permissões de leitura. | +| Exceção “Object disposed” | Tentativa de usar `reader` após o bloco `using`. | Mantenha todo o processamento dentro do ` + +## O que você deve aprender a seguir? + +Os tutoriais a seguir abordam tópicos intimamente relacionados que ampliam as técnicas demonstradas neste guia. Cada recurso inclui exemplos de código completos e funcionais com explicações passo a passo para ajudá‑lo a dominar recursos adicionais da API e explorar abordagens de implementação alternativas em seus próprios projetos. + +- [Programação do leitor DataMatrix com Aspose.BarCode para .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [Inicialização do leitor DotCode com Aspose.BarCode para .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Como ler códigos de barras DataMatrix com Aspose.BarCode para .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/russian/net/compact-pdf417-encoding/_index.md b/barcode/russian/net/compact-pdf417-encoding/_index.md index 18a43fe66..6d074ac36 100644 --- a/barcode/russian/net/compact-pdf417-encoding/_index.md +++ b/barcode/russian/net/compact-pdf417-encoding/_index.md @@ -85,6 +85,12 @@ Aspose.BarCode позволяет задать свойство `Pdf417ErrorCorr ### [Creating Compact PDF417 Barcodes](./compact-pdf417-basic-configuration/) Узнайте, как генерировать Compact PDF417 штрих‑коды с помощью Aspose.BarCode для .NET. Полное руководство с пошаговыми инструкциями и примерами кода. +### [Как создать изображение штрих‑кода PDF417 в C# с помощью Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Узнайте, как генерировать изображение штрих‑кода PDF417 в C# с использованием Aspose.BarCode. + +### [Чтение нескольких штрих‑кодов C# – Полное руководство с PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Узнайте, как считывать несколько штрих‑кодов, включая PDF417, с помощью Aspose.BarCode в C#. + ## Часто задаваемые вопросы **В: Какой максимальный объём данных можно хранить в Compact PDF417 штрих‑коде?** @@ -113,4 +119,4 @@ Aspose.BarCode позволяет задать свойство `Pdf417ErrorCorr {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/russian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/russian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..01b3d2499 --- /dev/null +++ b/barcode/russian/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,174 @@ +--- +category: general +date: 2026-07-30 +description: Как сгенерировать изображение штрихкода PDF417 в C# с помощью Aspose. + Узнайте пошагово, как создать штрихкод с Aspose, установить метаданные MacroPDF417 + и сохранить в формате PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: ru +lastmod: 2026-07-30 +og_description: Как сгенерировать изображение штрихкода PDF417 в C# с помощью Aspose. + Следуйте этому полному руководству, чтобы создать штрихкод с Aspose, настроить метаданные + MacroPDF417 и вывести PNG‑файл. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Как сгенерировать изображение штрихкода PDF417 в C# с помощью Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Как сгенерировать изображение штрихкода PDF417 в C# с помощью Aspose +url: /ru/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Как сгенерировать изображение штрихкода PDF417 в C# с помощью Aspose + +Генерация изображения штрихкода PDF417 в C# с помощью Aspose часто представляет собой препятствие для тех, кто работает с кодированием данных высокой плотности. В этом руководстве мы пройдем каждый шаг — настройку генератора, настройку метаданных MacroPDF417 и, наконец, сохранение четкого PNG‑файла. + +Если вы когда‑нибудь пытались **generate barcode image c#** и получали пустой холст или нечитаемый скан, вы не одиноки. Хорошая новость в том, что Aspose.BarCode делает весь процесс почти безболезненным, и к концу этой статьи вы сможете **create barcode with Aspose** для любого корпоративного рабочего процесса. + +## Что вы узнаете + +- Установить и добавить ссылку на библиотеку Aspose.BarCode для .NET. +- Инициализировать генератор PDF417 с пользовательским полезным нагрузкой. +- Применить специфические для MacroPDF417 поля, такие как file ID, segment ID и timestamp. +- Экспортировать результат в PNG‑изображение, которое можно встроить в отчёты или мобильные приложения. +- Советы по устранению распространённых проблем (например, неправильная ширина модуля, отсутствие сегментов). + +## Предварительные требования + +| Требование | Причина | +|-------------|--------| +| .NET 6.0 или новее | Текущая LTS‑версия, полностью поддерживаемая Aspose | +| Visual Studio 2022 (или любой IDE) | Для компиляции и запуска примера | +| Aspose.BarCode for .NET (NuGet) | Предоставляет `BarcodeGenerator` и поддержку PDF417 | + +Библиотеку можно добавить через NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Теперь, когда основа готова, давайте погрузимся в код. + +## Как сгенерировать изображение штрихкода PDF417 в C# — настройка + +Первое, что мы делаем, — создаём экземпляр `BarcodeGenerator` для типа кодирования **MacroPdf417**. Этот объект содержит все параметры конфигурации, от размера модуля до богатых метаданных, которые ожидает MacroPDF417. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Почему это важно:** `EncodeTypes.MacroPdf417` указывает Aspose создавать штрихкод PDF417, который может быть разбит на несколько сегментов — необходимая функция для больших файлов или пакетной обработки. + +## Настройка базового внешнего вида + +Читаемый штрихкод начинается с правильных визуальных настроек. `XDimension` управляет шириной каждого модуля (маленьких чёрных/белых квадратов), а `Columns` определяет количество колонок, которые охватывает штрихкод. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Подсказка:** Если штрихкод выглядит слишком плотным на принтере чеков, увеличьте `XDimension` до `3` или `4`. +- **Подводный камень:** Установка слишком малого значения `Columns` может привести к выходу штрихкода за границы изображения, делая сканирование нечитаемым. + +## Установка специфических метаданных MacroPDF417 + +MacroPDF417 позволяет внедрять информацию уровня файла непосредственно в штрихкод. Это идеально подходит для отслеживания больших поставок документов или разбивки файла на несколько сканов. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Что делает каждое поле:** + +| Свойство | Описание | +|----------|----------| +| `MacroPdf417FileID` | Уникальный идентификатор всего файла. | +| `MacroPdf417SegmentID` | Индекс текущего сегмента (начинается с 0). | +| `MacroPdf417SegmentsCount` | Общее количество сегментов, на которые разбит файл. | +| `MacroPdf417FileName` | Читаемое человеком имя, полезное для журналов аудита. | +| `MacroPdf417Checksum` | 16‑битный CRC для проверки целостности данных. | +| `MacroPdf417FileSize` | Исходный размер файла в байтах, помогает получателям выделять буферы. | +| `MacroPdf417TimeStamp` | Дата/время генерации файла. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Необязательные строки для идентификации получателя/отправителя. | +| `MacroPdf417Terminator` | Помечает последний сегмент; требуется для корректного декодирования. | + +> **Зачем это нужно?** Без этих полей сканер может прочитать только сырые данные, без контекста. Добавление метаданных позволяет принимающей системе автоматически собрать оригинальный файл. + +## Save the Barcode as PNG + +Once the generator is fully configured, persisting the image is a one‑liner: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Формат файла:** PNG — без потерь, гарантирует, что каждый модуль остаётся чётким для сканеров. +- **Альтернатива:** Используйте `BarCodeImageFormat.Jpeg`, если нужен меньший размер файла, но ожидайте небольшое снижение читаемости. + +### Ожидаемый результат + +После выполнения фрагмента кода вы найдёте `MacroPdf417Meta.png` в указанной папке. Он должен выглядеть аналогично иллюстрации ниже: + +![Штрихкод PDF417, сгенерированный с помощью Aspose](path/to/your/image.png){alt="Как сгенерировать изображение штрихкода PDF417 в C#"} + +Изображение содержит плотную сетку чёрных и белых квадратов, в которой закодирована полезная нагрузка и внедрены метаданные MacroPDF417. + +## Полный рабочий пример + +Ниже представлен полный готовый к копированию пример программы. Он компилируется в любом проекте .NET 6+ и требует только пакет NuGet Aspose.BarCode. + + + +## Что вам стоит изучить дальше? + +Следующие руководства охватывают тесно связанные темы, которые развивают техники, продемонстрированные в этом руководстве. Каждый ресурс включает полные рабочие примеры кода с пошаговыми объяснениями, чтобы помочь вам освоить дополнительные возможности API и исследовать альтернативные подходы к реализации в ваших проектах. + +- [Как создать штрихкод — Compact PDF417 с Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Как генерировать штрихкоды DataMatrix (ECC 200) с Aspose.BarCode для .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Как генерировать штрихкод Aztec с пользовательским соотношением сторон, используя Aspose.BarCode для .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/russian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/russian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..b744d2a71 --- /dev/null +++ b/barcode/russian/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Чтение нескольких штрихкодов C# с помощью Aspose.BarCode. Узнайте пошагово, + как декодировать PDF417, обнаруживать компактный режим и обрабатывать множество + штрихкодов на одном изображении. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: ru +lastmod: 2026-07-30 +og_description: Чтение нескольких штрихкодов C# с помощью Aspose.BarCode. Это руководство + показывает, как декодировать все штрихкоды на изображении, проверить компактный + режим и интегрировать в приложения .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Чтение нескольких штрихкодов C# – Полный учебник по PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Чтение нескольких штрихкодов C# – Полное руководство с PDF417 +url: /ru/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Чтение нескольких штрихкодов C# – Полное руководство с PDF417 + +Когда‑нибудь задумывались, как **read multiple barcodes C#** из одного изображения? Возможно, у вас есть партия транспортных этикеток, коллаж билетов или документ PDF417, в котором несколько кодов упакованы в одну картинку. В моей повседневной работе я столкнулся именно с такой проблемой — пока не открыл для себя `BarCodeReader` из Aspose.BarCode. В этом руководстве мы пройдемся по декодированию каждого штрихкода на изображении, определим, находится ли каждый PDF417 в компактном (усечённом) режиме, и корректно обработаем результаты. + +Мы также добавим несколько полезных советов — например, что делать, когда изображение содержит разные типы штрихкодов, или когда сканирование не возвращает результатов. К концу вы получите готовое к запуску консольное приложение, которое **reads multiple barcodes C#** как профессионал. + +## Что понадобится + +Прежде чем погрузиться в детали, убедитесь, что на вашем компьютере установлено следующее: + +- **.NET 6.0** SDK или новее (код также работает с .NET Framework 4.6+, но .NET 6 — оптимальный вариант). +- NuGet‑пакет **Aspose.BarCode for .NET** (`Install-Package Aspose.BarCode`). +- Пример изображения, содержащего **PDF417** штрихкоды — желательно, чтобы в нём были как компактные, так и полноразмерные символы. В руководстве используется `CompactPdf417.png`, но подойдёт любой PNG/JPEG. +- Любая удобная IDE (Visual Studio, Rider или VS Code). + +И всё — никаких дополнительных DLL, никаких нативных зависимостей. Aspose.BarCode написан полностью на управляемом коде, поэтому его можно подключить к любому .NET‑проекту. + +![Вывод консоли чтения нескольких штрихкодов C#](image.png "Вывод консоли чтения нескольких штрихкодов C#") + +*Текст альтернативного описания изображения: Чтение нескольких штрихкодов C# — скриншот консоли, показывающий статус компактного режима для штрихкодов PDF417.* + +## Шаг 1 – Установка и подключение библиотеки BarCodeReader C# + +Первым делом вам нужна **BarCodeReader C#**‑класс, который осуществляет декодирование. Откройте терминал (или консоль диспетчера пакетов) и выполните: + +```powershell +dotnet add package Aspose.BarCode +``` + +Или, если вы используете менеджер NuGet в Visual Studio, просто найдите *Aspose.BarCode* и нажмите **Install**. Будет загружена последняя стабильная версия (на июль 2026 года — 23.9), поддерживающая PDF417, QR, DataMatrix и десятки других символогий. + +Почему это важно: библиотека берёт на себя тяжёлую работу по обработке изображений, коррекции ошибок и распознаванию символов. Вы могли бы написать собственный сканер, но это заняло бы недели на отладку краевых случаев. Aspose предоставляет проверенную **C# barcode library**, уже адаптированную под современные .NET‑рантаймы. + +## Шаг 2 – Создание минимального консольного проекта + +Создайте новое консольное приложение, чтобы сосредоточиться только на логике работы со штрихкодами без лишних UI‑шумов: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Замените сгенерированный `Program.cs` полным примером ниже. Можно оставить пространство имён по умолчанию или переименовать — ничего особенного не требуется. + +## Шаг 3 – Реализация полной функции “Read Multiple Barcodes C#” + +Ниже представлен **полный, готовый к запуску** образец кода. Он охватывает все четыре шага из оригинального фрагмента, добавляет обработку ошибок и выводит полезную диагностику. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Почему этот код работает + +- **`BarCodeReader`** — основной класс из **BarCodeReader C#** API. Он открывает изображение, применяет предобработку и ищет символы указанного типа. +- **`ReadBarCodes()`** возвращает массив, а не один результат. Именно это позволяет **reading multiple barcodes C#** — метод автоматически собирает все найденные совпадения. +- **`result.Extended.Pdf417.IsTruncated`** сообщает, находится ли PDF417 в *compact* (также известном как truncated) режиме. Этот флаг существует только для PDF417, поэтому мы используем оператор условного доступа (`?.`), чтобы избежать исключений, если в изображении появятся другие символогии. +- Цикл `foreach` выводит как декодированный текст, так и статус компактности, предоставляя быстрый контроль качества. + +## Шаг 4 – Обработка разных типов штрихкодов (опционально) + +Если ваше изображение может содержать не только PDF417, просто замените второй аргумент `BarCodeReader` на `DecodeType.AllSupported`. Цикл останется тем же, но потребуется проверять, что `result.Extended` не равен `null` для символов, отличных от PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Это небольшое изменение превращает вашу **C# barcode library** в универсальный сканер, идеальный для пакетов со смешанными символогиями. + +## Шаг 5 – Крайние случаи и рекомендации по лучшим практикам + +### 1️⃣ Не обнаружено штрихкодов +Если `ReadBarCodes()` возвращает пустой массив, чаще всего виноваты: + +- Неправильный путь к файлу или отсутствие прав на чтение. +- Слишком низкое качество изображения (размытие, низкий контраст). Рассмотрите предобработку через `reader.ImagePreprocessingOptions` (например, `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Очень большие изображения +Обработка фотографии в 10 МП может потребовать много памяти. Можно ограничить область сканирования: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Потокобезопасность +`BarCodeReader` реализует `IDisposable` и **не** является потокобезопасным. Создавайте отдельные экземпляры для каждого потока, если требуется параллельная обработка. + +### 4️⃣ Лицензирование +Aspose.BarCode работает в режиме триала «из коробки», но на выходном изображении будет водяной знак. Для продакшна установите лицензию как можно раньше: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Логирование +При интеграции в более крупный сервис замените `Console.WriteLine` на структурированный логгер (Serilog, NLog). Так вы сможете фиксировать `CodeText`, `CodeType` и `IsTruncated` как отдельные поля для последующего анализа. + +## Полный рабочий пример + +Объединив всё вместе, получаем *полный* код программы, который можно скопировать в `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Что изучать дальше? + + +Следующие руководства охватывают тесно связанные темы, расширяющие техники, продемонстрированные в этом гайде. Каждый ресурс содержит полностью рабочие примеры кода с пошаговыми объяснениями, чтобы помочь вам освоить дополнительные возможности API и исследовать альтернативные подходы в собственных проектах. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/russian/net/one-dimensional-barcode-types/_index.md b/barcode/russian/net/one-dimensional-barcode-types/_index.md index 8a11b64f3..15f86b2f5 100644 --- a/barcode/russian/net/one-dimensional-barcode-types/_index.md +++ b/barcode/russian/net/one-dimensional-barcode-types/_index.md @@ -78,15 +78,17 @@ url: /ru/net/one-dimensional-barcode-types/ Узнайте, как обрабатывать исключения при создании одномерных штрих-кодов с помощью Aspose.BarCode для .NET. Это пошаговое руководство обеспечивает устойчивые к ошибкам решения в области штрих-кодов. Начать сейчас! ### [Одномерная конфигурация с широким и узким соотношением](./one-dimensional-wide-narrow-ratio-configuration/) Легко создавайте индивидуальные штрих-коды с помощью Aspose.BarCode для .NET. Пошаговое руководство по одномерной конфигурации с широким и узким соотношением сторон. +### [Чтение штрих‑кода с изображения – пример считывателя штрих‑кода на C#](./read-barcode-from-image-c-barcode-reader-example/) +Узнайте, как считывать штрих‑коды из изображений с помощью Aspose.BarCode в C#. ## Заключение -В этой серии руководств мы углубились в мир одномерных типов штрих-кодов, сосредоточив внимание на их конфигурации и настройке. С Aspose.BarCode для .NET этот процесс упрощается, и вы можете создавать штрих-коды, соответствующие вашим потребностям. Итак, независимо от того, являетесь ли вы опытным разработчиком или только начинаете, эти руководства дадут вам возможность использовать возможности одномерных штрих-кодов в ваших проектах .NET. Начните прямо сейчас и раскройте потенциал технологии штрих-кодов! +В этой серии руководств мы углубились в мир одномерных типов штрих-кодов, сосредоточив внимание на их конфигурации и настройке. С Aspose.BarCode для .NET этот процесс упрощается, и вы можете создавать штрих‑коды, соответствующие вашим потребностям. Итак, независимо от того, являетесь ли вы опытным разработчиком или только начинаете, эти руководства дадут вам возможность использовать возможности одномерных штрих‑кодов в ваших проектах .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/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/russian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/russian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..1070e0415 --- /dev/null +++ b/barcode/russian/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,282 @@ +--- +category: general +date: 2026-07-30 +description: Считывание штрихкода с изображения с помощью Aspose.BarCode для .NET – + полный пример считывателя штрихкодов на C#, показывающий, как декодировать штрихкоды + Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: ru +lastmod: 2026-07-30 +og_description: Считайте штрих‑код с изображения с помощью Aspose.BarCode для .NET. + Этот пошаговый пример считывателя штрих‑кодов на C# показывает, как извлечь все + метаданные Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Считывание штрихкода с изображения – полный пример считывателя штрихкода + на C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Считывание штрихкода с изображения – пример считывателя штрихкода на C# +url: /ru/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Считывание штрихкода с изображения – пример считывателя штрихкода на C# + +Нужно **считать штрихкод с изображения** в приложении на C#? Вы попали по адресу. В этом руководстве мы пройдем полный *пример считывателя штрихкода на C#*, использующий библиотеку Aspose.BarCode for .NET для декодирования штрихкода Macro PDF417 и извлечения всей расширенной информации, предоставляемой стандартом. + +Представьте, что вы только что отсканировали транспортную этикетку, посадочный талон или государственное удостоверение, в котором встроен сегмент Macro PDF417. Вы хотите получить идентификатор файла, количество сегментов, метки времени и, возможно, даже имя отправителя — и всё это без выхода из кода. Именно этого мы добьёмся, и сделаем это так, чтобы было легко скопировать‑вставить в ваш собственный проект. + +--- + +## Чему вы научитесь + +- Как добавить пакет Aspose.BarCode NuGet в проект .NET. +- Как открыть файл изображения, содержащий штрихкод Macro PDF417. +- Как перебрать результаты **считать штрихкод с изображения** и получить доступ ко всем расширенным полям. +- Советы по работе с несколькими сегментами, проверке контрольных сумм и устранению распространённых проблем. + +К концу этого руководства у вас будет работающее консольное приложение, которое выводит все метаданные Macro PDF417, готовое к интеграции в более крупные системы, такие как трекеры инвентаря или конвейеры управления документами. + +--- + +## Требования + +Перед тем как приступить, убедитесь, что у вас есть следующее: + +| Требование | Почему это важно | +|------------|-------------------| +| .NET 6.0 SDK или новее (подойдёт любая recent версия) | Обеспечивает среду выполнения для консольного приложения. | +| Visual Studio 2022 (или VS Code с расширением C#) | Делает редактирование и отладку безболезненной. | +| Aspose.BarCode for .NET (бесплатная пробная версия или лицензия) | Библиотека, которая действительно декодирует штрихкод. | +| Файл изображения (`MacroPdf417Meta.png`), содержащий штрихкод Macro PDF417 | Источник, из которого мы будем считывать. | + +Если у вас ещё нет Aspose.BarCode, вы можете получить его из NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Эта единственная строка устанавливает всё, что вам нужно, включая `BarCodeReader`, `DecodeType` и богатый набор свойств `Extended`, который мы изучим. + +--- + +## Шаг 1 – Настройте проект и импортируйте библиотеку + +Создайте новый консольный проект (или вставьте код в существующий). Директивы `using` обязательны; они делают классы штрихкода доступными в области видимости. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Если вы используете Visual Studio, IDE предложит автоматически добавить недостающие инструкции `using` — просто нажмите *Ctrl+.`*. + +--- + +## Шаг 2 – Подготовьте путь к изображению + +Жёстко заданный абсолютный путь подходит для быстрой демонстрации, но в продакшене вы, вероятно, будете принимать аргумент командной строки или параметр конфигурации. Для ясности оставим всё просто: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Why this matters:** `BarCodeReader` ожидает корректный путь к файлу; неверный путь вызывает `FileNotFoundException` ещё до начала декодирования. + +--- + +## Шаг 3 – **Считать штрихкод с изображения** и извлечь детали Macro PDF417 + +Теперь начинается сердце **пример считывателя штрихкода на C#**. Мы создадим экземпляр `BarCodeReader` с флагом `DecodeType.MacroPdf417`, пройдемся по всем результатам (в одном изображении может быть более одного штрихкода) и выведем каждое расширенное свойство. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Что делает код (почему, а не только как) + +1. **`using` блок** — Гарантирует, что нативные ресурсы (дескрипторы файлов, память декодера) освобождаются сразу после операции. Пропуск этого может привести к блокировке файлов в Windows. +2. **`DecodeType.MacroPdf417`** — Инструктирует Aspose искать именно символы Macro PDF417; остальные типы штрихкодов игнорируются, что ускоряет сканирование. +3. **`ReadBarCodes()`** — Возвращает коллекцию, потому что изображение может содержать несколько сегментов Macro PDF417 (например, многостраничный документ, разбитый на несколько штрихкодов). +4. **`macroResult.Extended?.Pdf417`** — Объект `Extended` может быть `null`; оператор безопасной навигации (`?.`) предотвращает `NullReferenceException`, если у штрихкода нет расширенных данных. +5. **Вывод каждого поля** — Позволяет увидеть идентификатор файла, порядок сегментов, проверку контрольной суммы и необязательные текстовые поля, такие как отправитель или получатель. + +--- + +## Шаг 4 – Запустите приложение и проверьте вывод + +Скомпилируйте и выполните программу: + +```bash +dotnet run +``` + +Если всё настроено правильно, в консоли вы увидите нечто похожее на следующее: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Note:** Точные значения зависят от штрихкода, который вы декодируете. Если вы получаете сообщение «No Macro PDF417 extension data found», дважды проверьте, что изображение действительно содержит код Macro PDF417 и что вы используете правильный `DecodeType`. + +--- + +## Обработка нескольких сегментов и проверка (продвинутый уровень) + +Macro PDF417 предназначен для больших объёмов данных, разбитых на несколько символов. Когда вы сталкиваетесь с более чем одним сегментом, обычно требуется: + +1. **Собрать все сегменты** в словарь, ключом которого будет `SegmentID`. +2. **Отсортировать** их по `SegmentID`, чтобы восстановить оригинальный файл. +3. **Проверить** `Checksum` относительно объединённого полезного нагрузки (Aspose делает это внутри, но вы можете выполнить CRC повторно, если нужна дополнительная безопасность). + +Вот быстрый набросок: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Вам понадобится реализовать `AssembleSegments` и `VerifyChecksum` в соответствии с форматом вашей полезной нагрузки — обычно это просто конкатенация массивов байтов с последующей проверкой CRC‑16. + +--- + +## Распространённые подводные камни и как их избежать + +| Симптом | Вероятная причина | Решение | +|---------|-------------------|---------| +| `null` возвращён из `macroResult.Extended` | Изображение содержит обычный PDF417, а не Macro‑версию. | Используйте `DecodeType.Pdf417` вместо этого, либо проверьте исходный штрихкод. | +| Нет вывода вообще | Неправильный `imagePath` или файл недоступен. | Проверьте путь к файлу; убедитесь, что приложение имеет права чтения. | +| Исключение «Object disposed» | Попытка использовать `reader` после блока `using`. | Держите всю обработку внутри блока `using`. | + +--- + +## Что изучать дальше? + +Следующие руководства охватывают тесно связанные темы, которые развивают техники, продемонстрированные в этом руководстве. Каждый ресурс включает полностью работающие примеры кода с пошаговыми объяснениями, чтобы помочь вам освоить дополнительные возможности API и исследовать альтернативные подходы в ваших проектах. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/spanish/net/compact-pdf417-encoding/_index.md b/barcode/spanish/net/compact-pdf417-encoding/_index.md index 6c5e3bd09..c3a4d04d0 100644 --- a/barcode/spanish/net/compact-pdf417-encoding/_index.md +++ b/barcode/spanish/net/compact-pdf417-encoding/_index.md @@ -85,6 +85,10 @@ Más allá de lo básico, aquí tienes algunos consejos prácticos para optimiza ## Tutoriales de codificación Compact PDF417 ### [Crear códigos de barras Compact PDF417](./compact-pdf417-basic-configuration/) Aprende a generar códigos de barras Compact PDF417 usando Aspose.BarCode para .NET. Guía completa con instrucciones paso a paso y ejemplos de código. +### [Cómo generar una imagen de código de barras PDF417 en C# con Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Aprende a crear una imagen de código de barras PDF417 en C# usando Aspose.BarCode. +### [Leer varios códigos de barras C# – Guía completa con PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Aprende a leer múltiples códigos de barras, incluido PDF417, usando C# y Aspose.BarCode. ## Preguntas frecuentes @@ -114,4 +118,4 @@ R: No se requieren fuentes externas; la biblioteca maneja todo el renderizado in {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/spanish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/spanish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..72145969c --- /dev/null +++ b/barcode/spanish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Cómo generar una imagen de código de barras PDF417 en C# con Aspose. + Aprende paso a paso cómo crear el código de barras con Aspose, establecer los metadatos + MacroPDF417 y guardarlo como PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: es +lastmod: 2026-07-30 +og_description: Cómo generar una imagen de código de barras PDF417 en C# con Aspose. + Sigue esta guía completa para crear un código de barras con Aspose, configurar los + metadatos MacroPDF417 y generar un archivo PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Cómo generar una imagen de código de barras PDF417 en C# con Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Cómo generar una imagen de código de barras PDF417 en C# con Aspose +url: /es/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cómo generar una imagen de código de barras PDF417 en C# con Aspose + +Cómo generar una imagen de código de barras PDF417 en C# con Aspose es un obstáculo frecuente para cualquiera que trabaje con codificación de datos de alta densidad. En esta guía recorreremos cada paso: configurar el generador, ajustar los metadatos MacroPDF417 y, finalmente, guardar un archivo PNG nítido. + +Si alguna vez has intentado **generar imagen de código de barras c#** y terminaste con un lienzo en blanco o una lectura ilegible, no estás solo. La buena noticia es que Aspose.BarCode hace que todo el proceso sea casi indoloro, y al final de este artículo podrás **crear código de barras con Aspose** para cualquier flujo de trabajo empresarial. + +## Qué aprenderás + +- Instalar y referenciar la biblioteca Aspose.BarCode para .NET. +- Inicializar un generador PDF417 con una carga útil personalizada. +- Aplicar campos específicos de MacroPDF417 como ID de archivo, ID de segmento y marca de tiempo. +- Exportar el resultado a una imagen PNG que puedas incrustar en informes o aplicaciones móviles. +- Consejos para solucionar problemas comunes (p. ej., ancho de módulo incorrecto, segmentos faltantes). + +No se requiere experiencia previa con MacroPDF417; basta con un entendimiento básico de C# y Visual Studio. + +## Requisitos previos + +| Requisito | Razón | +|-----------|-------| +| .NET 6.0 o posterior | Versión LTS actual, totalmente compatible con Aspose | +| Visual Studio 2022 (o cualquier IDE) | Para compilar y ejecutar el ejemplo | +| Aspose.BarCode para .NET (NuGet) | Proporciona `BarcodeGenerator` y soporte para PDF417 | + +Puedes añadir la biblioteca vía NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Ahora que la base está preparada, vamos a sumergirnos en el código. + +## Cómo generar una imagen de código de barras PDF417 en C# – Configuración + +Lo primero que hacemos es crear una instancia de `BarcodeGenerator` para el tipo de codificación **MacroPdf417**. Este objeto contiene todas las opciones de configuración, desde el tamaño del módulo hasta los metadatos ricos que MacroPDF417 espera. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Por qué es importante:** `EncodeTypes.MacroPdf417` indica a Aspose que produzca un código de barras PDF417 que pueda dividirse en varios segmentos, algo indispensable para archivos grandes o procesamiento por lotes. + +## Configurar la apariencia básica + +Un código de barras legible comienza con los ajustes visuales correctos. `XDimension` controla el ancho de cada módulo (los diminutos cuadrados negro/blanco), mientras que `Columns` determina cuántas columnas abarca el código de barras. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Consejo:** Si el código de barras se ve demasiado denso en una impresora de recibos, aumenta `XDimension` a `3` o `4`. +- **Trampa:** Establecer `Columns` demasiado bajo puede hacer que el código de barras se desborde de los límites de la imagen, resultando en una lectura ilegible. + +## Establecer metadatos específicos de MacroPDF417 + +MacroPDF417 permite incrustar información a nivel de archivo directamente en el código de barras. Esto es perfecto para rastrear envíos de documentos grandes o dividir un archivo en varias lecturas. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Qué hace cada campo:** + +| Propiedad | Descripción | +|-----------|-------------| +| `MacroPdf417FileID` | Identificador único para todo el archivo. | +| `MacroPdf417SegmentID` | Índice del segmento actual (comienza en 0). | +| `MacroPdf417SegmentsCount` | Número total de segmentos en que se divide el archivo. | +| `MacroPdf417FileName` | Nombre legible por humanos, útil para registros de auditoría. | +| `MacroPdf417Checksum` | CRC de 16 bits para verificar la integridad de los datos. | +| `MacroPdf417FileSize` | Tamaño original del archivo en bytes, ayuda a los receptores a asignar buffers. | +| `MacroPdf417TimeStamp` | Fecha/hora en que se generó el archivo. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Cadenas opcionales para identificar al destinatario/remitente. | +| `MacroPdf417Terminator` | Marca el último segmento; necesario para una decodificación correcta. | + +> **¿Por qué molestarse?** Sin estos campos, un escáner solo puede leer los datos crudos, no el contexto. Añadir metadatos permite que el sistema receptor vuelva a ensamblar el archivo original automáticamente. + +## Guardar el código de barras como PNG + +Una vez que el generador está completamente configurado, persistir la imagen es una sola línea: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Formato de archivo:** PNG es sin pérdida, garantizando que cada módulo permanezca nítido para los escáneres. +- **Alternativa:** Usa `BarCodeImageFormat.Jpeg` si necesitas un archivo de menor tamaño, pero espera una ligera pérdida en la legibilidad. + +### Resultado esperado + +Después de ejecutar el fragmento, encontrarás `MacroPdf417Meta.png` en la carpeta especificada. Debería verse similar a la ilustración a continuación: + +![Código de barras PDF417 generado con Aspose](path/to/your/image.png){alt="Cómo generar una imagen de código de barras PDF417 en C#"} + +La imagen contiene una cuadrícula densa de cuadrados negros y blancos, con la carga útil codificada y los metadatos MacroPDF417 incrustados. + +## Ejemplo completo y funcional + +A continuación tienes el programa completo, listo para copiar y pegar. Compila con cualquier proyecto .NET 6+ y solo requiere el paquete NuGet Aspose.BarCode. + + + +## ¿Qué deberías aprender a continuación? + +Los siguientes tutoriales cubren temas estrechamente relacionados que amplían las técnicas demostradas en esta guía. Cada recurso incluye ejemplos de código completos con explicaciones paso a paso para ayudarte a dominar funciones adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [Cómo crear código de barras – PDF417 compacto con Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Cómo generar códigos de barras DataMatrix (ECC 200) con Aspose.BarCode para .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Cómo generar código de barras Aztec con relación de aspecto personalizada usando Aspose.BarCode para .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/spanish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/spanish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..efad2f3bf --- /dev/null +++ b/barcode/spanish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Leer varios códigos de barras en C# usando Aspose.BarCode. Aprende paso + a paso cómo decodificar PDF417, detectar el modo compacto y manejar muchos códigos + de barras en una sola imagen. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: es +lastmod: 2026-07-30 +og_description: Lee varios códigos de barras en C# con Aspose.BarCode. Esta guía te + muestra cómo decodificar todos los códigos de barras en una imagen, comprobar el + modo compacto e integrarlo en aplicaciones .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Leer varios códigos de barras C# – Tutorial completo de PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Leer múltiples códigos de barras C# – Guía completa con PDF417 +url: /es/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Leer varios códigos de barras C# – Guía completa con PDF417 + +¿Alguna vez te has preguntado cómo **read multiple barcodes C#** a partir de una sola imagen? Tal vez tengas un lote de etiquetas de envío, un collage de tickets o un documento PDF417 que agrupa varios códigos en una sola foto. En mi trabajo diario, me topé exactamente con ese obstáculo—hasta que descubrí `BarCodeReader` de Aspose.BarCode. Este tutorial te guiará paso a paso para decodificar cada código de barras en una imagen, determinar si cada PDF417 está en modo compacto (truncado) y manejar los resultados de forma limpia. + +También incluiremos algunos consejos extra—como qué hacer cuando la imagen contiene diferentes simbologías de códigos de barras, o cuando un escaneo no devuelve resultados. Al final tendrás una aplicación de consola lista para ejecutarse que **reads multiple barcodes C#** como un profesional. + +## Lo que necesitarás + +Antes de sumergirnos, asegúrate de tener lo siguiente en tu máquina: + +- **.NET 6.0** SDK o superior (el código también funciona con .NET Framework 4.6+ , pero .NET 6 es el punto óptimo). +- **Aspose.BarCode for .NET** paquete NuGet (`Install-Package Aspose.BarCode`). +- Una imagen de muestra que contenga códigos de barras **PDF417**—preferiblemente una que mezcle símbolos compactos y de tamaño completo. El tutorial usa `CompactPdf417.png`, pero cualquier PNG/JPEG servirá. +- Tu IDE favorito (Visual Studio, Rider o VS Code). + +Eso es todo—sin DLLs extra, sin dependencias nativas. Aspose.BarCode es código totalmente administrado, por lo que puedes incorporarlo a cualquier proyecto .NET. + +![Salida de consola de leer varios códigos de barras C#](image.png "Salida de consola de leer varios códigos de barras C#") + +*Texto alternativo de la imagen: Leer varios códigos de barras C# – captura de pantalla de la consola mostrando el estado del modo compacto para códigos PDF417.* + +## Paso 1 – Instalar y Referenciar la Biblioteca BarCodeReader C# Library + +Primero lo primero, necesitas la clase **BarCodeReader C#** que impulsa la decodificación. Abre tu terminal (o la Consola del Administrador de paquetes) y ejecuta: + +```powershell +dotnet add package Aspose.BarCode +``` + +O, si estás dentro del administrador NuGet de Visual Studio, simplemente busca *Aspose.BarCode* y pulsa **Install**. Esto descarga la última versión estable (a julio 2026 es la 23.9), que soporta PDF417, QR, DataMatrix y docenas de otras simbologías. + +¿Por qué es importante? La biblioteca abstrae todo el trabajo pesado de procesamiento de imágenes, corrección de errores y reconocimiento de símbolos. Podrías escribir tu propio escáner, pero pasarías semanas persiguiendo casos límite. Aspose te brinda una **C# barcode library** probada en batalla, actualizada para los runtimes modernos de .NET. + +## Paso 2 – Configurar un Proyecto de Consola Mínimo + +Crea una nueva aplicación de consola para que podamos centrarnos en la lógica del código de barras sin distracciones de UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Reemplaza el `Program.cs` generado con el ejemplo completo a continuación. Siéntete libre de mantener el espacio de nombres predeterminado o renombrarlo—no se requiere nada especial. + +## Paso 3 – Escribir la Implementación Completa “Read Multiple Barcodes C#” + +A continuación tienes un código **completo, ejecutable**. Cubre los cuatro pasos del fragmento original, añade manejo de errores y muestra diagnósticos útiles. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Por qué este código funciona + +- **`BarCodeReader`** es la pieza clave de la API **BarCodeReader C#**. Abre la imagen, aplica pre‑procesamiento y busca símbolos del tipo que especificas. +- **`ReadBarCodes()`** devuelve un arreglo, no solo un único resultado. Esa es la clave para **reading multiple barcodes C#**—el método recoge automáticamente cada coincidencia que encuentra. +- **`result.Extended.Pdf417.IsTruncated`** nos indica si el PDF417 está en modo *compacto* (también llamado truncado). Esta bandera solo existe para PDF417, por lo que usamos el operador condicional nulo (`?.`) para evitar excepciones si se infiltra otra simbología. +- El bucle `foreach` imprime tanto el texto decodificado como el estado compacto, dándote una rápida verificación de sanidad. + +## Paso 4 – Manejo de Diferentes Tipos de Código de Barras (Opcional) + +Si tu imagen pudiera contener más que PDF417, simplemente cambia el segundo argumento de `BarCodeReader` a `DecodeType.AllSupported`. El bucle permanece igual, pero deberás protegerte contra que `result.Extended` sea nulo para símbolos que no sean PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Este pequeño ajuste convierte tu **C# barcode library** en un escáner universal, perfecto para lotes con simbologías mixtas. + +## Paso 5 – Casos Límite y Consejos de Mejores Prácticas + +### 1️⃣ No se detectaron códigos de barras +Si `ReadBarCodes()` devuelve un arreglo vacío, los culpables más comunes son: + +- Ruta de archivo incorrecta o permisos de lectura faltantes. +- Calidad de imagen demasiado baja (desenfoque, bajo contraste). Considera pre‑procesar con `reader.ImagePreprocessingOptions` (p. ej., `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Imágenes extremadamente grandes +Procesar una foto de 10 MP puede consumir mucha memoria. Puedes limitar el área de escaneo: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Seguridad en subprocesos +`BarCodeReader` implementa `IDisposable` y **not** es seguro para subprocesos. Crea instancias separadas por subproceso si necesitas procesamiento paralelo. + +### 4️⃣ Licenciamiento +Aspose.BarCode funciona en modo de prueba desde el inicio, pero verás una marca de agua en la imagen de salida. Para producción, establece la licencia temprano: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Registro (Logging) +Cuando integres esto en un servicio más grande, reemplaza `Console.WriteLine` por un logger estructurado (Serilog, NLog). Así podrás capturar `CodeText`, `CodeType` e `IsTruncated` como campos para análisis posteriores. + +## Recapitulación del Ejemplo Completo + +Juntándolo todo, aquí tienes el *programa completo* que puedes copiar‑pegar en `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## ¿Qué deberías aprender a continuación? + +Los siguientes tutoriales cubren temas estrechamente relacionados que amplían las técnicas demostradas en esta guía. Cada recurso incluye ejemplos de código completos y funcionales con explicaciones paso a paso para ayudarte a dominar características adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [Cómo generar códigos de barras PDF417 – Codificación PDF417 compacta](/barcode/english/net/compact-pdf417-encoding/) +- [Cómo crear códigos de barras – PDF417 compacto con Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Cómo leer códigos de barras DataMatrix con Aspose.BarCode para .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/spanish/net/one-dimensional-barcode-types/_index.md b/barcode/spanish/net/one-dimensional-barcode-types/_index.md index ca6d74659..a7d231d18 100644 --- a/barcode/spanish/net/one-dimensional-barcode-types/_index.md +++ b/barcode/spanish/net/one-dimensional-barcode-types/_index.md @@ -56,29 +56,43 @@ Exploraremos la configuración de relación amplia-estrecha para códigos de bar ## Tutoriales sobre tipos de códigos de barras unidimensionales ### [Configuración del código unidimensional 128](./one-dimensional-code-128-configuration/) Aprenda a generar códigos de barras Code 128 unidimensionales en .NET usando Aspose.BarCode. Siga nuestra guía paso a paso para una integración perfecta de códigos de barras. + ### [Configuración del código unidimensional 39](./one-dimensional-code-39-configuration/) Aprenda a generar códigos de barras Code 39 unidimensionales en .NET con Aspose.BarCode. Guía paso a paso para desarrolladores. + ### [Configuración del código unidimensional 93](./one-dimensional-code-93-configuration/) Aprenda a crear códigos de barras Code 93 con Aspose.BarCode para .NET. Guía paso a paso para la generación de códigos de barras. + ### [Ajuste de altura de código de barras unidimensional](./one-dimensional-barcode-height-adjustment/) Aprenda a ajustar la altura de los códigos de barras unidimensionales en .NET con Aspose.BarCode para una personalización precisa. ¡Crea códigos de barras perfectos sin esfuerzo! + ### [Configuración de componentes 2D de barra de datos unidimensional](./one-dimensional-databar-2d-component-configuration/) Genere códigos de barras 2D de barra de datos unidimensionales con Aspose.BarCode para .NET. Siga nuestra guía paso a paso para su configuración y personalización. ¡Empiece a crear códigos de barras únicos hoy! + ### [Personalización de la relación de aspecto de la barra de datos unidimensional](./one-dimensional-databar-aspect-ratio-customization/) Aprenda a personalizar las proporciones de aspecto de la barra de datos unidimensional en .NET usando Aspose.BarCode. Mejore la precisión y el diseño de los códigos de barras. + ### [Ajuste de altura del código de barras de la barra de datos unidimensional](./one-dimensional-databar-barcode-height-adjustment/) Aprenda a ajustar la altura del código de barras de la barra de datos unidimensional con Aspose.BarCode para .NET. Cree códigos de barras personalizados en unos sencillos pasos. Explore el poder de la personalización de códigos de barras. + ### [Codificación GS1 de barra de datos unidimensional](./one-dimensional-databar-gs1-encoding/) Aprenda a crear códigos de barras codificados Databar GS1 en .NET usando Aspose.BarCode. Genere códigos de barras con facilidad. Sigue nuestra guía paso a paso. + ### [Configuración de filas y columnas de la barra de datos unidimensional](./one-dimensional-databar-row-column-configuration/) Genere códigos de barras DataBar unidimensionales dinámicos con configuración de filas y columnas en .NET usando Aspose.BarCode para .NET. ¡La personalización es fácil! + ### [Configuración de barras rellenas unidimensionales](./one-dimensional-filled-bars-configuration/) Aprenda cómo generar códigos de barras en .NET con Aspose.BarCode para .NET. Este completo tutorial cubre todo, desde la importación de espacios de nombres hasta la creación de códigos de barras unidimensionales. + ### [Manejo de excepciones de códigos de barras unidimensionales](./one-dimensional-barcode-exception-handling/) Aprenda a manejar excepciones mientras genera códigos de barras unidimensionales utilizando Aspose.BarCode para .NET. Esta guía paso a paso garantiza soluciones de códigos de barras tolerantes a errores. ¡Empieza ahora! + ### [Configuración unidimensional de relación ancha-estrecha](./one-dimensional-wide-narrow-ratio-configuration/) Genere códigos de barras personalizados fácilmente con Aspose.BarCode para .NET. Guía paso a paso para la configuración unidimensional de relación ancha-estrecha. +### [Leer código de barras desde una imagen – ejemplo de lector de códigos de barras en C#](./read-barcode-from-image-c-barcode-reader-example/) +Aprenda a leer códigos de barras desde imágenes en C# usando Aspose.BarCode. Guía paso a paso. + ## Conclusión En esta serie de tutoriales, hemos profundizado en el mundo de los tipos de códigos de barras unidimensionales, centrándonos en su configuración y personalización. Con Aspose.BarCode para .NET, el proceso se simplifica, lo que garantiza que pueda crear códigos de barras adaptados a sus necesidades. Entonces, ya sea que sea un desarrollador experimentado o recién esté comenzando, estos tutoriales le permitirán aprovechar el poder de los códigos de barras unidimensionales en sus proyectos .NET. ¡Empiece ahora y libere el potencial de la tecnología de códigos de barras! @@ -89,4 +103,4 @@ Con este artículo, no sólo obtendrá conocimientos sobre varios tipos de códi {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/spanish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/spanish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..30d6a9354 --- /dev/null +++ b/barcode/spanish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,283 @@ +--- +category: general +date: 2026-07-30 +description: Leer código de barras de una imagen usando Aspose.BarCode para .NET – + un ejemplo completo de lector de códigos de barras en C# que muestra cómo decodificar + códigos de barras Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: es +lastmod: 2026-07-30 +og_description: Lea el código de barras de una imagen con Aspose.BarCode para .NET. + Este ejemplo paso a paso de lector de códigos de barras en C# muestra cómo extraer + todos los metadatos de Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Leer código de barras de una imagen – Ejemplo completo de lector de códigos + de barras en C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Leer código de barras de una imagen – ejemplo de lector de códigos de barras + en C# +url: /es/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Leer código de barras de una imagen – ejemplo de lector de códigos de barras en C# + +¿Necesitas **leer código de barras de una imagen** en una aplicación C#? Estás en el lugar correcto. En este tutorial recorreremos un *ejemplo de lector de códigos de barras en C#* completo que utiliza la biblioteca Aspose.BarCode para .NET para decodificar un código Macro PDF417 y extraer toda la información extendida que el estándar proporciona. + +Imagina que acabas de escanear una etiqueta de envío, una tarjeta de embarque o una identificación gubernamental que incorpora un segmento Macro PDF417. Quieres obtener el ID del archivo, el recuento de segmentos, marcas de tiempo y quizá incluso el nombre del remitente, todo sin salir de tu código. Eso es exactamente lo que lograremos, y lo haremos de una forma que puedes copiar‑pegar fácilmente en tu propio proyecto. + +--- + +## Lo que aprenderás + +- Cómo añadir el paquete NuGet Aspose.BarCode a un proyecto .NET. +- Cómo abrir un archivo de imagen que contiene un código de barras Macro PDF417. +- Cómo iterar sobre los resultados de **read barcode from image** y acceder a cada campo extendido. +- Consejos para manejar múltiples segmentos, validar sumas de verificación y solucionar problemas comunes. + +Al final de esta guía tendrás una aplicación de consola funcional que imprime todos los metadatos Macro PDF417, lista para integrarse en sistemas más grandes como rastreadores de inventario o canalizaciones de gestión documental. + +--- + +## Requisitos previos + +Antes de sumergirnos, asegúrate de contar con lo siguiente: + +| Requisito | Por qué es importante | +|-----------|-----------------------| +| .NET 6.0 SDK o posterior (cualquier versión reciente sirve) | Proporciona el runtime para la aplicación de consola. | +| Visual Studio 2022 (o VS Code con la extensión C#) | Facilita la edición y depuración sin complicaciones. | +| Aspose.BarCode para .NET (prueba gratuita o licencia) | La biblioteca que realmente decodifica el código de barras. | +| Un archivo de imagen (`MacroPdf417Meta.png`) que contenga un código de barras Macro PDF417 | La fuente que leeremos. | + +Si aún no tienes Aspose.BarCode, puedes obtenerlo desde NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Esa única línea instala todo lo que necesitas, incluido `BarCodeReader`, `DecodeType` y el rico conjunto de propiedades `Extended` que exploraremos. + +--- + +## Paso 1 – Configura el proyecto e importa la biblioteca + +Crea un nuevo proyecto de consola (o inserta el código en uno existente). Las directivas `using` son esenciales; traen las clases de códigos de barras al alcance. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Consejo profesional:** Si usas Visual Studio, el IDE ofrecerá añadir automáticamente las declaraciones `using` que faltan—solo presiona *Ctrl+.`*. + +--- + +## Paso 2 – Prepara la ruta de la imagen + +Codificar una ruta absoluta funciona para una demostración rápida, pero en producción probablemente aceptarías un argumento de línea de comandos o una configuración. Para mayor claridad lo mantendremos simple: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Por qué es importante:** `BarCodeReader` espera una ubicación de archivo válida; una ruta incorrecta lanza una `FileNotFoundException` antes de que comience cualquier decodificación. + +--- + +## Paso 3 – **Read barcode from image** y extrae los detalles Macro PDF417 + +Ahora llega el corazón del **c# barcode reader example**. Instanciaremos `BarCodeReader` con la bandera `DecodeType.MacroPdf417`, recorreremos todos los resultados (puede haber más de un código de barras en una sola imagen) y mostraremos cada propiedad extendida. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Qué hace el código (por qué, no solo cómo) + +1. **Bloque `using`** – Garantiza que los recursos nativos (manejadores de archivo, memoria del decodificador) se liberen inmediatamente después de la operación. Omitirlo puede provocar archivos bloqueados en Windows. +2. **`DecodeType.MacroPdf417`** – Indica a Aspose que busque específicamente símbolos Macro PDF417; otros tipos de códigos de barras se ignoran, lo que acelera el escaneo. +3. **`ReadBarCodes()`** – Devuelve una colección porque una imagen puede contener varios segmentos Macro PDF417 (piensa en un documento multipágina dividido en varios códigos). +4. **`macroResult.Extended?.Pdf417`** – El objeto `Extended` es nullable; el operador de navegación segura (`?.`) evita una `NullReferenceException` si el código de barras carece de datos extendidos. +5. **Impresión de cada campo** – Te brinda visibilidad del identificador de archivo, el orden de los segmentos, la verificación de suma de verificación y campos textuales opcionales como remitente o destinatario. + +--- + +## Paso 4 – Ejecuta la aplicación y verifica la salida + +Compila y ejecuta el programa: + +```bash +dotnet run +``` + +Si todo está configurado correctamente, deberías ver algo similar a lo siguiente en tu consola: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Nota:** Los valores exactos dependen del código de barras que estés decodificando. Si obtienes “No Macro PDF417 extension data found”, verifica que la imagen realmente contenga un código Macro PDF417 y que estés usando el `DecodeType` correcto. + +--- + +## Manejo de múltiples segmentos y validación (avanzado) + +Macro PDF417 está diseñado para grandes cargas de datos divididas en varios símbolos. Cuando encuentres más de un segmento, normalmente deberás: + +1. **Recopilar todos los segmentos** en un diccionario claveado por `SegmentID`. +2. **Ordenarlos** por `SegmentID` para volver a ensamblar el archivo original. +3. **Validar** la `Checksum` contra la carga concatenada (Aspose lo hace internamente, pero puedes volver a ejecutar un CRC si necesitas mayor seguridad). + +Aquí tienes un bosquejo rápido: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Deberás implementar `AssembleSegments` y `VerifyChecksum` según el formato de tu carga útil—usualmente es solo una concatenación de arreglos de bytes seguida de una verificación CRC‑16. + +--- + +## Problemas comunes y cómo evitarlos + +| Síntoma | Causa probable | Solución | +|---------|----------------|----------| +| `null` devuelto por `macroResult.Extended` | La imagen contiene un PDF417 simple, no una versión Macro. | Usa `DecodeType.Pdf417` en su lugar, o verifica el código de barras de origen. | +| No se muestra ninguna salida | `imagePath` incorrecta o archivo inaccesible. | Verifica la ruta del archivo; asegura que la aplicación tenga permisos de lectura. | +| Excepción “Object disposed” | Intento de usar `reader` después del bloque `using`. | Mantén todo el procesamiento dentro del bloque `using` o guarda los resultados antes de salir. | + +--- + +## ¿Qué deberías aprender a continuación? + +Los siguientes tutoriales cubren temas estrechamente relacionados que amplían las técnicas demostradas en esta guía. Cada recurso incluye ejemplos de código completos y explicaciones paso a paso para ayudarte a dominar funciones adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/swedish/net/compact-pdf417-encoding/_index.md b/barcode/swedish/net/compact-pdf417-encoding/_index.md index cc613e6f8..df873bddd 100644 --- a/barcode/swedish/net/compact-pdf417-encoding/_index.md +++ b/barcode/swedish/net/compact-pdf417-encoding/_index.md @@ -85,6 +85,12 @@ Utöver grunderna, här är några praktiska tips för att effektivisera ditt ar ### [Skapa kompakta PDF417-streckkoder](./compact-pdf417-basic-configuration/) Lär dig hur du genererar Compact PDF417‑streckkoder med Aspose.BarCode för .NET. Omfattande guide med steg‑för‑steg‑instruktioner och kodexempel. +### [Hur man genererar PDF417-streckkodsbild i C# med Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Lär dig att skapa en PDF417‑streckkodsbild i C# med Aspose. + +### [Läs flera streckkoder C# – Komplett guide med PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Lär dig hur du läser flera streckkoder i C# med PDF417-stöd. + ## Vanliga frågor **Q: Vad är den maximala mängden data jag kan lagra i en Compact PDF417‑streckkod?** @@ -113,4 +119,4 @@ A: Inga externa typsnitt krävs; biblioteket hanterar all rendering internt. {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/swedish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/swedish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..f84e1ab16 --- /dev/null +++ b/barcode/swedish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: Hur man genererar PDF417‑streckkodbild i C# med Aspose. Lär dig steg + för steg hur du skapar streckkod med Aspose, sätter MacroPDF417‑metadata och sparar + som PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: sv +lastmod: 2026-07-30 +og_description: Hur man genererar PDF417-streckkodsbild i C# med Aspose. Följ den + här kompletta guiden för att skapa en streckkod med Aspose, konfigurera MacroPDF417-metadata + och exportera en PNG-fil. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Hur man genererar PDF417‑streckkodsbild i C# med Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Hur man genererar PDF417-streckkodbild i C# med Aspose +url: /sv/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Så här genererar du PDF417 streckkodsbild i C# med Aspose + +Att generera PDF417 streckkodsbild i C# med Aspose är ett vanligt hinder för alla som arbetar med högdensitetsdatakodning. I den här guiden går vi igenom varje steg – från att konfigurera generatorn, justera MacroPDF417‑metadata, till att slutligen spara en skarp PNG‑fil. + +Om du någonsin har försökt **generate barcode image c#** och slutat med en tom canvas eller en oläslig skanning, är du inte ensam. Den goda nyheten är att Aspose.BarCode gör hela processen nästan smärtfri, och i slutet av den här artikeln kommer du kunna **create barcode with Aspose** för vilket företagsarbetsflöde som helst. + +## Vad du kommer att lära dig + +- Installera och referera Aspose.BarCode‑biblioteket för .NET. +- Initiera en PDF417‑generator med en anpassad payload. +- Tillämpa MacroPDF417‑specifika fält såsom file ID, segment ID och timestamp. +- Exportera resultatet till en PNG‑bild som du kan bädda in i rapporter eller mobilappar. +- Tips för felsökning av vanliga fallgropar (t.ex. fel modulbredd, saknade segment). + +Ingen förkunskap om MacroPDF417 krävs; en grundläggande förståelse för C# och Visual Studio räcker. + +## Förutsättningar + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 eller senare | Aktuell LTS‑version, fullt stöd av Aspose | +| Visual Studio 2022 (eller någon IDE) | För att kompilera och köra exemplet | +| Aspose.BarCode for .NET (NuGet) | Tillhandahåller `BarcodeGenerator` och PDF417‑stöd | + +Du kan lägga till biblioteket via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Nu när grunden är lagd, låt oss dyka ner i koden. + +## Så här genererar du PDF417 streckkodsbild i C# – Inställning + +Det första vi gör är att skapa en `BarcodeGenerator`‑instans för kodningstypen **MacroPdf417**. Detta objekt innehåller alla konfigurationsalternativ, från modulstorlek till den rika metadata som MacroPDF417 förväntar sig. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Varför detta är viktigt:** `EncodeTypes.MacroPdf417` talar om för Aspose att producera en PDF417‑streckkod som kan delas upp i flera segment – ett måste för stora filer eller batch‑bearbetning. + +## Konfigurera grundläggande utseende + +En läsbar streckkod börjar med rätt visuella inställningar. `XDimension` styr bredden på varje modul (de små svarta/vita rutorna), medan `Columns` bestämmer hur många kolumner streckkoden sträcker sig över. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Tips:** Om streckkoden ser för tät ut på en kvittoskrivare, öka `XDimension` till `3` eller `4`. +- **Fallgrop:** Att sätta `Columns` för lågt kan leda till att streckkoden överskrider bildens gränser, vilket resulterar i en oläslig skanning. + +## Ange MacroPDF417‑specifik metadata + +MacroPDF417 låter dig bädda in fil‑nivåinformation direkt i streckkoden. Detta är perfekt för att spåra stora dokumentleveranser eller dela en fil över flera skanningar. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Vad varje fält gör:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | Unik identifierare för hela filen. | +| `MacroPdf417SegmentID` | Index för det aktuella segmentet (börjar på 0). | +| `MacroPdf417SegmentsCount` | Totalt antal segment som filen är delad i. | +| `MacroPdf417FileName` | Läsbart namn, användbart för audit‑loggar. | +| `MacroPdf417Checksum` | 16‑bit CRC för verifiering av dataintegritet. | +| `MacroPdf417FileSize` | Ursprunglig filstorlek i byte, hjälper mottagare att allokera buffertar. | +| `MacroPdf417TimeStamp` | Datum/tid då filen genererades. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Valfria strängar för att identifiera mottagare/avsändare. | +| `MacroPdf417Terminator` | Markerar sista segmentet; krävs för korrekt avkodning. | + +> **Varför bry sig?** Utan dessa fält kan en scanner bara läsa rådata, inte sammanhanget. Genom att lägga till metadata kan mottagarsystemet automatiskt sätta ihop den ursprungliga filen igen. + +## Spara streckkoden som PNG + +När generatorn är fullt konfigurerad är det bara en rad för att spara bilden: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Filformat:** PNG är förlustfritt, vilket säkerställer att varje modul förblir skarp för scanners. +- **Alternativ:** Använd `BarCodeImageFormat.Jpeg` om du behöver en mindre filstorlek, men förvänta dig en liten försämring i läsbarhet. + +### Förväntad utdata + +Efter att ha kört kodsnutten hittar du `MacroPdf417Meta.png` i den angivna mappen. Den bör se ut ungefär som illustrationen nedan: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Hur man genererar PDF417 streckkodsbild i C#"} + +Bilden innehåller ett tätt rutnät av svarta och vita fyrkanter, med den kodade payloaden och MacroPDF417‑metadata inbäddade. + +## Fullt fungerande exempel + +Nedan är det kompletta, kopiera‑och‑klistra‑klara programmet. Det kompileras med vilket .NET 6+‑projekt som helst och kräver bara Aspose.BarCode‑NuGet‑paketet. + + + +## Vad bör du lära dig härnäst? + +Följande handledningar täcker närliggande ämnen som bygger vidare på teknikerna som demonstrerats i den här guiden. Varje resurs innehåller kompletta kodexempel med steg‑för‑steg‑förklaringar för att hjälpa dig bemästra ytterligare API‑funktioner och utforska alternativa implementationssätt i dina egna projekt. + +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [How to generate Aztec barcode with custom aspect ratio using Aspose.BarCode for .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/swedish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/swedish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..49062779f --- /dev/null +++ b/barcode/swedish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-07-30 +description: Läs flera streckkoder i C# med Aspose.BarCode. Lär dig steg för steg + hur du avkodar PDF417, upptäcker kompakt läge och hanterar många streckkoder i en + bild. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: sv +lastmod: 2026-07-30 +og_description: Läs flera streckkoder i C# med Aspose.BarCode. Den här guiden visar + hur du avkodar alla streckkoder i en bild, kontrollerar kompakt läge och integrerar + i .NET‑appar. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Läs flera streckkoder C# – Fullständig handledning för PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Läs flera streckkoder C# – Komplett guide med PDF417 +url: /sv/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Läs flera streckkoder C# – Komplett guide med PDF417 + +Har du någonsin funderat på hur man **read multiple barcodes C#** från en enda bild? Kanske har du en bunt med fraktetiketter, en samling biljetter eller ett PDF417‑dokument som packar flera koder i en bild. I mitt dagliga arbete har jag stött på exakt detta hinder – tills jag upptäckte Aspose.BarCode:s `BarCodeReader`. Den här handledningen visar hur du avkodar varje streckkod i en bild, avgör om varje PDF417 är i kompakt (truncated) läge och hanterar resultaten på ett rent sätt. + +Vi kommer också att strö lite extra tips – som vad du ska göra när bilden innehåller olika streckkodssymboler, eller när en skanning inte ger några resultat alls. När du är klar har du en färdig konsolapp som **reads multiple barcodes C#** som ett proffs. + +## Vad du behöver + +Innan vi dyker ner, se till att du har följande på din maskin: + +- **.NET 6.0** SDK eller nyare (koden fungerar även med .NET Framework 4.6+ men .NET 6 är den optimala versionen). +- **Aspose.BarCode for .NET** NuGet‑paket (`Install-Package Aspose.BarCode`). +- En exempelbild som innehåller **PDF417**‑streckkoder – helst en som blandar kompakt och full‑storlek symboler. Handledningen använder `CompactPdf417.png`, men vilken PNG/JPEG som helst fungerar. +- Din favorit‑IDE (Visual Studio, Rider eller VS Code). + +Det är allt – inga extra DLL‑filer, inga inhemska beroenden. Aspose.BarCode är ren managed code, så du kan släppa den i vilket .NET‑projekt som helst. + +![Read multiple barcodes C# console output](image.png "Konsolutdata för Läs flera streckkoder C#") + +*Bildtext: Läs flera streckkoder C# – skärmbild av konsolen som visar kompakt‑lägesstatus för PDF417‑streckkoder.* + +## Steg 1 – Installera och referera BarCodeReader C#‑biblioteket + +Först och främst behöver du **BarCodeReader C#**‑klassen som driver avkodningen. Öppna din terminal (eller Package Manager Console) och kör: + +```powershell +dotnet add package Aspose.BarCode +``` + +Eller, om du befinner dig i Visual Studios NuGet‑hanterare, sök efter *Aspose.BarCode* och klicka på **Install**. Detta hämtar den senaste stabila versionen (i juli 2026 är det 23.9), som stödjer PDF417, QR, DataMatrix och dussintals andra symbologier. + +Varför detta är viktigt: biblioteket abstraherar bort det tunga arbetet med bildbehandling, felkorrigering och symboligenkänning. Du skulle kunna skriva din egen scanner, men du skulle spendera veckor på kantfall. Aspose ger dig ett beprövat, **C# barcode library** som har uppdaterats för moderna .NET‑runtime‑miljöer. + +## Steg 2 – Skapa ett minimalt konsolprojekt + +Skapa en ny konsolapp så att vi kan fokusera på streckkodlogiken utan någon UI‑brus: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Ersätt den genererade `Program.cs` med hela exemplet nedan. Du får gärna behålla standard‑namnutrymmet eller byta namn – inget speciellt krävs. + +## Steg 3 – Skriv den fullständiga “Read Multiple Barcodes C#”‑implementeringen + +Nedan är ett **komplett, körbart** kodexempel. Det täcker alla fyra steg från originalsnutten, lägger till felhantering och skriver ut användbar diagnostik. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Varför den här koden fungerar + +- **`BarCodeReader`** är arbetshästen från **BarCodeReader C#**‑API:t. Den öppnar bilden, applicerar förbehandling och söker efter symboler av den typ du anger. +- **`ReadBarCodes()`** returnerar en array, inte bara ett enskilt resultat. Det är nyckeln till **reading multiple barcodes C#** – metoden samlar automatiskt alla matchningar den hittar. +- **`result.Extended.Pdf417.IsTruncated`** berättar om PDF417‑koden är i *compact* (aka truncated) läge. Detta flagga finns bara för PDF417, så vi skyddar med null‑conditional operator (`?.`) för att undvika undantag om en annan symbologi smyger sig in. +- `foreach`‑loopen skriver både den avkodade texten och kompakt‑statusen, vilket ger dig en snabb kontroll. + +## Steg 4 – Hantera olika streckkodstyper (valfritt) + +Om din bild kan innehålla mer än bara PDF417, ändra helt enkelt det andra argumentet till `BarCodeReader` till `DecodeType.AllSupported`. Loopen förblir densamma, men du måste skydda mot att `result.Extended` är null för icke‑PDF417‑symboler: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Denna lilla justering förvandlar ditt **C# barcode library** till en universell scanner, perfekt för blandade symbologi‑batcher. + +## Steg 5 – Edge Cases och bästa praxis‑tips + +### 1️⃣ Inga streckkoder upptäckta +Om `ReadBarCodes()` returnerar en tom array är de vanligaste orsakerna: + +- Fel filväg eller saknade läsbehörigheter. +- Bildkvaliteten är för låg (suddig, låg kontrast). Överväg förbehandling med `reader.ImagePreprocessingOptions` (t.ex. `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Extremt stora bilder +Att bearbeta ett 10 MP‑foto kan vara minneskrävande. Du kan begränsa skanningsområdet: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Trådsäkerhet +`BarCodeReader` implementerar `IDisposable` och är **inte** trådsäker. Skapa separata instanser per tråd om du behöver parallell bearbetning. + +### 4️⃣ Licensiering +Aspose.BarCode fungerar i provläge direkt, men du får ett vattenstämpel på utdata‑bilden. För produktion, sätt licensen tidigt: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Loggning +När du integrerar detta i en större tjänst, ersätt `Console.WriteLine` med en strukturerad logger (Serilog, NLog). På så sätt kan du fånga `CodeText`, `CodeType` och `IsTruncated` som fält för vidare analys. + +## Fullt fungerande exempel – Sammanfattning + +Sätter vi ihop allt får du hela programmet som du kan kopiera‑klistra in i `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Vad du bör lära dig härnäst? + + +Följande handledningar täcker närbesläktade ämnen som bygger vidare på teknikerna som demonstrerats i den här guiden. Varje resurs innehåller kompletta kodexempel med steg‑för‑steg‑förklaringar för att hjälpa dig bemästra ytterligare API‑funktioner och utforska alternativa implementationsmetoder i dina egna projekt. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/swedish/net/one-dimensional-barcode-types/_index.md b/barcode/swedish/net/one-dimensional-barcode-types/_index.md index e2ec8e481..568263757 100644 --- a/barcode/swedish/net/one-dimensional-barcode-types/_index.md +++ b/barcode/swedish/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ tjäna hur man genererar streckkoder i .NET med Aspose.BarCode för .NET. Den h Lär dig hur du hanterar undantag samtidigt som du genererar endimensionella streckkoder med Aspose.BarCode för .NET. Denna steg-för-steg-guide säkerställer feltoleranta streckkodslösningar. Börja nu! ### [Endimensionell Wide-Narrow Ratio Configuration](./one-dimensional-wide-narrow-ratio-configuration/) Generera anpassade streckkoder enkelt med Aspose.BarCode för .NET. Steg-för-steg-guide för endimensionell bred-smal konfiguration. +### [Läs streckkod från bild – C# streckkodsläsare exempel](./read-barcode-from-image-c-barcode-reader-example/) +Lär dig hur du läser streckkoder från en bild i C# med Aspose.BarCode. ## Slutsats @@ -89,4 +91,4 @@ Med den här artikeln kommer du inte bara att få kunskap om olika endimensionel {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/swedish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/swedish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..5ec161577 --- /dev/null +++ b/barcode/swedish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,277 @@ +--- +category: general +date: 2026-07-30 +description: Läs streckkod från bild med Aspose.BarCode för .NET – ett komplett C#‑exempel + på streckkodsläsare som visar hur man avkodar Macro PDF417‑streckkoder. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: sv +lastmod: 2026-07-30 +og_description: Läs streckkod från bild med Aspose.BarCode för .NET. Detta steg‑för‑steg + C#-exempel på streckkodsläsare visar hur man extraherar all Macro PDF417‑metadata. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Läs streckkod från bild – Fullständigt C#‑exempel på streckkodsläsare +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Läs streckkod från bild – C#-exempel på streckkodsläsare +url: /sv/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Läs streckkod från bild – C# streckkodsläsare exempel + +Behöver du **läsa streckkod från bild** i en C#‑applikation? Du är på rätt plats. I den här handledningen går vi igenom ett komplett *c# barcode reader example* som använder Aspose.BarCode for .NET‑biblioteket för att avkoda en Macro PDF417‑streckkod och hämta all utökad information som standarden tillhandahåller. + +Föreställ dig att du just har skannat en fraktetikett, ett boardingkort eller ett statligt ID som innehåller ett Macro PDF417‑segment. Du vill hämta fil‑ID, segmentantal, tidsstämplar och kanske till och med avsändarens namn – allt utan att lämna koden. Det är exakt vad vi kommer att uppnå, och vi gör det på ett sätt som är enkelt att kopiera‑klistra in i ditt eget projekt. + +--- + +## Vad du kommer att lära dig + +- Hur du lägger till Aspose.BarCode NuGet‑paketet i ett .NET‑projekt. +- Hur du öppnar en bildfil som innehåller en Macro PDF417‑streckkod. +- Hur du itererar över **read barcode from image**‑resultat och får åtkomst till varje utökad fält. +- Tips för att hantera flera segment, validera kontrollsummor och felsöka vanliga fallgropar. + +När du har gått igenom den här guiden har du en fungerande konsolapp som skriver ut all Macro PDF417‑metadata, redo att integreras i större system som lagerhanterare eller dokumenthanterings‑pipelines. + +--- + +## Förutsättningar + +Innan vi dyker ner, se till att du har följande: + +| Krav | Varför det är viktigt | +|------|-----------------------| +| .NET 6.0 SDK eller senare (någon nyare version fungerar) | Tillhandahåller runtime för konsolapplikationen. | +| Visual Studio 2022 (eller VS Code med C#‑tillägg) | Gör redigering och felsökning smärtfri. | +| Aspose.BarCode for .NET (gratis prov eller licensierad) | Biblioteket som faktiskt avkodar streckkoden. | +| En bildfil (`MacroPdf417Meta.png`) som innehåller en Macro PDF417‑streckkod | Källan vi kommer att läsa från. | + +Om du ännu inte har Aspose.BarCode kan du hämta det från NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Den enda raden installerar allt du behöver, inklusive `BarCodeReader`, `DecodeType` och den rika `Extended`‑egenskapsuppsättningen som vi kommer att utforska. + +--- + +## Steg 1 – Ställ in projektet och importera biblioteket + +Skapa ett nytt konsolprojekt (eller lägg in koden i ett befintligt). `using`‑direktiven är väsentliga; de tar in streckkodsklasserna i scopet. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro tip:** Om du använder Visual Studio kommer IDE:n att erbjuda att automatiskt lägga till de saknade `using`‑satserna – tryck bara *Ctrl+.`*. + +--- + +## Steg 2 – Förbered bildsökvägen + +Att hårdkoda en absolut sökväg fungerar för en snabb demo, men i produktion skulle du förmodligen acceptera ett kommandoradsargument eller en konfigurationsinställning. För tydlighetens skull håller vi det enkelt: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Varför det är viktigt:** `BarCodeReader` förväntar sig en giltig filsökväg; en felaktig sökväg kastar ett `FileNotFoundException` innan någon avkodning ens påbörjas. + +--- + +## Steg 3 – **Read barcode from image** och extrahera Macro PDF417‑detaljer + +Nu kommer hjärtat i **c# barcode reader example**. Vi kommer att instansiera `BarCodeReader` med flaggan `DecodeType.MacroPdf417`, loopa igenom alla resultat (det kan finnas mer än en streckkod i en enda bild) och skriva ut varje utökad egenskap. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Vad koden gör (varför, inte bara hur) + +1. **`using`‑block** – Säkerställer att de inhemska resurserna (filhandtag, inhemskt avkodningsminne) frigörs omedelbart efter operationen. Att hoppa över detta kan leda till låsta filer på Windows. +2. **`DecodeType.MacroPdf417`** – Instruerar Aspose att specifikt leta efter Macro PDF417‑symboler; andra streckkodstyper ignoreras, vilket snabbar upp skanningen. +3. **`ReadBarCodes()`** – Returnerar en samling eftersom en bild kan innehålla flera Macro PDF417‑segment (tänk ett flersidigt dokument uppdelat på flera streckkoder). +4. **`macroResult.Extended?.Pdf417`** – `Extended`‑objektet är nullable; den säkra navigationsoperatorn (`?.`) förhindrar ett `NullReferenceException` om streckkoden saknar utökad data. +5. **Skriva ut varje fält** – Ger dig insyn i filidentifieraren, segmentordning, kontrollsumme‑verifiering och valfria textfält som avsändare eller mottagare. + +--- + +## Steg 4 – Kör applikationen och verifiera utskriften + +Kompilera och kör programmet: + +```bash +dotnet run +``` + +Om allt är korrekt konfigurerat bör du se något liknande följande i din konsol: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Obs:** De exakta värdena beror på den streckkod du avkodar. Om du får “No Macro PDF417 extension data found,” dubbelkolla att bilden verkligen innehåller en Macro PDF417‑kod och att du använder rätt `DecodeType`. + +--- + +## Hantera flera segment och validering (avancerat) + +Macro PDF417 är designad för stora datapaket som delas upp över flera symboler. När du stöter på mer än ett segment behöver du vanligtvis: + +1. **Samla alla segment** i en dictionary nycklad av `SegmentID`. +2. **Sortera** dem efter `SegmentID` för att återmontera den ursprungliga filen. +3. **Validera** `Checksum` mot den sammanslagna nyttolasten (Aspose gör detta internt, men du kan köra en CRC igen om du vill ha extra säkerhet). + +Här är ett snabbt skissförslag: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Du måste implementera `AssembleSegments` och `VerifyChecksum` baserat på ditt payload‑format – ofta är det bara en byte‑array‑konkatenering följt av en CRC‑16‑kontroll. + +--- + +## Vanliga fallgropar och hur man undviker dem + +| Symptom | Trolig orsak | Åtgärd | +|---------|--------------|--------| +| `null` returned from `macroResult.Extended` | Bilden innehåller en vanlig PDF417, inte en Macro‑version. | Använd `DecodeType.Pdf417` istället, eller verifiera källstreckkoden. | +| No output at all | `imagePath` felaktig eller filen ej åtkomlig. | Dubbelkolla filsökvägen; säkerställ att appen har läsbehörighet. | +| Exception “Object disposed” | Försökt använda `reader` efter `using`‑blocket. | Håll all behandling inom ` + +## Vad bör du lära dig härnäst? + +De följande handledningarna täcker närbesläktade ämnen som bygger på teknikerna som demonstreras i den här guiden. Varje resurs innehåller kompletta fungerande kodexempel med steg‑för‑steg‑förklaringar för att hjälpa dig bemästra ytterligare API‑funktioner och utforska alternativa implementationsmetoder i dina egna projekt. + +- [DataMatrix-läsarprogrammering med Aspose.BarCode för .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode-läsarinitialisering med Aspose.BarCode för .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [Hur man läser DataMatrix-streckkoder med Aspose.BarCode för .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/thai/net/compact-pdf417-encoding/_index.md b/barcode/thai/net/compact-pdf417-encoding/_index.md index 642025381..fa877f74c 100644 --- a/barcode/thai/net/compact-pdf417-encoding/_index.md +++ b/barcode/thai/net/compact-pdf417-encoding/_index.md @@ -84,6 +84,10 @@ Aspose.BarCode ให้คุณตั้งค่าคุณสมบัต ## บทแนะนำการเข้ารหัส Compact PDF417 ### [Creating Compact PDF417 Barcodes](./compact-pdf417-basic-configuration/) เรียนรู้วิธีสร้างบาร์โค้ด Compact PDF417 ด้วย Aspose.BarCode for .NET คู่มือครบถ้วนพร้อมขั้นตอนและตัวอย่างโค้ด +### [วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +เรียนรู้วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose +### [อ่านหลายบาร์โค้ดด้วย C# – คู่มือฉบับสมบูรณ์กับ PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +เรียนรู้วิธีอ่านบาร์โค้ดหลายประเภทพร้อม PDF417 ด้วย C# อย่างละเอียด ## คำถามที่พบบ่อย @@ -113,4 +117,4 @@ A: ไม่จำเป็นต้องใช้ฟอนต์ภายน {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/thai/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/thai/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..fe00a7a7c --- /dev/null +++ b/barcode/thai/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,172 @@ +--- +category: general +date: 2026-07-30 +description: วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose. เรียนรู้ขั้นตอนการสร้างบาร์โค้ดด้วย + Aspose, ตั้งค่าเมตาดาต้า MacroPDF417, และบันทึกเป็น PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: th +lastmod: 2026-07-30 +og_description: วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose. ทำตามคู่มือฉบับเต็มนี้เพื่อสร้างบาร์โค้ดด้วย + Aspose, กำหนดค่าเมตาดาต้า MacroPDF417, และส่งออกเป็นไฟล์ PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose +url: /th/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose + +การสร้างภาพบาร์โค้ด PDF417 ด้วย C# และ Aspose เป็นอุปสรรคที่พบบ่อยสำหรับผู้ที่ต้องจัดการกับการเข้ารหัสข้อมูลความหนาแน่นสูง ในคู่มือนี้เราจะเดินผ่านทุกขั้นตอน—ตั้งค่าเครื่องสร้าง ปรับแต่งเมตาดาต้า MacroPDF417 และสุดท้ายบันทึกเป็นไฟล์ PNG ที่คมชัด + +หากคุณเคยลอง **generate barcode image c#** แล้วได้ภาพว่างหรือสแกนที่อ่านไม่ออก คุณไม่ได้เป็นคนเดียว ข่าวดีคือ Aspose.BarCode ทำให้กระบวนการทั้งหมดเป็นเรื่องง่ายเกือบไม่มีอุปสรรค และเมื่ออ่านบทความนี้จบแล้วคุณจะสามารถ **create barcode with Aspose** สำหรับการทำงานขององค์กรใด ๆ + +## สิ่งที่คุณจะได้เรียนรู้ + +- ติดตั้งและอ้างอิงไลบรารี Aspose.BarCode สำหรับ .NET. +- สร้างอินสแตนซ์ของ PDF417 generator ด้วย payload ที่กำหนดเอง. +- ใช้ฟิลด์เฉพาะของ MacroPDF417 เช่น file ID, segment ID, และ timestamp. +- ส่งออกผลลัพธ์เป็นภาพ PNG ที่คุณสามารถฝังในรายงานหรือแอปมือถือ. +- เคล็ดลับการแก้ไขปัญหาข้อผิดพลาดทั่วไป (เช่น ความกว้างโมดูลผิด, ขาดเซกเมนต์). + +## ข้อกำหนดเบื้องต้น + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 or later | เวอร์ชัน LTS ปัจจุบัน, รองรับเต็มที่โดย Aspose | +| Visual Studio 2022 (or any IDE) | เพื่อคอมไพล์และรันตัวอย่าง | +| Aspose.BarCode for .NET (NuGet) | ให้ `BarcodeGenerator` และการสนับสนุน PDF417 | + +คุณสามารถเพิ่มไลบรารีผ่าน NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +เมื่อพื้นฐานพร้อมแล้ว, เรามาเริ่มต้นกับโค้ดกัน + +## วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C# – การตั้งค่า + +สิ่งแรกที่เราทำคือสร้างอินสแตนซ์ `BarcodeGenerator` สำหรับประเภทการเข้ารหัส **MacroPdf417** วัตถุนี้เก็บตัวเลือกการกำหนดค่าทั้งหมด ตั้งแต่ขนาดโมดูลจนถึงเมตาดาต้าที่ครบถ้วนที่ MacroPDF417 ต้องการ + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **ทำไมเรื่องนี้สำคัญ:** `EncodeTypes.MacroPdf417` บอก Aspose ให้สร้างบาร์โค้ด PDF417 ที่สามารถแบ่งเป็นหลายเซกเมนต์—เป็นสิ่งจำเป็นสำหรับไฟล์ขนาดใหญ่หรือการประมวลผลเป็นชุด + +## กำหนดลักษณะพื้นฐาน + +บาร์โค้ดที่อ่านได้เริ่มจากการตั้งค่าภาพที่เหมาะสม `XDimension` ควบคุมความกว้างของแต่ละโมดูล (สี่เหลี่ยมสีดำ/ขาวขนาดเล็ก) ส่วน `Columns` กำหนดจำนวนคอลัมน์ที่บาร์โค้ดครอบคลุม + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **เคล็ดลับ:** หากบาร์โค้ดดูหนาเกินไปบนเครื่องพิมพ์ใบเสร็จ ให้เพิ่มค่า `XDimension` เป็น `3` หรือ `4`. +- **ข้อผิดพลาด:** การตั้งค่า `Columns` ต่ำเกินไปอาจทำให้บาร์โค้ดล้นขอบภาพ ส่งผลให้สแกนไม่อ่านได้. + +## ตั้งค่าเมตาดาต้าเฉพาะของ MacroPDF417 + +MacroPDF417 ให้คุณฝังข้อมูลระดับไฟล์โดยตรงลงในบาร์โค้ด ซึ่งเหมาะอย่างยิ่งสำหรับการติดตามการส่งเอกสารขนาดใหญ่หรือการแบ่งไฟล์เป็นหลายสแกน + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**สิ่งที่แต่ละฟิลด์ทำ:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | ตัวระบุที่ไม่ซ้ำสำหรับไฟล์ทั้งหมด. | +| `MacroPdf417SegmentID` | ดัชนีของเซกเมนต์ปัจจุบัน (เริ่มที่ 0). | +| `MacroPdf417SegmentsCount` | จำนวนเซกเมนต์ทั้งหมดที่ไฟล์ถูกแบ่งออก. | +| `MacroPdf417FileName` | ชื่อที่มนุษย์อ่านได้, มีประโยชน์สำหรับบันทึกการตรวจสอบ. | +| `MacroPdf417Checksum` | CRC 16‑บิตสำหรับตรวจสอบความสมบูรณ์ของข้อมูล. | +| `MacroPdf417FileSize` | ขนาดไฟล์ต้นฉบับเป็นไบต์, ช่วยผู้รับจัดสรรบัฟเฟอร์. | +| `MacroPdf417TimeStamp` | วันที่/เวลาเมื่อไฟล์ถูกสร้าง. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | สตริงแบบเลือกเพื่อระบุผู้ส่ง/ผู้รับ. | +| `MacroPdf417Terminator` | ทำเครื่องหมายเซกเมนต์สุดท้าย; จำเป็นสำหรับการถอดรหัสที่ถูกต้อง. | + +> **ทำไมต้องใส่?** หากไม่มีฟิลด์เหล่านี้ สแกนเนอร์จะอ่านได้เฉพาะข้อมูลดิบ ไม่ได้บริบท การเพิ่มเมตาดาต้าหมายความว่าระบบรับสามารถประกอบไฟล์ต้นฉบับได้โดยอัตโนมัติ + +## บันทึกบาร์โค้ดเป็น PNG + +เมื่อเครื่องสร้างถูกกำหนดค่าอย่างเต็มที่ การบันทึกภาพเป็นบรรทัดเดียว: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **รูปแบบไฟล์:** PNG เป็นแบบ lossless, ทำให้ทุกโมดูลคมชัดสำหรับสแกนเนอร์. +- **ทางเลือก:** ใช้ `BarCodeImageFormat.Jpeg` หากต้องการไฟล์ขนาดเล็กลง, แต่คาดว่าจะมีการสูญเสียความอ่านได้เล็กน้อย. + +### ผลลัพธ์ที่คาดหวัง + +หลังจากรันโค้ดส่วนนั้น คุณจะพบไฟล์ `MacroPdf417Meta.png` ในโฟลเดอร์ที่ระบุ มันควรมีลักษณะคล้ายภาพด้านล่าง: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="วิธีสร้างภาพบาร์โค้ด PDF417 ด้วย C#"} + +ภาพนี้ประกอบด้วยกริดหนาแน่นของสี่เหลี่ยมสีดำและสีขาว พร้อมกับ payload ที่เข้ารหัสและเมตาดาต้า MacroPDF417 ที่ฝังอยู่ + +## ตัวอย่างทำงานเต็มรูปแบบ + +ด้านล่างเป็นโปรแกรมที่พร้อมคัดลอกและวางครบถ้วน มันคอมไพล์กับโปรเจกต์ .NET 6+ ใด ๆ และต้องการเพียงแพคเกจ NuGet ของ Aspose.BarCode + + + +## สิ่งที่คุณควรเรียนต่อไป + +บทแนะนำต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดซึ่งต่อยอดจากเทคนิคที่แสดงในคู่มือนี้ แต่ละแหล่งข้อมูลรวมตัวอย่างโค้ดทำงานเต็มรูปแบบพร้อมคำอธิบายขั้นตอนเพื่อช่วยคุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจแนวทางการใช้งานทางเลือกในโปรเจกต์ของคุณ + +- [วิธีสร้างบาร์โค้ด – Compact PDF417 ด้วย Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [วิธีสร้างบาร์โค้ด DataMatrix (ECC 200) ด้วย Aspose.BarCode สำหรับ .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [วิธีสร้างบาร์โค้ด Aztec ด้วยอัตราส่วนภาพที่กำหนดเองโดยใช้ Aspose.BarCode สำหรับ .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/thai/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/thai/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..ec10e3640 --- /dev/null +++ b/barcode/thai/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,264 @@ +--- +category: general +date: 2026-07-30 +description: อ่านบาร์โค้ดหลายรายการด้วย C# และ Aspose.BarCode เรียนรู้ขั้นตอนโดยละเอียดว่าจะแกะรหัส + PDF417 อย่างไร ตรวจจับโหมดคอมแพคท์ และจัดการบาร์โค้ดหลายรายการในภาพเดียว +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: th +lastmod: 2026-07-30 +og_description: อ่านหลายบาร์โค้ดด้วย C# และ Aspose.BarCode คู่มือนี้จะแสดงวิธีถอดรหัสบาร์โค้ดทั้งหมดในภาพ + ตรวจสอบโหมดคอมแพคท์ และบูรณาการเข้าสู่แอป .NET +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: อ่านหลายบาร์โค้ด C# – บทเรียนเต็มสำหรับ PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: อ่านหลายบาร์โค้ดด้วย C# – คู่มือฉบับสมบูรณ์กับ PDF417 +url: /th/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# อ่านหลายบาร์โค้ด C# – คู่มือฉบับสมบูรณ์กับ PDF417 + +เคยสงสัยไหมว่า **read multiple barcodes C#** จากรูปภาพเดียวทำได้อย่างไร? บางทีคุณอาจมีชุดฉลากการจัดส่ง, คอลลาจตั๋ว, หรือเอกสาร PDF417 ที่บรรจุหลายโค้ดไว้ในภาพเดียว ในงานประจำวันของฉันก็เจอปัญหาแบบนี้บ่อยครั้ง—จนกระทั่งพบกับ `BarCodeReader` ของ Aspose.BarCode บทแนะนำนี้จะพาคุณผ่านการถอดรหัสทุกบาร์โค้ดในภาพ, ตรวจสอบว่า PDF417 แต่ละอันอยู่ในโหมด compact (truncated) หรือไม่, และจัดการผลลัพธ์อย่างเป็นระบบ + +เราจะเพิ่มเคล็ดลับเล็ก ๆ อีกบ้าง—เช่น วิธีจัดการเมื่อภาพมีสัญลักษณ์บาร์โค้ดหลายประเภท, หรือเมื่อการสแกนไม่ให้ผลลัพธ์เลย สุดท้ายคุณจะได้แอปคอนโซลที่พร้อมรันเพื่อ **read multiple barcodes C#** อย่างมืออาชีพ + +## What You’ll Need + +ก่อนจะเริ่ม, ตรวจสอบให้แน่ใจว่าคุณมีสิ่งต่อไปนี้บนเครื่องของคุณ: + +- **.NET 6.0** SDK หรือใหม่กว่า (โค้ดนี้ทำงานได้กับ .NET Framework 4.6+ ด้วยเช่นกัน, แต่ .NET 6 เป็นเวอร์ชันที่แนะนำ) +- **Aspose.BarCode for .NET** NuGet package (`Install-Package Aspose.BarCode`) +- ตัวอย่างภาพที่มีบาร์โค้ด **PDF417** — แนะนำให้ใช้ภาพที่มีสัญลักษณ์แบบ compact และ full‑size ผสมกัน ตัวอย่างใช้ไฟล์ `CompactPdf417.png`, แต่ไฟล์ PNG/JPEG ใดก็ได้ +- IDE ที่คุณชอบ (Visual Studio, Rider, หรือ VS Code) + +เท่านี้—ไม่ต้องมี DLL เพิ่มเติม, ไม่ต้องมี dependency แบบ native. Aspose.BarCode เป็นโค้ดที่จัดการด้วย .NET อย่างเดียว, จึงสามารถใส่ลงในโปรเจกต์ .NET ใดก็ได้ + +![Read multiple barcodes C# console output](image.png "Read multiple barcodes C# console output") + +*Image alt text: Read multiple barcodes C# – screenshot of console displaying compact mode status for PDF417 barcodes.* + +## Step 1 – Install and Reference the BarCodeReader C# Library + +สิ่งแรกที่ต้องทำคือให้ได้ **BarCodeReader C#** class ที่ทำหน้าที่ถอดรหัส เปิดเทอร์มินัล (หรือ Package Manager Console) แล้วรัน: + +```powershell +dotnet add package Aspose.BarCode +``` + +หรือถ้าคุณอยู่ใน NuGet manager ของ Visual Studio, เพียงค้นหา *Aspose.BarCode* แล้วกด **Install**. การทำเช่นนี้จะดึงเวอร์ชันล่าสุดที่เสถียร (ณ กรกฎาคม 2026 เวอร์ชัน 23.9) ซึ่งรองรับ PDF417, QR, DataMatrix, และสัญลักษณ์อื่น ๆ อีกหลายสิบแบบ + +ทำไมถึงสำคัญ: ไลบรารีนี้ทำหน้าที่แยกส่วนการประมวลผลภาพ, การแก้ไขข้อผิดพลาด, และการจดจำสัญลักษณ์ออกจากคุณ คุณอาจเขียนสแกนเนอร์ของตนเอง, แต่จะต้องใช้เวลาหลายสัปดาห์เพื่อจัดการกับกรณีขอบ. Aspose ให้ **C# barcode library** ที่ผ่านการทดสอบจริงและอัปเดตสำหรับ .NET runtime สมัยใหม่ + +## Step 2 – Set Up a Minimal Console Project + +สร้างแอปคอนโซลใหม่เพื่อให้โฟกัสที่โลจิกของบาร์โค้ดโดยไม่มี UI รบกวน: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +แทนที่ไฟล์ `Program.cs` ที่สร้างโดยอัตโนมัติด้วยตัวอย่างเต็มด้านล่างนี้ คุณสามารถใช้ namespace เริ่มต้นหรือเปลี่ยนชื่อก็ได้—ไม่มีข้อกำหนดพิเศษ + +## Step 3 – Write the Full “Read Multiple Barcodes C#” Implementation + +ด้านล่างเป็นโค้ด **ครบถ้วน, รันได้** ตัวอย่างที่รวมขั้นตอนสี่ขั้นตอนจากสคริปต์ต้นฉบับ, เพิ่มการจัดการข้อผิดพลาด, และพิมพ์ข้อมูลวินิจฉัยที่เป็นประโยชน์ + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Why This Code Works + +- **`BarCodeReader`** เป็นหัวใจหลักจาก **BarCodeReader C#** API. มันเปิดภาพ, ทำการพรี‑โปรเซส, และค้นหาสัญลักษณ์ตามประเภทที่คุณระบุ +- **`ReadBarCodes()`** คืนค่าเป็นอาร์เรย์, ไม่ใช่ผลลัพธ์เดียว. นี่คือกุญแจสำคัญของ **read multiple barcodes C#**—เมธอดจะรวบรวมทุกการจับคู่ที่พบโดยอัตโนมัติ +- **`result.Extended.Pdf417.IsTruncated`** บอกว่า PDF417 อยู่ในโหมด *compact* (หรือที่เรียกว่า truncated) หรือไม่. ธงนี้มีเฉพาะสำหรับ PDF417, ดังนั้นเราจึงใช้ตัวดำเนินการ null‑conditional (`?.`) เพื่อหลีกเลี่ยงข้อยกเว้นหากสัญลักษณ์อื่นเข้ามา +- ลูป `foreach` พิมพ์ทั้งข้อความที่ถอดรหัสและสถานะ compact, ให้คุณตรวจสอบความถูกต้องได้อย่างรวดเร็ว + +## Step 4 – Handling Different Barcode Types (Optional) + +หากภาพของคุณอาจมีบาร์โค้ดประเภทอื่นนอกจาก PDF417, เพียงเปลี่ยนอาร์กิวเมนต์ที่สองของ `BarCodeReader` เป็น `DecodeType.AllSupported`. ลูปจะยังคงเหมือนเดิม, แต่คุณต้องตรวจสอบว่า `result.Extended` เป็น null หรือไม่สำหรับสัญลักษณ์ที่ไม่ใช่ PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +การปรับเล็กน้อยนี้ทำให้ **C# barcode library** ของคุณกลายเป็นสแกนเนอร์สากล, เหมาะสำหรับชุดงานที่มีสัญลักษณ์ผสมหลายประเภท + +## Step 5 – Edge Cases and Best‑Practice Tips + +### 1️⃣ No Barcodes Detected +หาก `ReadBarCodes()` คืนค่าอาร์เรย์ว่าง, สาเหตุที่พบบ่อยที่สุดคือ: + +- เส้นทางไฟล์ไม่ถูกต้องหรือไม่มีสิทธิ์อ่าน +- คุณภาพภาพต่ำ (เบลอ, คอนทราสต์ต่ำ). พิจารณาพรี‑โปรเซสด้วย `reader.ImagePreprocessingOptions` (เช่น `reader.ImagePreprocessingOptions.Denoise = true;`) + +### 2️⃣ Extremely Large Images +การประมวลผลภาพ 10 MP อาจใช้หน่วยความจำมาก. คุณสามารถจำกัดพื้นที่สแกนได้: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ Thread‑Safety +`BarCodeReader` implements `IDisposable` และ **ไม่** thread‑safe. สร้างอินสแตนซ์แยกสำหรับแต่ละเธรดหากต้องการประมวลผลแบบขนาน + +### 4️⃣ Licensing +Aspose.BarCode ทำงานในโหมด trial โดยอัตโนมัติ, แต่คุณจะเห็นลายน้ำบนภาพผลลัพธ์. สำหรับการใช้งานจริง, ตั้งค่าไลเซนส์ตั้งแต่ต้น: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Logging +เมื่อคุณนำโค้ดนี้ไปผสานในบริการขนาดใหญ่, แทนที่ `Console.WriteLine` ด้วย logger ที่มีโครงสร้าง (Serilog, NLog). วิธีนี้คุณสามารถบันทึก `CodeText`, `CodeType`, และ `IsTruncated` เป็นฟิลด์สำหรับการวิเคราะห์ต่อไปได้ + +## Full Working Example Recap + +รวมทั้งหมดเข้าด้วยกัน, นี่คือ *โปรแกรมเต็ม* ที่คุณสามารถคัดลอก‑วางลงใน `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## What Should You Learn Next? + + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/thai/net/one-dimensional-barcode-types/_index.md b/barcode/thai/net/one-dimensional-barcode-types/_index.md index dcd2c96bb..5b498161e 100644 --- a/barcode/thai/net/one-dimensional-barcode-types/_index.md +++ b/barcode/thai/net/one-dimensional-barcode-types/_index.md @@ -24,7 +24,7 @@ url: /th/net/one-dimensional-barcode-types/ ## การกำหนดค่ารหัส 128 - ก่อนอื่นมาดำดิ่งกันก่อน**Code 128**บาร์โค้ดประเภทอเนกประสงค์นี้สามารถเข้ารหัสข้อมูลได้หลากหลาย ทำให้เป็นบาร์โค้ดยอดนิยมในหมู่นักพัฒนา ด้วย Aspose.BarCode คุณจะพบกับกระบวนการบูรณาการที่ราบรื่น ทำตามคำแนะนำทีละขั้นตอนของเราเพื่อเริ่มต้น + ก่อนแรกมาดำดิ่งกันก่อน**Code 128**บาร์โค้ดประเภทอเนกประสงค์นี้สามารถเข้ารหัสข้อมูลได้หลากหลาย ทำให้เป็นบาร์โค้ดยอดนิยมในหมู่นักพัฒนา ด้วย Aspose.BarCode คุณจะพบกับกระบวนการบูรณาการที่ราบรื่น ทำตามคำแนะนำทีละขั้นตอนของเราเพื่อเริ่มต้น ## การกำหนดค่ารหัส 39 @@ -78,6 +78,8 @@ url: /th/net/one-dimensional-barcode-types/ เรียนรู้วิธีจัดการกับข้อยกเว้นในขณะที่สร้างบาร์โค้ดหนึ่งมิติโดยใช้ Aspose.BarCode สำหรับ .NET คำแนะนำทีละขั้นตอนนี้ช่วยให้มั่นใจได้ถึงโซลูชันบาร์โค้ดที่ทนทานต่อข้อผิดพลาด เริ่มตอนนี้เลย! ### [การกำหนดค่าอัตราส่วนกว้าง-แคบหนึ่งมิติ](./one-dimensional-wide-narrow-ratio-configuration/) สร้างบาร์โค้ดแบบกำหนดเองได้อย่างง่ายดายด้วย Aspose.BarCode สำหรับ .NET คำแนะนำทีละขั้นตอนสำหรับการกำหนดค่าอัตราส่วนกว้าง-แคบหนึ่งมิติ +### [อ่านบาร์โค้ดจากภาพ – ตัวอย่างการอ่านบาร์โค้ด C#](./read-barcode-from-image-c-barcode-reader-example/) +เรียนรู้วิธีอ่านบาร์โค้ดจากภาพใน C# ด้วย Aspose.BarCode ## บทสรุป @@ -89,4 +91,4 @@ url: /th/net/one-dimensional-barcode-types/ {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/thai/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/thai/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..dbe09a835 --- /dev/null +++ b/barcode/thai/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,277 @@ +--- +category: general +date: 2026-07-30 +description: อ่านบาร์โค้ดจากภาพโดยใช้ Aspose.BarCode สำหรับ .NET – ตัวอย่างเต็มของการอ่านบาร์โค้ดด้วย + C# ที่แสดงวิธีถอดรหัสบาร์โค้ด Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: th +lastmod: 2026-07-30 +og_description: อ่านบาร์โค้ดจากภาพด้วย Aspose.BarCode สำหรับ .NET ตัวอย่างการอ่านบาร์โค้ดด้วย + C# แบบขั้นตอนต่อขั้นตอนนี้แสดงวิธีดึงข้อมูลเมตาดาต้า Macro PDF417 ทั้งหมด +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: อ่านบาร์โค้ดจากภาพ – ตัวอย่างเต็มของโปรแกรมอ่านบาร์โค้ด C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: อ่านบาร์โค้ดจากภาพ – ตัวอย่างการอ่านบาร์โค้ดด้วย C# +url: /th/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# อ่านบาร์โค้ดจากภาพ – ตัวอย่างตัวอ่านบาร์โค้ด C# + +ต้องการ **อ่านบาร์โค้ดจากภาพ** ในแอปพลิเคชัน C# หรือไม่? คุณมาถูกที่แล้ว ในบทแนะนำนี้เราจะพาคุณผ่าน *c# barcode reader example* แบบครบถ้วนที่ใช้ไลบรารี Aspose.BarCode for .NET เพื่อถอดรหัสบาร์โค้ด Macro PDF417 และดึงข้อมูลส่วนขยายทั้งหมดที่มาตรฐานกำหนด + +ลองนึกภาพว่าคุณเพิ่งสแกนฉลากการจัดส่ง, บัตรโดยสาร, หรือบัตรประจำตัวรัฐบาลที่ฝังส่วน Macro PDF417 คุณต้องการดึงไฟล์ ID, จำนวนส่วน, เวลาต่าง ๆ, และอาจรวมถึงชื่อผู้ส่ง—ทั้งหมดโดยไม่ต้องออกจากโค้ด นั่นคือสิ่งที่เราจะทำให้สำเร็จ และเราจะทำในรูปแบบที่คัดลอก‑วางง่ายเข้าสู่โปรเจกต์ของคุณ + +--- + +## สิ่งที่คุณจะได้เรียนรู้ + +- วิธีเพิ่มแพคเกจ Aspose.BarCode NuGet ลงในโปรเจกต์ .NET +- วิธีเปิดไฟล์ภาพที่มีบาร์โค้ด Macro PDF417 +- วิธีวนลูปผลลัพธ์ของ **อ่านบาร์โค้ดจากภาพ** และเข้าถึงทุกฟิลด์ส่วนขยาย +- เคล็ดลับการจัดการหลายส่วน, การตรวจสอบเช็คซัม, และการแก้ไขปัญหาที่พบบ่อย + +เมื่อจบคู่มือคุณจะมีแอปคอนโซลทำงานที่พิมพ์เมตาดาต้า Macro PDF417 ทั้งหมด พร้อมนำไปผสานกับระบบใหญ่เช่นตัวติดตามสินค้าหรือไพป์ไลน์การจัดการเอกสาร + +--- + +## ข้อกำหนดเบื้องต้น + +ก่อนจะเริ่ม โปรดตรวจสอบว่าคุณมีสิ่งต่อไปนี้ + +| ความต้องการ | เหตุผลที่สำคัญ | +|-------------|----------------| +| .NET 6.0 SDK หรือรุ่นใหม่กว่า (เวอร์ชันล่าสุดใดก็ได้) | ให้ runtime สำหรับแอปคอนโซล | +| Visual Studio 2022 (หรือ VS Code พร้อมส่วนขยาย C#) | ทำให้การแก้ไขและดีบักเป็นเรื่องง่าย | +| Aspose.BarCode for .NET (ทดลองใช้ฟรีหรือแบบลิขสิทธิ์) | ไลบรารีที่ทำการถอดรหัสบาร์โค้ดจริง | +| ไฟล์ภาพ (`MacroPdf417Meta.png`) ที่มีบาร์โค้ด Macro PDF417 | แหล่งข้อมูลที่เราจะอ่าน | + +หากคุณยังไม่มี Aspose.BarCode คุณสามารถดึงจาก NuGet ได้: + +```bash +dotnet add package Aspose.BarCode +``` + +บรรทัดเดียวนี้จะติดตั้งทุกอย่างที่คุณต้องการ รวมถึง `BarCodeReader`, `DecodeType` และชุดคุณสมบัติ `Extended` ที่เราจะสำรวจต่อไป + +--- + +## ขั้นตอนที่ 1 – ตั้งค่าโปรเจกต์และนำเข้าไลบรารี + +สร้างโปรเจกต์คอนโซลใหม่ (หรือวางโค้ดลงในโปรเจกต์ที่มีอยู่) คำสั่ง `using` มีความสำคัญ เพราะมันทำให้คลาสบาร์โค้ดเข้าถึงได้ + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **เคล็ดลับ:** หากคุณใช้ Visual Studio IDE จะเสนอให้เพิ่มคำสั่ง `using` ที่ขาดหายโดยอัตโนมัติ—แค่กด *Ctrl+.`* + +--- + +## ขั้นตอนที่ 2 – เตรียมเส้นทางไฟล์ภาพ + +การกำหนดเส้นทางแบบคงที่ทำได้สำหรับการสาธิตอย่างรวดเร็ว แต่ในสภาพแวดล้อมจริงคุณอาจรับค่าเป็นอาร์กิวเมนต์บรรทัดคำสั่งหรือการตั้งค่า เพื่อความชัดเจนเราจะใช้วิธีง่าย ๆ นี้ + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **ทำไมต้องสำคัญ:** `BarCodeReader` ต้องการตำแหน่งไฟล์ที่ถูกต้อง; เส้นทางผิดจะทำให้เกิด `FileNotFoundException` ก่อนที่การถอดรหัสจะเริ่มต้นเลย + +--- + +## ขั้นตอนที่ 3 – **อ่านบาร์โค้ดจากภาพ** และสกัดรายละเอียด Macro PDF417 + +ตอนนี้เรามาถึงหัวใจของ **c# barcode reader example** เราจะสร้างอินสแตนซ์ `BarCodeReader` ด้วยแฟล็ก `DecodeType.MacroPdf417` วนลูปผลลัพธ์ทั้งหมด (อาจมีบาร์โค้ดมากกว่าหนึ่งตัวในภาพเดียว) และพิมพ์คุณสมบัติส่วนขยายทุกอย่าง + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### สิ่งที่โค้ดทำ (ทำไม ไม่ใช่แค่ทำอย่างไร) + +1. **`using` block** – รับประกันว่าทรัพยากรเนทีฟ (ไฟล์แฮนด์เดิล, หน่วยความจำตัวถอดรหัส) จะถูกปล่อยทันทีหลังการทำงาน การข้ามขั้นตอนนี้อาจทำให้ไฟล์ถูกล็อกบน Windows +2. **`DecodeType.MacroPdf417`** – บอก Aspose ให้มองหา Symbol Macro PDF417 โดยเฉพาะ; ประเภทบาร์โค้ดอื่นจะถูกละเว้น ทำให้การสแกนเร็วขึ้น +3. **`ReadBarCodes()`** – คืนคอลเลกชันเพราะภาพอาจมีหลายส่วน Macro PDF417 (เช่นเอกสารหลายหน้าแยกเป็นบาร์โค้ดหลายตัว) +4. **`macroResult.Extended?.Pdf417`** – อ็อบเจ็กต์ `Extended` อาจเป็น null; ตัวดำเนินการนำทางปลอดภัย (`?.`) ป้องกัน `NullReferenceException` หากบาร์โค้ดไม่มีข้อมูลส่วนขยาย +5. **Printing each field** – ให้คุณมองเห็นไฟล์ไอดี, ลำดับส่วน, การตรวจสอบเช็คซัม, และฟิลด์ข้อความเพิ่มเติมเช่นผู้ส่งหรือผู้รับ + +--- + +## ขั้นตอนที่ 4 – รันแอปพลิเคชันและตรวจสอบผลลัพธ์ + +คอมไพล์และรันโปรแกรม: + +```bash +dotnet run +``` + +หากทุกอย่างเชื่อมต่อถูกต้อง คุณควรเห็นผลลัพธ์คล้ายกับตัวอย่างต่อไปนี้ในคอนโซลของคุณ: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **หมายเหตุ:** ค่าที่แสดงขึ้นอยู่กับบาร์โค้ดที่คุณถอดรหัส หากคุณได้รับข้อความ “No Macro PDF417 extension data found” ให้ตรวจสอบว่าภาพจริง ๆ มีโค้ด Macro PDF417 และคุณใช้ `DecodeType` ที่ถูกต้อง + +--- + +## การจัดการหลายส่วนและการตรวจสอบ (ขั้นสูง) + +Macro PDF417 ถูกออกแบบมาสำหรับข้อมูลขนาดใหญ่ที่แบ่งเป็นหลายสัญลักษณ์ เมื่อคุณเจอมากกว่าหนึ่งส่วน คุณมักต้อง: + +1. **รวบรวมทุกส่วน** ลงในดิกชันนารีโดยใช้ `SegmentID` เป็นคีย์ +2. **จัดเรียง** ตาม `SegmentID` เพื่อประกอบไฟล์ต้นฉบับใหม่ +3. **ตรวจสอบ** `Checksum` กับข้อมูลที่ต่อกัน (Aspose ทำเช่นนี้ภายใน แต่คุณสามารถรัน CRC เพิ่มเติมได้หากต้องการความปลอดภัยมากขึ้น) + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +คุณต้องเขียนฟังก์ชัน `AssembleSegments` และ `VerifyChecksum` ตามรูปแบบข้อมูลของคุณ—โดยทั่วไปอาจเป็นการต่ออาเรย์ไบต์แล้วทำ CRC‑16 + +--- + +## ปัญหาที่พบบ่อยและวิธีหลีกเลี่ยง + +| อาการ | สาเหตุที่เป็นไปได้ | วิธีแก้ | +|-------|-------------------|--------| +| `null` returned from `macroResult.Extended` | ภาพมี PDF417 ปกติ ไม่ใช่เวอร์ชัน Macro | ใช้ `DecodeType.Pdf417` แทน หรือยืนยันแหล่งบาร์โค้ด | +| ไม่มีผลลัพธ์เลย | `imagePath` ผิดหรือไฟล์ไม่สามารถเข้าถึงได้ | ตรวจสอบเส้นทางไฟล์อีกครั้ง; ให้แน่ใจว่าแอปมีสิทธิ์อ่าน | +| Exception “Object disposed” | พยายามใช้ `reader` หลังจากบล็อก `using` สิ้นสุด | เก็บการประมวลผลทั้งหมดไว้ภายใน `...` + +--- + +## คุณควรเรียนรู้อะไรต่อไป? + +บทแนะนำต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดและต่อยอดจากเทคนิคในคู่มือนี้ แต่ละแหล่งรวมโค้ดทำงานเต็มรูปแบบพร้อมคำอธิบายขั้นตอนเพื่อช่วยคุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจวิธีการทำงานแบบอื่นในโปรเจกต์ของคุณ + +- [การเขียนโปรแกรม DataMatrix Reader ด้วย Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [การกำหนดค่า DotCode Reader ด้วย Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [วิธีอ่านบาร์โค้ด DataMatrix ด้วย Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/turkish/net/compact-pdf417-encoding/_index.md b/barcode/turkish/net/compact-pdf417-encoding/_index.md index ea67f016b..ef1931de7 100644 --- a/barcode/turkish/net/compact-pdf417-encoding/_index.md +++ b/barcode/turkish/net/compact-pdf417-encoding/_index.md @@ -28,7 +28,7 @@ Eğer **pdf417 nasıl oluşturulur** net konusunda, adım‑adım bir rehberde d ## Kompakt PDF417 Kodu Nedir? -Kompakt PDF417, dikey doğrusal barkodlara göre daha küçük bir alana, daha fazla bilgi depolayan, yüksek kapasiteye sahip iki boyutlu bir sembolojidir. Yığılmış satır ve sütunlardan oluşan bir ızgara kullanır, her hücre birden fazla kodkelime (kod kelimesi) içerir ve sembollerin bir kısmı hasar görse bile verinin okunabilir saklanmasını sağlayan izin veren hata oranları seçeneklerine sahiptir. +Kompakt PDF417, dikey doğrusal barkodlara göre daha küçük bir alana, daha fazla bilgi depolayan, yüksek kapasiteye sahip iki boyutlu bir sembolojidir. Yığılmış satır ve sütunlardan oluşan bir ızgara kullanır, her hücre birden fazla kodkelime (kod kelime) içerir ve sembollerin bir kısmı hasar görse bile verinin okunabilir saklanmasını sağlayan izin veren hata oranları seçeneklerine sahiptir. ## Neden Aspose.BarCode for .NET ile Kompakt PDF417 Kullanılmalı? @@ -83,6 +83,12 @@ Temellerin ötesinde, iş akışınızı hızlandıracak bazı pratik ipuçları ### [Compact PDF417 Barkodları Oluşturma](./compact-pdf417-basic-configuration/) Aspose.BarCode for .NET'i kullanarak Compact PDF417 barkodlarını nasıl oluşturacağınızı öğrenin. Adım‑adım talimatları ve kod örnekleri içeren kapsamlı bir rehber. +### [C# ile Aspose kullanarak PDF417 Barkod Görüntüsü Oluşturma](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Aspose.BarCode for .NET ile C# dilinde PDF417 barkod görseli oluşturmayı öğrenin. + +### [PDF417 ile Çoklu Barkod Okuma C# – Tam Kılavuz](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Aspose.BarCode for .NET kullanarak C# ile birden fazla PDF417 barkodunu okuma adımlarını öğrenin. + ## Sıkça Sorulan Sorular **Q:** Compact PDF417 barkodunda saklayabileceğim maksimum veri miktarı nedir? @@ -111,4 +117,4 @@ Aspose.BarCode for .NET'i kullanarak Compact PDF417 barkodlarını nasıl oluşt {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/turkish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/turkish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..72a676044 --- /dev/null +++ b/barcode/turkish/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,176 @@ +--- +category: general +date: 2026-07-30 +description: C# ile Aspose kullanarak PDF417 barkod görüntüsü nasıl oluşturulur. Aspose + ile barkod oluşturmayı, MacroPDF417 meta verilerini ayarlamayı ve PNG olarak kaydetmeyi + adım adım öğrenin. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: tr +lastmod: 2026-07-30 +og_description: Aspose ile C#’ta PDF417 barkod görüntüsü nasıl oluşturulur. Aspose + kullanarak bir barkod oluşturmak, MacroPDF417 meta verilerini yapılandırmak ve bir + PNG dosyası çıkarmak için bu kapsamlı rehberi izleyin. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Aspose ile C#'ta PDF417 Barkod Görüntüsü Nasıl Oluşturulur +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Aspose ile C#'ta PDF417 Barkod Görüntüsü Nasıl Oluşturulur +url: /tr/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# ile Aspose kullanarak PDF417 Barkod Görüntüsü Nasıl Oluşturulur + +C# ile Aspose kullanarak PDF417 barkod görüntüsü oluşturmak, yüksek yoğunluklu veri kodlamasıyla uğraşan herkes için sık karşılaşılan bir zorluktur. Bu rehberde her adımı adım adım inceleyeceğiz—üreteci kurma, MacroPDF417 meta verilerini ayarlama ve sonunda net bir PNG dosyası kaydetme. + +Eğer **generate barcode image c#** denemiş ve boş bir tuval ya da okunamayan bir tarama ile sonuçlanmışsanız, yalnız değilsiniz. İyi haber, Aspose.BarCode tüm süreci neredeyse ağrısız hâle getiriyor ve bu makalenin sonunda **create barcode with Aspose** yeteneğine sahip olacaksınız, her türlü kurumsal iş akışı için. + +## Öğrenecekleriniz + +- .NET için Aspose.BarCode kütüphanesini kurun ve referans verin. +- Özel bir yük ile PDF417 üreteci başlatın. +- Dosya kimliği, segment kimliği ve zaman damgası gibi MacroPDF417‑özel alanları uygulayın. +- Sonucu raporlara veya mobil uygulamalara gömebileceğiniz bir PNG görüntüsü olarak dışa aktarın. +- Yaygın tuzakları gidermek için ipuçları (ör. yanlış modül genişliği, eksik segmentler). + +MacroPDF417 ile ilgili önceden bir deneyim gerekmez; C# ve Visual Studio hakkında temel bir anlayış yeterli olacaktır. + +## Önkoşullar + +| Requirement | Reason | +|-------------|--------| +| .NET 6.0 veya üzeri | Güncel LTS sürümü, Aspose tarafından tam desteklenir | +| Visual Studio 2022 (veya herhangi bir IDE) | Örneği derlemek ve çalıştırmak için | +| Aspose.BarCode for .NET (NuGet) | `BarcodeGenerator` ve PDF417 desteği sağlar | + +Kütüphaneyi NuGet üzerinden ekleyebilirsiniz: + +```bash +dotnet add package Aspose.BarCode +``` + +Temel hazırlıklar tamamlandığına göre, koda dalalım. + +## C# ile PDF417 Barkod Görüntüsü Oluşturma – Kurulum + +İlk adım, **MacroPdf417** kodlama türü için bir `BarcodeGenerator` örneği oluşturmaktır. Bu nesne, modül boyutundan MacroPDF417'nin beklediği zengin meta verilere kadar tüm yapılandırma seçeneklerini tutar. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Neden önemli:** `EncodeTypes.MacroPdf417` Aspose'a, büyük dosyalar veya toplu işleme için mutlaka gerekli olan, birden çok segmente bölünebilen bir PDF417 barkodu üretmesini söyler. + +## Temel Görünümü Yapılandırma + +Okunabilir bir barkod, doğru görsel ayarlarla başlar. `XDimension` her bir modülün (küçük siyah/beyaz kareler) genişliğini kontrol eder, `Columns` ise barkodun kaç sütun genişliğinde olacağını belirler. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **İpucu:** Barkod bir fiş yazıcısında çok yoğun görünüyorsa, `XDimension` değerini `3` veya `4` olarak artırın. +- **Tüm:** `Columns` değerini çok düşük ayarlamak, barkodun görüntü sınırlarını aşmasına ve okunamayan bir taramaya yol açabilir. + +## MacroPDF417'ye Özel Meta Verileri Ayarlama + +MacroPDF417, dosya seviyesindeki bilgileri doğrudan barkoda gömmenizi sağlar. Bu, büyük belge gönderilerini izlemek veya bir dosyayı birden fazla taramaya bölmek için mükemmeldir. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Her alanın işlevi:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | Tüm dosya için benzersiz tanımlayıcı. | +| `MacroPdf417SegmentID` | Mevcut segmentin indeksi (0'dan başlar). | +| `MacroPdf417SegmentsCount` | Dosyanın bölündüğü toplam segment sayısı. | +| `MacroPdf417FileName` | İnsan tarafından okunabilir isim, denetim günlükleri için faydalı. | +| `MacroPdf417Checksum` | Veri bütünlüğü doğrulaması için 16‑bit CRC. | +| `MacroPdf417FileSize` | Bayt cinsinden orijinal dosya boyutu, alıcıların tampon ayırmasına yardımcı olur. | +| `MacroPdf417TimeStamp` | Dosyanın oluşturulduğu tarih/saati. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Gönderici/alıcıyı tanımlayan isteğe bağlı dizeler. | +| `MacroPdf417Terminator` | Son segmenti işaretler; doğru çözümleme için gereklidir. | + +> **Neden uğraşalım?** Bu alanlar olmadan, bir tarayıcı yalnızca ham veriyi okuyabilir, bağlamı değil. Meta veri eklemek, alıcı sistemin orijinal dosyayı otomatik olarak yeniden birleştirebilmesini sağlar. + +## Barkodu PNG Olarak Kaydet + +Üreteç tam olarak yapılandırıldıktan sonra, görüntüyü kaydetmek tek satırda yapılabilir: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Dosya formatı:** PNG kayıpsızdır, her modülün tarayıcılar için net kalmasını sağlar. +- **Alternatif:** Daha küçük bir dosya boyutuna ihtiyacınız varsa `BarCodeImageFormat.Jpeg` kullanın, ancak okunabilirlikte hafif bir kayıp bekleyin. + +### Beklenen Çıktı + +Kod parçacığını çalıştırdıktan sonra, belirtilen klasörde `MacroPdf417Meta.png` dosyasını bulacaksınız. Aşağıdaki görsele benzer bir şekilde görünmelidir: + +![Aspose ile oluşturulmuş PDF417 barkodu](path/to/your/image.png){alt="C# ile PDF417 barkod görüntüsü nasıl oluşturulur"} + +Görüntü, kodlanmış yük ve gömülü MacroPDF417 meta verileriyle birlikte, yoğun bir siyah ve beyaz kare ızgarası içerir. + +## Tam Çalışan Örnek + +Aşağıda, tamamen kopyala‑yapıştır hazır program yer almaktadır. Herhangi bir .NET 6+ projesiyle derlenir ve yalnızca Aspose.BarCode NuGet paketini gerektirir. + + + +## Sonra Ne Öğrenmelisiniz? + +Aşağıdaki öğreticiler, bu rehberde gösterilen tekniklere dayanan yakından ilgili konuları kapsar. Her kaynak, ek API özelliklerini öğrenmenize ve kendi projelerinizde alternatif uygulama yaklaşımlarını keşfetmenize yardımcı olmak için adım adım açıklamalar içeren tam çalışan kod örnekleri sunar. + +- [Nasıl Barcode Oluşturulur – Aspose.BarCode ile Compact PDF417](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Nasıl DataMatrix Barkodları (ECC 200) Aspose.BarCode for .NET ile Oluşturulur](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Nasıl Aspose.BarCode for .NET kullanarak özel en-boy oranı ile Aztec barkodu oluşturulur](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/turkish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/turkish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..a4c285849 --- /dev/null +++ b/barcode/turkish/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode kullanarak C# ile birden fazla barkodu okuyun. PDF417'yi + nasıl çözeceğinizi, kompakt modu nasıl tespit edeceğinizi ve tek bir görüntüde birçok + barkodu nasıl yöneteceğinizi adım adım öğrenin. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: tr +lastmod: 2026-07-30 +og_description: Aspose.BarCode ile C#'ta birden fazla barkodu okuyun. Bu kılavuz, + bir görüntüdeki tüm barkodları nasıl çözeceğinizi, kompakt modu nasıl kontrol edeceğinizi + ve .NET uygulamalarına nasıl entegre edeceğinizi gösterir. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: C# ile Çoklu Barkod Okuma – PDF417 için Tam Kılavuz +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: C# ile Birden Çok Barkodu Okuma – PDF417 ile Tam Rehber +url: /tr/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Birden Çok Barkodu C# ile Okuma – PDF417 Tam Kılavuzu + +Tek bir görüntüden **read multiple barcodes C#** nasıl okunur hiç merak ettiniz mi? Belki bir grup gönderi etiketi, bir bilet kolajı ya da birden fazla kodu tek bir resimde toplayan bir PDF417 belgeniz vardır. Günlük işimde tam da bu sorunla karşılaştım—Aspose.BarCode'in `BarCodeReader`'ını keşfedene kadar. Bu eğitim, bir görüntüdeki tüm barkodları çözmeyi, her PDF417'nin sıkıştırılmış (kırpılmış) modda olup olmadığını belirlemeyi ve sonuçları temiz bir şekilde işlemeyi adım adım gösterecek. + +Ayrıca birkaç ekstra ipucu da ekleyeceğiz—örneğin görüntü farklı barkod sembolleri içerdiğinde ne yapılacağı ya da tarama hiç sonuç vermediğinde ne yapılacağı gibi. Sonuna geldiğinizde, **reads multiple barcodes C#** gibi bir uzmanın yapacağı gibi çalışan hazır bir konsol uygulamanız olacak. + +## Gereksinimler + +- **.NET 6.0** SDK veya daha yeni (kod .NET Framework 4.6+ ile de çalışır, ancak .NET 6 ideal noktadır). +- **Aspose.BarCode for .NET** NuGet paketi (`Install-Package Aspose.BarCode`). +- PDF417 barkodları içeren bir örnek görüntü—tercihen sıkıştırılmış ve tam boyutlu sembolleri karıştıran bir tane. Eğitim `CompactPdf417.png` dosyasını kullanıyor, ancak herhangi bir PNG/JPEG yeterli. +- Favori IDE'niz (Visual Studio, Rider veya VS Code). + +Hepsi bu kadar—ekstra DLL yok, yerel bağımlılık yok. Aspose.BarCode saf yönetilen kod olduğundan, herhangi bir .NET projesine ekleyebilirsiniz. + +![Birden Çok Barkodu C# Konsol Çıktısı](image.png "Birden Çok Barkodu C# Konsol Çıktısı") + +*Görsel alt metni: Birden Çok Barkodu C# – PDF417 barkodlarının sıkıştırılmış mod durumunu gösteren konsol ekran görüntüsü.* + +## 1. Adım – BarCodeReader C# Kütüphanesini Kurun ve Referans Verin + +İlk olarak, kod çözmeyi sağlayan **BarCodeReader C#** sınıfına ihtiyacınız var. Terminalinizi (veya Package Manager Console) açın ve şu komutu çalıştırın: + +```powershell +dotnet add package Aspose.BarCode +``` + +Veya Visual Studio'nun NuGet yöneticisi içindeyseniz, *Aspose.BarCode*'u aratıp **Install**'a tıklayın. Bu, en son kararlı sürümü (Temmuz 2026 itibarıyla 23.9) getirir; PDF417, QR, DataMatrix ve diğer onlarca sembolü destekler. + +Neden önemli: kütüphane görüntü işleme, hata düzeltme ve sembol tanıma gibi zor işleri soyutlar. Kendi tarayıcınızı yazabilirsiniz, ancak kenar durumlarıyla haftalarca uğraşmak zorunda kalırsınız. Aspose, modern .NET çalışma zamanları için güncellenmiş, **C# barcode library**'si sunar. + +## 2. Adım – Minimal Bir Konsol Projesi Oluşturun + +UI gürültüsü olmadan barkod mantığına odaklanabilmek için yeni bir konsol uygulaması oluşturun: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Oluşturulan `Program.cs` dosyasını aşağıdaki tam örnekle değiştirin. Varsayılan ad alanını tutabilir ya da yeniden adlandırabilirsiniz—özel bir şey gerekmez. + +## 3. Adım – Tam “Read Multiple Barcodes C#” Uygulamasını Yazın + +Aşağıda **tam, çalıştırılabilir** bir kod örneği bulunuyor. Orijinal parçacığın dört adımını kapsar, hata yönetimi ekler ve faydalı tanı bilgileri yazdırır. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Bu Kod Neden Çalışıyor + +- **`BarCodeReader`**, **BarCodeReader C#** API'sinin temelidir. Görüntüyü açar, ön‑işleme uygular ve belirttiğiniz tipteki sembolleri arar. +- **`ReadBarCodes()`** bir dizi döndürür, tek bir sonuç değil. Bu, **reading multiple barcodes C#** için kilit noktadır—metot bulduğu tüm eşleşmeleri otomatik olarak toplar. +- **`result.Extended.Pdf417.IsTruncated`** PDF417'nin *compact* (kısaltılmış) modda olup olmadığını gösterir. Bu bayrak yalnızca PDF417 için vardır, bu yüzden başka bir sembol geldiğinde istisna almamak için null‑koşullu operatör (`?.`) ile koruruz. +- `foreach` döngüsü hem çözülen metni hem de sıkıştırma durumunu yazdırır, size hızlı bir doğrulama sağlar. + +## 4. Adım – Farklı Barkod Türlerini İşleme (Opsiyonel) + +Görüntünüz PDF417'den başka barkodlar da içerebilir, sadece `BarCodeReader`'ın ikinci argümanını `DecodeType.AllSupported` olarak değiştirin. Döngü aynı kalır, ancak PDF417 olmayan semboller için `result.Extended`'in null olmasına karşı koruma eklemeniz gerekir: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Bu küçük değişiklik, **C# barcode library**'inizi evrensel bir tarayıcıya dönüştürür; karışık sembollü toplular için mükemmeldir. + +## 5. Adım – Kenar Durumları ve En İyi Uygulama İpuçları + +### 1️⃣ Barkod Bulunamadı +`ReadBarCodes()` boş bir dizi döndürürse, en yaygın nedenler şunlardır: + +- Yanlış dosya yolu veya eksik okuma izinleri. +- Görüntü kalitesi çok düşük (bulanık, düşük kontrast). `reader.ImagePreprocessingOptions` ile ön‑işleme yapmayı düşünün (örneğin, `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Aşırı Büyük Görüntüler +10 MP bir fotoğrafı işlemek çok bellek tüketebilir. Tarama alanını sınırlayabilirsiniz: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ İş Parçacığı Güvenliği +`BarCodeReader`, `IDisposable`'ı uygular ve **thread‑safe** değildir. Paralel işleme ihtiyacınız varsa, her iş parçacığı için ayrı bir örnek oluşturun. + +### 4️⃣ Lisanslama +Aspose.BarCode kutudan çıktığı gibi deneme modunda çalışır, ancak çıktı görüntüsünde bir filigran görürsünüz. Üretim için lisansı erken ayarlayın: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Günlükleme +Bunu daha büyük bir servise entegre ederken, `Console.WriteLine` yerine yapılandırılmış bir logger (Serilog, NLog) kullanın. Böylece `CodeText`, `CodeType` ve `IsTruncated` alanlarını sonraki analizler için yakalayabilirsiniz. + +## Tam Çalışan Örnek Özeti + +Hepsini bir araya getirerek, `Program.cs` dosyasına kopyalayıp yapıştırabileceğiniz *tam* program aşağıdadır: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Sonra Ne Öğrenmelisiniz? + +Aşağıdaki eğitimler, bu rehberde gösterilen tekniklere dayanan yakından ilgili konuları kapsar. Her kaynak, ek API özelliklerini öğrenmenize ve kendi projelerinizde alternatif uygulama yaklaşımlarını keşfetmenize yardımcı olacak adım adım açıklamalar içeren tam çalışan kod örnekleri sunar. + +- [PDF417 Barkodları Nasıl Oluşturulur – Compact PDF417 Kodlaması](/barcode/english/net/compact-pdf417-encoding/) +- [Barkod Nasıl Oluşturulur – Aspose.BarCode ile Compact PDF417](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Aspose.BarCode for .NET ile DataMatrix Barkodları Nasıl Okunur](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/turkish/net/one-dimensional-barcode-types/_index.md b/barcode/turkish/net/one-dimensional-barcode-types/_index.md index e88a66604..592af143c 100644 --- a/barcode/turkish/net/one-dimensional-barcode-types/_index.md +++ b/barcode/turkish/net/one-dimensional-barcode-types/_index.md @@ -28,7 +28,7 @@ Tek boyutlu barkodlar, veri kodlamanın temelidir ve bilgiyi depolamanın basit ## Kod 39 Yapılandırması - Eğer üretmeniz gerekiyorsa**Code 39** barkodlar, Aspose.BarCode yanınızda. Bu barkod türü endüstriyelden sağlık hizmetlerine kadar çeşitli uygulamalarda yaygın olarak kullanılmaktadır. Geliştiriciler sorunsuz bir kurulum için adım adım kılavuzumuza güvenebilirler. + Eğer üretmeniz gerekiyorsa**Code 39** barkodlar, Aspose.BarCode yanınızda. Bu barkod türü endüstriyetten sağlık hizmetlerine kadar çeşitli uygulamalarda yaygın olarak kullanılmaktadır. Geliştiriciler sorunsuz bir kurulum için adım adım kılavuzumuza güvenebilirler. ## Kod 93 Yapılandırması @@ -78,6 +78,8 @@ Aspose.BarCode for .NET ile .NET'te barkod oluşturmayı öğrenin. Bu kapsamlı Aspose.BarCode for .NET'i kullanarak tek boyutlu barkodlar oluştururken istisnaları nasıl ele alacağınızı öğrenin. Bu adım adım kılavuz, hataya dayanıklı barkod çözümleri sağlar. Şimdi başla! ### [Tek Boyutlu Geniş-Dar Oranlı Yapılandırma](./one-dimensional-wide-narrow-ratio-configuration/) Aspose.BarCode for .NET ile özelleştirilmiş barkodları kolayca oluşturun. Tek boyutlu geniş-dar oranlı yapılandırma için adım adım kılavuz. +### [Görüntüden Barkod Okuma – C# barkod okuyucu örneği](./read-barcode-from-image-c-barcode-reader-example/) +Aspose.BarCode kullanarak C# ile bir görüntüden barkod okuma örneğini adım adım öğrenin. ## Çözüm @@ -89,4 +91,4 @@ Bu makaleyle yalnızca çeşitli tek boyutlu barkod türleri hakkında bilgi edi {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/turkish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/turkish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..4b8935adf --- /dev/null +++ b/barcode/turkish/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,278 @@ +--- +category: general +date: 2026-07-30 +description: Aspose.BarCode for .NET kullanarak görüntüden barkod okuyun – Macro PDF417 + barkodlarını nasıl çözeceğinizi gösteren eksiksiz bir C# barkod okuyucu örneği. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: tr +lastmod: 2026-07-30 +og_description: Aspose.BarCode for .NET ile görüntüden barkod okuyun. Bu adım adım + C# barkod okuyucu örneği, tüm Macro PDF417 meta verilerini nasıl çıkarılacağını + gösterir. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Görüntüden barkod oku – Tam C# barkod okuyucu örneği +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Görüntüden barkod oku – C# barkod okuyucu örneği +url: /tr/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Görüntüden barkod okuma – C# barkod okuyucu örneği + +C# uygulamasında **görüntüden barkod okuma** ihtiyacınız mı var? Doğru yerdesiniz. Bu öğreticide, Aspose.BarCode for .NET kütüphanesini kullanarak bir Macro PDF417 barkodu çözen ve standardın sağladığı tüm genişletilmiş bilgileri çıkaran eksiksiz bir *c# barcode reader example* üzerinden adım adım ilerleyeceğiz. + +Bir nakliye etiketi, biniş kartı veya bir hükümet kimlik kartı gibi Macro PDF417 segmenti içeren bir belgeyi yeni taradığınızı hayal edin. Dosya kimliğini, segment sayısını, zaman damgalarını ve hatta gönderenin adını—kodunuzdan çıkmadan—almak istiyorsunuz. Tam da bunu başaracağız ve bunu kendi projenize kolayca kopyala‑yapıştır yapabileceğiniz bir şekilde yapacağız. + +--- + +## Neler Öğreneceksiniz + +- Aspose.BarCode NuGet paketini bir .NET projesine nasıl ekleyeceğinizi. +- Macro PDF417 barkodu içeren bir görüntü dosyasını nasıl açacağınızı. +- **read barcode from image** sonuçları üzerinde nasıl döngü yapacağınızı ve her genişletilmiş alana nasıl erişeceğinizi. +- Birden fazla segmentle başa çıkma, kontrol toplamlarını doğrulama ve yaygın sorunları giderme ipuçları. + +Bu rehberin sonunda, tüm Macro PDF417 meta verilerini ekrana yazdıran çalışan bir konsol uygulamanız olacak ve envanter izleyicileri veya belge yönetim hatları gibi daha büyük sistemlere entegre etmeye hazır olacak. + +--- + +## Önkoşullar + +Başlamadan önce, aşağıdakilere sahip olduğunuzdan emin olun: + +| Gereksinim | Neden Önemli | +|-------------|----------------| +| .NET 6.0 SDK or later (any recent version works) | Konsol uygulaması için çalışma zamanını sağlar. | +| Visual Studio 2022 (or VS Code with C# extension) | Düzenleme ve hata ayıklamayı zahmetsiz hale getirir. | +| Aspose.BarCode for .NET (free trial or licensed) | Barkodu gerçekten çözen kütüphane. | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | Okuyacağımız kaynak. | + +Henüz Aspose.BarCode'a sahip değilseniz, NuGet üzerinden çekebilirsiniz: + +```bash +dotnet add package Aspose.BarCode +``` + +Bu tek satır, ihtiyacınız olan her şeyi kurar; `BarCodeReader`, `DecodeType` ve keşfedeceğimiz zengin `Extended` özellik kümesini içerir. + +--- + +## Adım 1 – Projeyi kurun ve kütüphaneyi içe aktarın + +Yeni bir konsol projesi oluşturun (veya kodu mevcut bir projeye ekleyin). `using` yönergeleri çok önemlidir; barkod sınıflarını kapsam içine getirir. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Pro ipucu:** Visual Studio kullanıyorsanız, IDE eksik `using` ifadelerini otomatik olarak ekleme teklifinde bulunur—sadece *Ctrl+.`* tuşuna basın. + +--- + +## Adım 2 – Görüntü yolunu hazırlayın + +Mutlak bir yolu sabit kodlamak hızlı bir demo için işe yarar, ancak üretimde muhtemelen bir komut satırı argümanı veya yapılandırma ayarı kabul edersiniz. Açıklık olması için basit tutacağız: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Neden Önemli:** `BarCodeReader`, geçerli bir dosya konumu bekler; hatalı bir yol, herhangi bir çözümleme başlamadan önce `FileNotFoundException` fırlatır. + +--- + +## Adım 3 – **Read barcode from image** ve Macro PDF417 detaylarını çıkarın + +Şimdi **c# barcode reader example**'ın kalbine geliyoruz. `BarCodeReader`'ı `DecodeType.MacroPdf417` bayrağıyla oluşturacağız, tüm sonuçlar üzerinde döngü yapacağız (tek bir görüntüde birden fazla barkod olabilir) ve her genişletilmiş özelliği yazdıracağız. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Kodun ne yaptığı (neden, sadece nasıl değil) + +1. **`using` bloğu** – Yerel kaynakların (dosya tutamaçları, yerel çözücü belleği) işlem sonrası hemen serbest bırakılmasını garanti eder. Bunu atlamak Windows'ta kilitli dosyalara yol açabilir. +2. **`DecodeType.MacroPdf417`** – Aspose'a özellikle Macro PDF417 sembollerini aramasını söyler; diğer barkod tipleri yok sayılır, bu da taramayı hızlandırır. +3. **`ReadBarCodes()`** – Bir koleksiyon döndürür çünkü bir görüntü birden fazla Macro PDF417 segmenti içerebilir (birden fazla barkodla bölünmüş çok sayfalı bir belge düşünün). +4. **`macroResult.Extended?.Pdf417`** – `Extended` nesnesi nullable'dır; güvenli‑gezinim operatörü (`?.`) barkod genişletilmiş veri içermiyorsa `NullReferenceException` oluşmasını önler. +5. **Her alanı yazdırma** – Dosya tanımlayıcısı, segment sırası, kontrol toplamı doğrulaması ve gönderici ya da alıcı gibi isteğe bağlı metin alanları hakkında görünürlük sağlar. + +--- + +## Adım 4 – Uygulamayı çalıştırın ve çıktıyı doğrulayın + +Programı derleyin ve çalıştırın: + +```bash +dotnet run +``` + +Her şey doğru bağlandıysa, konsolunuzda aşağıdakine benzer bir şey görmelisiniz: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Not:** Tam değerler, çözdüğünüz barkoda bağlıdır. “No Macro PDF417 extension data found” mesajını alırsanız, görüntünün gerçekten bir Macro PDF417 kodu içerdiğini ve doğru `DecodeType`'ı kullandığınızı iki kez kontrol edin. + +--- + +## Birden fazla segmentin işlenmesi ve doğrulama (ileri düzey) + +Macro PDF417, birkaç sembole bölünmüş büyük veri yükleri için tasarlanmıştır. Birden fazla segmentle karşılaştığınızda genellikle şunları yapmanız gerekir: + +1. **Tüm segmentleri** `SegmentID` anahtarıyla bir sözlüğe toplayın. +2. **`SegmentID`**'ye göre sıralayın ve orijinal dosyayı yeniden birleştirin. +3. **`Checksum`**'i birleştirilmiş yük ile doğrulayın (Aspose bunu dahili olarak yapar, ancak ekstra güvenlik isterseniz bir CRC yeniden çalıştırabilirsiniz). + +İşte hızlı bir taslak: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +`AssembleSegments` ve `VerifyChecksum` fonksiyonlarını payload formatınıza göre uygulamanız gerekir—genellikle bu sadece bir bayt dizisi birleştirme ve ardından bir CRC‑16 kontrolüdür. + +--- + +## Yaygın tuzaklar ve nasıl önlenir + +| Belirti | Muhtemel neden | Çözüm | +|---------|--------------|-----| +| `null` returned from `macroResult.Extended` | Image contains a plain PDF417, not a Macro version. | Use `DecodeType.Pdf417` instead, or verify the source barcode. | +| No output at all | `imagePath` wrong or file not accessible. | Double‑check the file path; ensure the app has read permissions. | +| Exception “Object disposed” | Attempted to use `reader` after the `using` block. | Tüm işleme `using` bloğu içinde tutun. | + +## Sonra Ne Öğrenmelisiniz? + +Aşağıdaki öğreticiler, bu rehberde gösterilen tekniklere dayanan yakından ilgili konuları kapsar. Her kaynak, ek API özelliklerini öğrenmenize ve kendi projelerinizde alternatif uygulama yaklaşımlarını keşfetmenize yardımcı olmak için adım adım açıklamalar içeren tam çalışan kod örnekleri sunar. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/vietnamese/net/compact-pdf417-encoding/_index.md b/barcode/vietnamese/net/compact-pdf417-encoding/_index.md index 8c0240726..5538f3be6 100644 --- a/barcode/vietnamese/net/compact-pdf417-encoding/_index.md +++ b/barcode/vietnamese/net/compact-pdf417-encoding/_index.md @@ -85,6 +85,12 @@ Ngoài các kiến thức cơ bản, dưới đây là một số mẹo thực t ### [Tạo Mã Vạch Compact PDF417](./compact-pdf417-basic-configuration/) Tìm hiểu cách tạo mã vạch Compact PDF417 bằng Aspose.BarCode cho .NET. Hướng dẫn chi tiết với các bước thực hiện và ví dụ mã nguồn. +### [Cách Tạo Hình Ảnh Mã Vạch PDF417 trong C# với Aspose](./how-to-generate-pdf417-barcode-image-in-c-with-aspose/) +Hướng dẫn chi tiết cách tạo hình ảnh mã vạch PDF417 bằng C# sử dụng thư viện Aspose.BarCode. + +### [Đọc Nhiều Mã Vạch C# – Hướng Dẫn Toàn Diện với PDF417](./read-multiple-barcodes-c-complete-guide-with-pdf417/) +Hướng dẫn chi tiết cách đọc nhiều mã vạch PDF417 trong C# bằng Aspose.BarCode. + ## Câu hỏi thường gặp **Q: Dung lượng tối đa tôi có thể lưu trữ trong một mã vạch Compact PDF417 là bao nhiêu?** @@ -111,4 +117,4 @@ A: Không cần font bên ngoài; thư viện tự xử lý việc render nội {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/vietnamese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md b/barcode/vietnamese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md new file mode 100644 index 000000000..882332e6f --- /dev/null +++ b/barcode/vietnamese/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/_index.md @@ -0,0 +1,175 @@ +--- +category: general +date: 2026-07-30 +description: Cách tạo hình ảnh mã vạch PDF417 trong C# với Aspose. Học từng bước cách + tạo mã vạch bằng Aspose, thiết lập siêu dữ liệu MacroPDF417 và lưu dưới dạng PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate pdf417 +- generate barcode image c# +- create barcode with aspose +- Aspose.BarCode PDF417 +- MacroPdf417 metadata +language: vi +lastmod: 2026-07-30 +og_description: Cách tạo hình ảnh mã vạch PDF417 trong C# với Aspose. Theo dõi hướng + dẫn đầy đủ này để tạo mã vạch bằng Aspose, cấu hình siêu dữ liệu MacroPDF417 và + xuất ra tệp PNG. +og_image_alt: Screenshot showing a generated PDF417 barcode image created with Aspose + in C# +og_title: Cách tạo hình ảnh mã vạch PDF417 trong C# với Aspose +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: How to generate PDF417 barcode image in C# with Aspose. Learn step‑by‑step + how to create barcode with Aspose, set MacroPDF417 metadata, and save as PNG. + headline: How to Generate PDF417 Barcode Image in C# with Aspose + type: TechArticle +tags: +- Aspose +- C# +- Barcode +title: Cách tạo hình ảnh mã vạch PDF417 trong C# bằng Aspose +url: /vi/net/compact-pdf417-encoding/how-to-generate-pdf417-barcode-image-in-c-with-aspose/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cách tạo hình ảnh mã vạch PDF417 trong C# với Aspose + +Cách tạo hình ảnh mã vạch PDF417 trong C# với Aspose là một rào cản thường gặp đối với bất kỳ ai làm việc với việc mã hoá dữ liệu mật độ cao. Trong hướng dẫn này, chúng tôi sẽ đi qua từng bước—cài đặt trình tạo, điều chỉnh siêu dữ liệu MacroPDF417, và cuối cùng lưu thành tệp PNG sắc nét. + +Nếu bạn đã từng cố gắng **generate barcode image c#** và kết thúc với một canvas trống hoặc một bản quét không đọc được, bạn không phải là người duy nhất. Tin tốt là Aspose.BarCode làm cho toàn bộ quá trình gần như không đau đầu, và vào cuối bài viết này bạn sẽ có thể **create barcode with Aspose** cho bất kỳ quy trình doanh nghiệp nào. + +## Những gì bạn sẽ học + +- Cài đặt và tham chiếu thư viện Aspose.BarCode cho .NET. +- Khởi tạo trình tạo PDF417 với payload tùy chỉnh. +- Áp dụng các trường cụ thể của MacroPDF417 như file ID, segment ID và timestamp. +- Xuất kết quả ra hình ảnh PNG mà bạn có thể nhúng vào báo cáo hoặc ứng dụng di động. +- Mẹo khắc phục các vấn đề thường gặp (ví dụ: độ rộng module sai, thiếu segment). + +Không cần kinh nghiệm trước về MacroPDF417; chỉ cần hiểu cơ bản về C# và Visual Studio là đủ. + +## Prerequisites + +| Yêu cầu | Lý do | +|-------------|--------| +| .NET 6.0 or later | Phiên bản LTS hiện tại, được Aspose hỗ trợ đầy đủ | +| Visual Studio 2022 (or any IDE) | Để biên dịch và chạy mẫu | +| Aspose.BarCode for .NET (NuGet) | Cung cấp `BarcodeGenerator` và hỗ trợ PDF417 | + +Bạn có thể thêm thư viện qua NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Bây giờ nền tảng đã được thiết lập, hãy đi sâu vào mã. + +## Cách tạo hình ảnh mã vạch PDF417 trong C# – Thiết lập + +Điều đầu tiên chúng ta làm là tạo một thể hiện `BarcodeGenerator` cho kiểu mã hoá **MacroPdf417**. Đối tượng này chứa tất cả các tùy chọn cấu hình, từ kích thước module đến siêu dữ liệu phong phú mà MacroPDF417 yêu cầu. + +```csharp +using Aspose.BarCode.Generation; +using System; + +// Step 1: Create the barcode generator with the desired payload. +using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MacroPdf417, "Payload")) +{ + // The rest of the configuration goes here. +} +``` + +> **Tại sao điều này quan trọng:** `EncodeTypes.MacroPdf417` cho Aspose biết tạo một mã vạch PDF417 có thể chia thành nhiều segment—điều cần thiết cho các tệp lớn hoặc xử lý hàng loạt. + +## Cấu hình giao diện cơ bản + +Một mã vạch có thể đọc được bắt đầu với các thiết lập hình ảnh phù hợp. `XDimension` điều khiển độ rộng của mỗi module (các ô đen/trắng nhỏ), trong khi `Columns` xác định số cột mà mã vạch chiếm. + +```csharp +// Step 2: Define basic barcode appearance. +generator.Parameters.Barcode.XDimension.Pixels = 2; // Module width in pixels. +generator.Parameters.Barcode.Pdf417.Columns = 5; // Number of columns (adjust for size). +``` + +- **Mẹo:** Nếu mã vạch trông quá dày trên máy in biên lai, tăng `XDimension` lên `3` hoặc `4`. +- **Cạm bẫy:** Đặt `Columns` quá thấp có thể khiến mã vạch vượt ra ngoài giới hạn hình ảnh, dẫn đến việc quét không đọc được. + +## Đặt siêu dữ liệu cụ thể cho MacroPDF417 + +MacroPDF417 cho phép bạn nhúng thông tin cấp tệp trực tiếp vào mã vạch. Điều này rất phù hợp để theo dõi việc vận chuyển tài liệu lớn hoặc chia một tệp thành nhiều lần quét. + +```csharp +// Step 3: Set MacroPDF417 specific metadata. +generator.Parameters.Barcode.Pdf417.MacroPdf417FileID = 12345678; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentID = 12; +generator.Parameters.Barcode.Pdf417.MacroPdf417SegmentsCount = 20; +generator.Parameters.Barcode.Pdf417.MacroPdf417FileName = "file01"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Checksum = 1234; // CCITT‑16 CRC +generator.Parameters.Barcode.Pdf417.MacroPdf417FileSize = 400_000; // bytes +generator.Parameters.Barcode.Pdf417.MacroPdf417TimeStamp = new DateTime(2019, 11, 1); +generator.Parameters.Barcode.Pdf417.MacroPdf417Addressee = "street"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Sender = "aspose"; +generator.Parameters.Barcode.Pdf417.MacroPdf417Terminator = Pdf417MacroTerminator.Set; +``` + +**Mô tả mỗi trường:** + +| Property | Description | +|----------|-------------| +| `MacroPdf417FileID` | Mã định danh duy nhất cho toàn bộ tệp. | +| `MacroPdf417SegmentID` | Chỉ mục của segment hiện tại (bắt đầu từ 0). | +| `MacroPdf417SegmentsCount` | Tổng số segment mà tệp được chia. | +| `MacroPdf417FileName` | Tên có thể đọc được bởi con người, hữu ích cho nhật ký kiểm tra. | +| `MacroPdf417Checksum` | CRC 16‑bit để xác minh tính toàn vẹn dữ liệu. | +| `MacroPdf417FileSize` | Kích thước tệp gốc tính bằng byte, giúp người nhận phân bổ bộ nhớ. | +| `MacroPdf417TimeStamp` | Ngày/giờ khi tệp được tạo. | +| `MacroPdf417Addressee` / `MacroPdf417Sender` | Chuỗi tùy chọn để xác định người nhận/gửi. | +| `MacroPdf417Terminator` | Đánh dấu segment cuối cùng; cần thiết để giải mã đúng. | + +> **Tại sao phải làm?** Nếu không có các trường này, máy quét chỉ có thể đọc dữ liệu thô, không có ngữ cảnh. Thêm siêu dữ liệu có nghĩa là hệ thống nhận có thể tự động ghép lại tệp gốc. + +## Lưu mã vạch dưới dạng PNG + +Khi trình tạo đã được cấu hình đầy đủ, việc lưu hình ảnh chỉ cần một dòng lệnh: + +```csharp +// Step 4: Save the generated barcode image. +generator.Save("YOUR_DIRECTORY/MacroPdf417Meta.png", BarCodeImageFormat.Png); +``` + +- **Định dạng tệp:** PNG không mất dữ liệu, đảm bảo mỗi module luôn sắc nét cho máy quét. +- **Thay thế:** Sử dụng `BarCodeImageFormat.Jpeg` nếu bạn cần tệp có kích thước nhỏ hơn, nhưng sẽ có một chút giảm độ đọc được. + +### Kết quả mong đợi + +Sau khi chạy đoạn mã, bạn sẽ thấy `MacroPdf417Meta.png` trong thư mục đã chỉ định. Nó sẽ trông giống như hình minh họa dưới đây: + +![PDF417 barcode generated with Aspose](path/to/your/image.png){alt="Cách tạo hình ảnh mã vạch PDF417 trong C#"} + +Hình ảnh chứa một lưới dày đặc các ô đen và trắng, với payload đã mã hoá và siêu dữ liệu MacroPDF417 được nhúng. + +## Ví dụ hoàn chỉnh hoạt động + +Dưới đây là chương trình đầy đủ, sẵn sàng sao chép‑dán. Nó biên dịch được với bất kỳ dự án .NET 6+ nào và chỉ yêu cầu gói NuGet Aspose.BarCode. + + + +## Bạn nên học gì tiếp theo? + +Các hướng dẫn sau đây bao gồm các chủ đề liên quan chặt chẽ, xây dựng trên các kỹ thuật được trình bày trong hướng dẫn này. Mỗi tài nguyên đều có các ví dụ mã hoạt động đầy đủ cùng giải thích từng bước để giúp bạn nắm vững các tính năng API bổ sung và khám phá các cách triển khai thay thế trong dự án của mình. + +- [Cách tạo mã vạch – Compact PDF417 với Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [Cách tạo mã DataMatrix (ECC 200) với Aspose.BarCode cho .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) +- [Cách tạo mã Aztec với tỷ lệ khung tùy chỉnh bằng Aspose.BarCode cho .NET](/barcode/english/net/aztec-barcode-encoding/aztec-aspect-ratio-customization/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/vietnamese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md b/barcode/vietnamese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md new file mode 100644 index 000000000..9602decd8 --- /dev/null +++ b/barcode/vietnamese/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-07-30 +description: Đọc nhiều mã vạch C# bằng Aspose.BarCode. Học từng bước cách giải mã + PDF417, phát hiện chế độ compact và xử lý nhiều mã vạch trong một hình ảnh. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read multiple barcodes c# +- BarCodeReader C# +- PDF417 decoding +- barcode compact mode +- C# barcode library +language: vi +lastmod: 2026-07-30 +og_description: Đọc nhiều mã vạch C# với Aspose.BarCode. Hướng dẫn này cho bạn cách + giải mã tất cả các mã vạch trong một hình ảnh, kiểm tra chế độ compact và tích hợp + vào các ứng dụng .NET. +og_image_alt: Screenshot of C# console output showing compact mode status for PDF417 + barcodes +og_title: Đọc Nhiều Mã Vạch C# – Hướng Dẫn Toàn Diện cho PDF417 +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + headline: Read Multiple Barcodes C# – Complete Guide with PDF417 + type: TechArticle +- description: Read multiple barcodes C# using Aspose.BarCode. Learn step‑by‑step + how to decode PDF417, detect compact mode, and handle many barcodes in one image. + name: Read Multiple Barcodes C# – Complete Guide with PDF417 + steps: + - name: Why This Code Works + text: '- **`BarCodeReader`** is the workhorse from the **BarCodeReader C#** API. + It opens the image, applies pre‑processing, and searches for symbols of the + type you specify. - **`ReadBarCodes()`** returns an array, not just a single + result. That’s the key to **reading multiple barcodes C#**—the method aut' + - name: 1️⃣ No Barcodes Detected + text: 'If `ReadBarCodes()` returns an empty array, the most common culprits are:' + - name: 2️⃣ Extremely Large Images + text: 'Processing a 10 MP photo can be memory‑hungry. You can limit the scan area:' + - name: 3️⃣ Thread‑Safety + text: '`BarCodeReader` implements `IDisposable` and is **not** thread‑safe. Spin + up separate instances per thread if you need parallel processing.' + - name: 4️⃣ Licensing + text: 'Aspose.BarCode works in trial mode out of the box, but you’ll see a watermark + on the output image. For production, set the license early:' + - name: 5️⃣ Logging + text: When you integrate this into a larger service, replace `Console.WriteLine` + with a structured logger (Serilog, NLog). That way you can capture `CodeText`, + `CodeType`, and `IsTruncated` as fields for downstream analytics. + type: HowTo +tags: +- C# +- BarCode +- PDF417 +- Aspose +- Barcode Decoding +title: Đọc Nhiều Mã Vạch C# – Hướng Dẫn Toàn Diện với PDF417 +url: /vi/net/compact-pdf417-encoding/read-multiple-barcodes-c-complete-guide-with-pdf417/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Đọc Nhiều Mã Vạch C# – Hướng Dẫn Đầy Đủ với PDF417 + +Bạn đã bao giờ tự hỏi làm thế nào để **đọc nhiều mã vạch C#** từ một hình ảnh duy nhất chưa? Có thể bạn có một lô nhãn vận chuyển, một bức ảnh ghép vé, hoặc một tài liệu PDF417 chứa nhiều mã trong một bức ảnh. Trong công việc hằng ngày, tôi cũng đã gặp phải tình huống này—cho đến khi khám phá ra `BarCodeReader` của Aspose.BarCode. Bài hướng dẫn này sẽ chỉ cho bạn cách giải mã mọi mã vạch trong một hình ảnh, xác định mỗi PDF417 có ở chế độ compact (truncated) hay không, và xử lý kết quả một cách gọn gàng. + +Chúng ta cũng sẽ bổ sung một vài mẹo—như cách xử lý khi hình ảnh chứa các loại symbology khác nhau, hoặc khi quá trình quét không trả về kết quả nào. Khi hoàn thành, bạn sẽ có một ứng dụng console sẵn sàng chạy để **đọc nhiều mã vạch C#** như một chuyên gia. + +## Những Gì Bạn Cần Chuẩn Bị + +Trước khi bắt đầu, hãy chắc chắn rằng máy của bạn đã có: + +- **.NET 6.0** SDK hoặc mới hơn (mã cũng chạy được với .NET Framework 4.6+ nhưng .NET 6 là lựa chọn tối ưu). +- Gói NuGet **Aspose.BarCode for .NET** (`Install-Package Aspose.BarCode`). +- Một hình ảnh mẫu chứa các mã **PDF417**—tốt nhất là hình ảnh có cả biểu tượng compact và full‑size. Bài hướng dẫn sử dụng `CompactPdf417.png`, nhưng bất kỳ file PNG/JPEG nào cũng được. +- IDE yêu thích của bạn (Visual Studio, Rider, hoặc VS Code). + +Vậy là xong—không cần DLL phụ, không cần phụ thuộc native. Aspose.BarCode là mã quản lý thuần, bạn có thể đưa nó vào bất kỳ dự án .NET nào. + +![Đọc nhiều mã vạch C# – đầu ra console](image.png "Đọc nhiều mã vạch C# – đầu ra console") + +*Văn bản thay thế hình ảnh: Đọc nhiều mã vạch C# – ảnh chụp màn hình console hiển thị trạng thái chế độ compact cho các mã PDF417.* + +## Bước 1 – Cài Đặt và Tham Chiếu Thư Viện BarCodeReader C# + +Điều đầu tiên cần làm là có **BarCodeReader C#** – lớp chịu trách nhiệm giải mã. Mở terminal (hoặc Package Manager Console) và chạy: + +```powershell +dotnet add package Aspose.BarCode +``` + +Hoặc, nếu bạn đang dùng NuGet manager trong Visual Studio, chỉ cần tìm *Aspose.BarCode* và nhấn **Install**. Điều này sẽ tải về phiên bản ổn định mới nhất (tính đến tháng 7 2026 là 23.9), hỗ trợ PDF417, QR, DataMatrix và hàng chục symbology khác. + +Tại sao lại quan trọng: thư viện này trừu tượng hoá việc xử lý ảnh, sửa lỗi, và nhận dạng ký hiệu. Bạn có thể tự viết scanner, nhưng sẽ mất hàng tuần để xử lý các trường hợp góc cạnh. Aspose cung cấp **thư viện mã vạch C#** đã được kiểm chứng, luôn được cập nhật cho các runtime .NET hiện đại. + +## Bước 2 – Tạo Dự Án Console Đơn Giản + +Tạo một ứng dụng console mới để chúng ta chỉ tập trung vào logic mã vạch mà không bị nhiễu bởi UI: + +```bash +dotnet new console -n BarcodeDemo +cd BarcodeDemo +``` + +Thay thế file `Program.cs` được tạo sẵn bằng ví dụ đầy đủ dưới đây. Bạn có thể giữ namespace mặc định hoặc đổi tên—không có yêu cầu gì đặc biệt. + +## Bước 3 – Viết Toàn Bộ Triển Khai “Read Multiple Barcodes C#” + +Dưới đây là một mẫu **đầy đủ, có thể chạy**. Nó bao gồm bốn bước từ đoạn mã gốc, thêm xử lý lỗi, và in ra các thông tin chẩn đoán hữu ích. + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + // --------------------------------------------------------- + // 1️⃣ Initialize the BarCodeReader for the target image. + // --------------------------------------------------------- + // Replace the path with your own image location. + const string imagePath = "YOUR_DIRECTORY/CompactPdf417.png"; + + // The DecodeType.Pdf417 tells the reader to look for PDF417 symbols. + // You could pass DecodeType.AllSupported to scan every possible barcode. + using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.Pdf417)) + { + // --------------------------------------------------------- + // 2️⃣ Iterate over every barcode found in the picture. + // --------------------------------------------------------- + BarCodeResult[] results = reader.ReadBarCodes(); + + if (results.Length == 0) + { + Console.WriteLine("No barcodes detected – double‑check the image path and content."); + return; + } + + // --------------------------------------------------------- + // 3️⃣ Process each result: check compact mode and output data. + // --------------------------------------------------------- + foreach (BarCodeResult result in results) + { + // The Extended property gives us PDF417‑specific info. + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + + // Display the raw text and the compact‑mode flag. + Console.WriteLine($"Code Text : {result.CodeText}"); + Console.WriteLine($"Compact mode: {isCompact}"); + Console.WriteLine(new string('-', 30)); + } + } + + // --------------------------------------------------------- + // 4️⃣ Keep the console window open when debugging. + // --------------------------------------------------------- + Console.WriteLine("Done. Press any key to exit."); + Console.ReadKey(); + } + } +} +``` + +### Tại Sao Đoạn Mã Này Hoạt Động + +- **`BarCodeReader`** là thành phần chính của **BarCodeReader C#** API. Nó mở ảnh, thực hiện tiền xử lý, và tìm kiếm các ký hiệu theo loại bạn chỉ định. +- **`ReadBarCodes()`** trả về một mảng, không chỉ một kết quả duy nhất. Đây là chìa khóa để **đọc nhiều mã vạch C#**—phương thức tự động thu thập mọi kết quả khớp. +- **`result.Extended.Pdf417.IsTruncated`** cho biết PDF417 có ở chế độ *compact* (hay còn gọi là truncated) hay không. Cờ này chỉ tồn tại cho PDF417, vì vậy chúng ta dùng toán tử null‑conditional (`?.`) để tránh ngoại lệ nếu có symbology khác xuất hiện. +- Vòng `foreach` in ra cả văn bản đã giải mã và trạng thái compact, giúp bạn kiểm tra nhanh. + +## Bước 4 – Xử Lý Các Loại Mã Vạch Khác (Tùy Chọn) + +Nếu hình ảnh của bạn có thể chứa hơn một loại PDF417, chỉ cần đổi đối số thứ hai của `BarCodeReader` thành `DecodeType.AllSupported`. Vòng lặp vẫn giữ nguyên, nhưng bạn cần kiểm tra `result.Extended` có null hay không đối với các ký hiệu không phải PDF417: + +```csharp +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.AllSupported)) +{ + foreach (BarCodeResult result in reader.ReadBarCodes()) + { + Console.WriteLine($"Symbology : {result.CodeTypeName}"); + Console.WriteLine($"Code Text : {result.CodeText}"); + + // PDF417‑specific check only when applicable. + if (result.CodeType == DecodeType.Pdf417) + { + bool isCompact = result.Extended?.Pdf417?.IsTruncated ?? false; + Console.WriteLine($"Compact mode: {isCompact}"); + } + + Console.WriteLine(new string('=', 30)); + } +} +``` + +Thay đổi nhỏ này biến **thư viện mã vạch C#** của bạn thành một scanner đa năng, phù hợp cho các lô mã hỗn hợp. + +## Bước 5 – Các Trường Hợp Cạnh và Mẹo Thực Hành + +### 1️⃣ Không Phát Hiện Mã Vạch +Nếu `ReadBarCodes()` trả về mảng rỗng, các nguyên nhân thường gặp là: + +- Đường dẫn file sai hoặc thiếu quyền đọc. +- Chất lượng ảnh quá thấp (mờ, độ tương phản thấp). Xem xét tiền xử lý bằng `reader.ImagePreprocessingOptions` (ví dụ: `reader.ImagePreprocessingOptions.Denoise = true;`). + +### 2️⃣ Ảnh Rất Lớn +Xử lý ảnh 10 MP có thể tiêu tốn nhiều bộ nhớ. Bạn có thể giới hạn vùng quét: + +```csharp +reader.SetRegionOfInterest(0, 0, 2000, 2000); // left, top, width, height +``` + +### 3️⃣ An Toàn Khi Đa Luồng +`BarCodeReader` triển khai `IDisposable` và **không** an toàn với đa luồng. Tạo các instance riêng cho mỗi luồng nếu cần xử lý song song. + +### 4️⃣ Giấy Phép +Aspose.BarCode hoạt động ở chế độ trial mặc định, nhưng sẽ hiển thị watermark trên ảnh đầu ra. Đối với môi trường production, hãy đặt giấy phép ngay từ đầu: + +```csharp +License license = new License(); +license.SetLicense("Aspose.BarCode.lic"); +``` + +### 5️⃣ Ghi Log +Khi tích hợp vào dịch vụ lớn hơn, thay thế `Console.WriteLine` bằng logger có cấu trúc (Serilog, NLog). Nhờ vậy bạn có thể ghi lại `CodeText`, `CodeType`, và `IsTruncated` dưới dạng các trường để phân tích sau. + +## Tổng Kết Ví Dụ Hoàn Chỉnh + +Kết hợp lại, đây là *toàn bộ* chương trình bạn có thể sao chép‑dán vào `Program.cs`: + +```csharp +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; + +namespace BarcodeDemo +{ + class Program + { + static void Main(string[] args) + { + const string imagePath = "YOUR_DIRECTORY + + +## Bạn Nên Học Gì Tiếp Theo? + + +Các tutorial sau đây đề cập đến các chủ đề liên quan chặt chẽ, giúp bạn mở rộng các kỹ thuật đã học trong hướng dẫn này. Mỗi tài nguyên đều kèm ví dụ code hoàn chỉnh và giải thích chi tiết từng bước, để bạn có thể nắm vững các tính năng API bổ sung và khám phá các cách triển khai thay thế trong dự án của mình. + +- [How to Generate PDF417 Barcodes – Compact PDF417 Encoding](/barcode/english/net/compact-pdf417-encoding/) +- [How to Create Barcode – Compact PDF417 with Aspose.BarCode](/barcode/english/net/compact-pdf417-encoding/compact-pdf417-basic-configuration/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/vietnamese/net/one-dimensional-barcode-types/_index.md b/barcode/vietnamese/net/one-dimensional-barcode-types/_index.md index e62a15ca4..d5a4b2f58 100644 --- a/barcode/vietnamese/net/one-dimensional-barcode-types/_index.md +++ b/barcode/vietnamese/net/one-dimensional-barcode-types/_index.md @@ -78,6 +78,8 @@ tìm hiểu cách tạo mã vạch trong .NET bằng Aspose.BarCode cho .NET. H Tìm hiểu cách xử lý các trường hợp ngoại lệ trong khi tạo mã vạch một chiều bằng Aspose.BarCode cho .NET. Hướng dẫn từng bước này đảm bảo các giải pháp mã vạch có khả năng chịu lỗi. Bắt đầu ngay bây giờ! ### [Cấu hình tỷ lệ rộng-hẹp một chiều](./one-dimensional-wide-narrow-ratio-configuration/) Tạo mã vạch tùy chỉnh dễ dàng với Aspose.BarCode cho .NET. Hướng dẫn từng bước cho cấu hình tỷ lệ rộng-hẹp một chiều. +### [Đọc mã vạch từ hình ảnh – ví dụ C#](./read-barcode-from-image-c-barcode-reader-example/) +Hướng dẫn cách đọc mã vạch từ hình ảnh trong .NET bằng Aspose.BarCode và C# qua ví dụ thực tế. ## Phần kết luận @@ -89,4 +91,4 @@ Với bài viết này, bạn không chỉ có được kiến thức về các {{< /blocks/products/pf/main-container >}} {{< /blocks/products/pf/main-wrap-class >}} -{{< blocks/products/products-backtop-button >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/vietnamese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md b/barcode/vietnamese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md new file mode 100644 index 000000000..90daebfa2 --- /dev/null +++ b/barcode/vietnamese/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/_index.md @@ -0,0 +1,277 @@ +--- +category: general +date: 2026-07-30 +description: Đọc mã vạch từ hình ảnh bằng Aspose.BarCode cho .NET – một ví dụ đầy + đủ về trình đọc mã vạch C# cho thấy cách giải mã mã vạch Macro PDF417. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- read barcode from image +- c# barcode reader example +- macro pdf417 decoding +- aspose.barcode for .net +- barcode processing c# +language: vi +lastmod: 2026-07-30 +og_description: Đọc mã vạch từ hình ảnh bằng Aspose.BarCode cho .NET. Ví dụ đọc mã + vạch C# từng bước này cho thấy cách trích xuất tất cả siêu dữ liệu Macro PDF417. +og_image_alt: Screenshot of C# console output displaying decoded Macro PDF417 barcode + information +og_title: Đọc mã vạch từ hình ảnh – Ví dụ đầy đủ về trình đọc mã vạch C# +schemas: +- author: Aspose + dateModified: '2026-07-30' + description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + headline: Read barcode from image – C# barcode reader example + type: TechArticle +- description: Read barcode from image using Aspose.BarCode for .NET – a complete + C# barcode reader example that shows how to decode Macro PDF417 barcodes. + name: Read barcode from image – C# barcode reader example + steps: + - name: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + text: '**`using` block** – Guarantees the native resources (file handles, native + decoder memory) are freed immediately after the operation. Skipping this can + lead to locked files on Windows.' + - name: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + text: '**`DecodeType.MacroPdf417`** – Tells Aspose to look specifically for Macro PDF417 + symbols; other barcode types are ignored, which speeds up scanning.' + - name: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + text: '**`ReadBarCodes()`** – Returns a collection because an image might contain + multiple Macro PDF417 segments (think of a multi‑page document split across + several barcodes).' + - name: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + text: '**`macroResult.Extended?.Pdf417`** – The `Extended` object is nullable; + the safe‑navigation operator (`?.`) prevents a `NullReferenceException` if the + barcode lacks extended data.' + - name: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + text: '**Printing each field** – Gives you visibility into the file identifier, + segment ordering, checksum verification, and optional textual fields like sender + or addressee.' + - name: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + text: '**Collect all segments** into a dictionary keyed by `SegmentID`.' + - name: '**Sort** them by `SegmentID` to reassemble the original file.' + text: '**Sort** them by `SegmentID` to reassemble the original file.' + - name: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + text: '**Validate** the `Checksum` against the concatenated payload (Aspose does + this internally, but you can re‑run a CRC if you need extra safety).' + type: HowTo +tags: +- barcode +- csharp +- aspnet +- image-processing +title: Đọc mã vạch từ hình ảnh – Ví dụ trình đọc mã vạch C# +url: /vi/net/one-dimensional-barcode-types/read-barcode-from-image-c-barcode-reader-example/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Đọc mã vạch từ hình ảnh – ví dụ đọc mã vạch C# + +Bạn cần **đọc mã vạch từ hình ảnh** trong một ứng dụng C#? Bạn đang ở đúng nơi. Trong hướng dẫn này, chúng tôi sẽ đi qua một *c# barcode reader example* hoàn chỉnh sử dụng thư viện Aspose.BarCode for .NET để giải mã một mã vạch Macro PDF417 và lấy ra mọi thông tin mở rộng mà tiêu chuẩn cung cấp. + +Hãy tưởng tượng bạn vừa quét một nhãn vận chuyển, một vé lên máy bay, hoặc một giấy tờ tùy thân của chính phủ có chứa một đoạn Macro PDF417. Bạn muốn lấy ID tệp, số lượng đoạn, dấu thời gian, và thậm chí có thể là tên người gửi—tất cả mà không rời khỏi mã của bạn. Đó chính là những gì chúng ta sẽ đạt được, và chúng ta sẽ thực hiện theo cách dễ sao chép‑dán vào dự án của bạn. + +--- + +## Những gì bạn sẽ học + +- Cách thêm gói Aspose.BarCode NuGet vào dự án .NET. +- Cách mở tệp hình ảnh chứa mã vạch Macro PDF417. +- Cách lặp qua kết quả **read barcode from image** và truy cập mọi trường mở rộng. +- Mẹo xử lý nhiều đoạn, xác thực checksum, và khắc phục các lỗi thường gặp. + +Khi kết thúc hướng dẫn này, bạn sẽ có một ứng dụng console hoạt động, in ra tất cả siêu dữ liệu Macro PDF417, sẵn sàng tích hợp vào các hệ thống lớn hơn như trình theo dõi tồn kho hoặc quy trình quản lý tài liệu. + +--- + +## Yêu cầu trước + +Trước khi chúng ta bắt đầu, hãy chắc chắn rằng bạn có những thứ sau: + +| Yêu cầu | Lý do quan trọng | +|-------------|----------------| +| .NET 6.0 SDK or later (any recent version works) | Cung cấp môi trường chạy cho ứng dụng console. | +| Visual Studio 2022 (or VS Code with C# extension) | Giúp việc chỉnh sửa và gỡ lỗi trở nên dễ dàng. | +| Aspose.BarCode for .NET (free trial or licensed) | Thư viện thực sự giải mã mã vạch. | +| An image file (`MacroPdf417Meta.png`) that contains a Macro PDF417 barcode | Nguồn dữ liệu chúng ta sẽ đọc. | + +Nếu bạn chưa có Aspose.BarCode, bạn có thể tải nó từ NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +Dòng lệnh duy nhất này sẽ cài đặt mọi thứ bạn cần, bao gồm `BarCodeReader`, `DecodeType`, và tập hợp thuộc tính phong phú `Extended` mà chúng ta sẽ khám phá. + +--- + +## Bước 1 – Thiết lập dự án và nhập thư viện + +Tạo một dự án console mới (hoặc chèn mã vào dự án hiện có). Các chỉ thị `using` là cần thiết; chúng đưa các lớp mã vạch vào phạm vi. + +```csharp +// Program.cs – entry point for the demo +using System; +using Aspose.BarCode; +using Aspose.BarCode.BarCodeRecognition; // contains BarCodeReader and DecodeType +``` + +> **Mẹo chuyên nghiệp:** Nếu bạn đang dùng Visual Studio, IDE sẽ đề xuất tự động thêm các câu lệnh `using` còn thiếu—chỉ cần nhấn *Ctrl+.`*. + +--- + +## Bước 2 – Chuẩn bị đường dẫn hình ảnh + +Mã cứng một đường dẫn tuyệt đối hoạt động cho bản demo nhanh, nhưng trong môi trường thực tế bạn có thể nhận đối số dòng lệnh hoặc thiết lập cấu hình. Để rõ ràng, chúng ta sẽ giữ đơn giản: + +```csharp +// Adjust the path to point at your image file +string imagePath = @"C:\Barcodes\MacroPdf417Meta.png"; +``` + +> **Lý do quan trọng:** `BarCodeReader` yêu cầu một vị trí tệp hợp lệ; đường dẫn sai sẽ gây ra `FileNotFoundException` trước khi quá trình giải mã bắt đầu. + +--- + +## Bước 3 – **Read barcode from image** và trích xuất chi tiết Macro PDF417 + +Bây giờ là phần cốt lõi của **c# barcode reader example**. Chúng ta sẽ tạo một thể hiện `BarCodeReader` với cờ `DecodeType.MacroPdf417`, lặp qua tất cả kết quả (có thể có hơn một mã vạch trong một hình ảnh), và in ra mọi thuộc tính mở rộng. + +```csharp +// Step 3: Open the image and decode Macro PDF417 barcodes +using (BarCodeReader reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + // Iterate over every barcode found in the image + foreach (BarCodeResult macroResult in reader.ReadBarCodes()) + { + // The Extended property contains the Macro PDF417 specific fields + var pdf417 = macroResult.Extended?.Pdf417; + + if (pdf417 == null) + { + Console.WriteLine("No Macro PDF417 extension data found for this barcode."); + continue; + } + + // Output each piece of metadata – this is what makes the example useful + Console.WriteLine($"FileID: {pdf417.MacroPdf417FileID}"); + Console.WriteLine($"SegmentID: {pdf417.MacroPdf417SegmentID}"); + Console.WriteLine($"SegmentsCount: {pdf417.MacroPdf417SegmentsCount}"); + Console.WriteLine($"FileName: {pdf417.MacroPdf417FileName}"); + Console.WriteLine($"Checksum: {pdf417.MacroPdf417Checksum}"); + Console.WriteLine($"FileSize: {pdf417.MacroPdf417FileSize}"); + Console.WriteLine($"TimeStamp: {pdf417.MacroPdf417TimeStamp}"); + Console.WriteLine($"Addressee: {pdf417.MacroPdf417Addressee}"); + Console.WriteLine($"Sender: {pdf417.MacroPdf417Sender}"); + Console.WriteLine($"Terminator: {pdf417.MacroPdf417Terminator}"); + Console.WriteLine(new string('-', 40)); // separator for readability + } +} +``` + +### Những gì đoạn mã đang làm (tại sao, không chỉ cách thực hiện) + +1. **`using` block** – Đảm bảo các tài nguyên gốc (handle tệp, bộ nhớ giải mã gốc) được giải phóng ngay sau khi thực hiện. Bỏ qua có thể gây khóa tệp trên Windows. +2. **`DecodeType.MacroPdf417`** – Yêu cầu Aspose chỉ tìm các ký hiệu Macro PDF417; các loại mã vạch khác sẽ bị bỏ qua, giúp tăng tốc quét. +3. **`ReadBarCodes()`** – Trả về một tập hợp vì một hình ảnh có thể chứa nhiều đoạn Macro PDF417 (hãy nghĩ đến tài liệu đa trang được chia thành nhiều mã vạch). +4. **`macroResult.Extended?.Pdf417`** – Đối tượng `Extended` có thể null; toán tử điều hướng an toàn (`?.`) ngăn `NullReferenceException` nếu mã vạch không có dữ liệu mở rộng. +5. **Printing each field** – Cung cấp cho bạn khả năng xem ID tệp, thứ tự đoạn, xác thực checksum, và các trường văn bản tùy chọn như người gửi hoặc người nhận. + +--- + +## Bước 4 – Chạy ứng dụng và xác minh đầu ra + +Biên dịch và chạy chương trình: + +```bash +dotnet run +``` + +Nếu mọi thứ được cấu hình đúng, bạn sẽ thấy một kết quả tương tự như dưới đây trong console: + +``` +FileID: 12 +SegmentID: 3 +SegmentsCount: 5 +FileName: invoice_2023.pdf +Checksum: 0x1A2B +FileSize: 45231 +TimeStamp: 2023-08-15T14:32:00Z +Addressee: Acme Corp. +Sender: Warehouse 7 +Terminator: 0xFF +---------------------------------------- +``` + +> **Lưu ý:** Các giá trị cụ thể phụ thuộc vào mã vạch bạn đang giải mã. Nếu bạn nhận được “No Macro PDF417 extension data found,” hãy kiểm tra lại rằng hình ảnh thực sự chứa mã Macro PDF417 và bạn đang sử dụng `DecodeType` đúng. + +--- + +## Xử lý nhiều đoạn và xác thực (nâng cao) + +Macro PDF417 được thiết kế cho các tải dữ liệu lớn được chia thành nhiều ký hiệu. Khi bạn gặp hơn một đoạn, thường bạn sẽ cần: + +1. **Thu thập tất cả các đoạn** vào một dictionary được khóa bằng `SegmentID`. +2. **Sắp xếp** chúng theo `SegmentID` để ghép lại tệp gốc. +3. **Xác thực** `Checksum` với payload đã nối (Aspose thực hiện việc này nội bộ, nhưng bạn có thể chạy lại CRC nếu cần độ an toàn cao hơn). + +Dưới đây là một bản phác thảo nhanh: + +```csharp +var segments = new SortedDictionary(); + +using (var reader = new BarCodeReader(imagePath, DecodeType.MacroPdf417)) +{ + foreach (var result in reader.ReadBarCodes()) + { + var pdf = result.Extended?.Pdf417; + if (pdf != null) + segments[pdf.MacroPdf417SegmentID] = result; + } +} + +// Reassemble data (pseudo‑code) +byte[] fullPayload = AssembleSegments(segments); +bool isValid = VerifyChecksum(fullPayload, segments[0].Extended.Pdf417.MacroPdf417Checksum); +Console.WriteLine(isValid ? "Checksum OK" : "Checksum mismatch"); +``` + +Bạn sẽ cần triển khai `AssembleSegments` và `VerifyChecksum` dựa trên định dạng payload của mình—thường chỉ là nối mảng byte rồi kiểm tra CRC‑16. + +--- + +## Những lỗi thường gặp và cách tránh chúng + +| Triệu chứng | Nguyên nhân khả dĩ | Cách khắc phục | +|------------|---------------------|----------------| +| `null` trả về từ `macroResult.Extended` | Hình ảnh chứa PDF417 thông thường, không phải phiên bản Macro. | Sử dụng `DecodeType.Pdf417` thay thế, hoặc xác minh mã vạch nguồn. | +| Không có đầu ra nào | `imagePath` sai hoặc tệp không thể truy cập. | Kiểm tra lại đường dẫn tệp; đảm bảo ứng dụng có quyền đọc. | +| Ngoại lệ “Object disposed” | Cố gắng sử dụng `reader` sau khối `using`. | Giữ mọi xử lý bên trong ` | + +## Bạn nên học gì tiếp theo? + +Các hướng dẫn sau đây bao quát các chủ đề liên quan chặt chẽ, xây dựng trên các kỹ thuật đã trình bày trong hướng dẫn này. Mỗi tài nguyên bao gồm các ví dụ mã đầy đủ hoạt động cùng giải thích từng bước để giúp bạn làm chủ các tính năng API bổ sung và khám phá các cách triển khai thay thế trong dự án của mình. + +- [DataMatrix Reader Programming with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/datamatrix-reader-programming/) +- [DotCode Reader Initialization with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-reader-initialization/) +- [How to Read DataMatrix Barcodes with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-reading/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file