From 56e3c15913350ececb60b35416df53ec512135ea Mon Sep 17 00:00:00 2001 From: Muhammad Adil Date: Wed, 19 Aug 2026 10:39:21 +0000 Subject: [PATCH] Add 4 barcode python-java tutorials Categories: general Source: AI Search API Tutorials: - How to generate postal barcode in C# with Aspose.BarCode - How to create a barcode PNG file with adjustable height in C# - How to create databar PNG images with C# and Aspose.BarCode - C# barcode generator: create custom DataBar barcodes Auto-generated by Professionalize.Tutorials Agent --- .../_index.md | 250 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 156 +++++++++++ .../_index.md | 210 +++++++++++++++ .../_index.md | 248 +++++++++++++++++ .../_index.md | 217 +++++++++++++++ .../_index.md | 155 +++++++++++ .../_index.md | 209 ++++++++++++++ .../_index.md | 251 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 158 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 250 +++++++++++++++++ .../_index.md | 220 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 210 +++++++++++++++ .../_index.md | 251 +++++++++++++++++ .../og-image.png | Bin 0 -> 52857 bytes .../_index.md | 221 +++++++++++++++ .../og-image.png | Bin 0 -> 52754 bytes .../_index.md | 159 +++++++++++ .../og-image.png | Bin 0 -> 51532 bytes .../_index.md | 212 +++++++++++++++ .../og-image.png | Bin 0 -> 56026 bytes .../_index.md | 253 +++++++++++++++++ .../_index.md | 221 +++++++++++++++ .../_index.md | 158 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 251 +++++++++++++++++ .../_index.md | 221 +++++++++++++++ .../_index.md | 158 +++++++++++ .../_index.md | 214 +++++++++++++++ .../_index.md | 251 +++++++++++++++++ .../_index.md | 221 +++++++++++++++ .../_index.md | 158 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 251 +++++++++++++++++ .../_index.md | 220 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 247 +++++++++++++++++ .../_index.md | 215 +++++++++++++++ .../_index.md | 155 +++++++++++ .../_index.md | 210 +++++++++++++++ .../_index.md | 252 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 159 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 250 +++++++++++++++++ .../_index.md | 220 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 252 +++++++++++++++++ .../_index.md | 221 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 211 +++++++++++++++ .../_index.md | 247 +++++++++++++++++ .../_index.md | 213 +++++++++++++++ .../_index.md | 155 +++++++++++ .../_index.md | 209 ++++++++++++++ .../_index.md | 249 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 156 +++++++++++ .../_index.md | 208 ++++++++++++++ .../_index.md | 252 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 158 +++++++++++ .../_index.md | 214 +++++++++++++++ .../_index.md | 253 +++++++++++++++++ .../_index.md | 221 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 211 +++++++++++++++ .../_index.md | 254 ++++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 158 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 252 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 212 +++++++++++++++ .../_index.md | 249 +++++++++++++++++ .../_index.md | 220 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 211 +++++++++++++++ .../_index.md | 250 +++++++++++++++++ .../_index.md | 218 +++++++++++++++ .../_index.md | 156 +++++++++++ .../_index.md | 210 +++++++++++++++ .../_index.md | 253 +++++++++++++++++ .../_index.md | 222 +++++++++++++++ .../_index.md | 159 +++++++++++ .../_index.md | 210 +++++++++++++++ .../_index.md | 252 +++++++++++++++++ .../_index.md | 219 +++++++++++++++ .../_index.md | 157 +++++++++++ .../_index.md | 212 +++++++++++++++ 96 files changed, 19282 insertions(+) create mode 100644 barcode/arabic/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/arabic/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/arabic/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/arabic/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/chinese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/chinese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/chinese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/chinese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/czech/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/czech/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/czech/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/czech/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/dutch/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/dutch/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/dutch/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/dutch/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/english/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/english/python-java/general/c-barcode-generator-create-custom-databar-barcodes/og-image.png create mode 100644 barcode/english/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/english/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/og-image.png create mode 100644 barcode/english/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/english/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/og-image.png create mode 100644 barcode/english/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/english/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/og-image.png create mode 100644 barcode/french/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/french/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/french/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/french/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/german/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/german/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/german/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/german/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/greek/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/greek/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/greek/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/greek/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/hindi/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/hindi/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/hindi/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/hindi/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/hongkong/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/hongkong/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/hongkong/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/hongkong/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/hungarian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/hungarian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/hungarian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/hungarian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/indonesian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/indonesian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/indonesian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/indonesian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/italian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/italian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/italian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/italian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/japanese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/japanese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/japanese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/japanese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/korean/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/korean/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/korean/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/korean/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/polish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/polish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/polish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/polish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/portuguese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/portuguese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/portuguese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/portuguese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/russian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/russian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/russian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/russian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/spanish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/spanish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/spanish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/spanish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/swedish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/swedish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/swedish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/swedish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/thai/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/thai/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/thai/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/thai/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/turkish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/turkish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/turkish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/turkish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md create mode 100644 barcode/vietnamese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md create mode 100644 barcode/vietnamese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md create mode 100644 barcode/vietnamese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md create mode 100644 barcode/vietnamese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md diff --git a/barcode/arabic/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/arabic/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..f4a83907b --- /dev/null +++ b/barcode/arabic/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,250 @@ +--- +category: general +date: 2026-08-19 +description: دليل مولد الباركود بلغة C# يوضح كيفية إنشاء باركود DataBar Expanded Stacked، + وتخصيص حجم الباركود، وتكوين الصفوف والأعمدة. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: ar +lastmod: 2026-08-19 +og_description: يوضح لك برنامج توليد الباركود بلغة C# كيفية إنشاء باركود DataBar، + وتخصيص الحجم، وتكوين الصفوف والأعمدة للحصول على مخرجات دقيقة. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: مولد الباركود C# – دليل خطوة بخطوة لإنشاء باركود DataBar مخصص +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'مولد الباركود C#: إنشاء باركود DataBar مخصص' +url: /ar/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# مولد الباركود C#: إنشاء باركود DataBar مخصص + +إذا كنت بحاجة إلى **c# barcode generator** يمكنه إنتاج رموز DataBar Expanded Stacked، فإن هذا الدليل يوضح لك بالضبط كيفية إنشاء صور باركود مع صفوف وأعمدة مخصصة. ستتعلم كيفية تكوين معلمات databar، ضبط حجم الباركود، وحفظ النتيجة كملفات PNG. + +إنشاء الباركود برمجياً يزيل خطوات التصميم اليدوي ويضمن مخرجات متسقة عبر المنصات. في هذا الدرس ستقوم بـ: + +* تثبيت وإضافة مرجع لمكتبة Aspose.BarCode for .NET (أو أي حزمة متوافقة). +* إنشاء مولد باركود لرموز DataBar Expanded Stacked. +* **How to generate barcode** صور مع إعدادات أعمدة وصفوف محددة. +* **Customize barcode size** عن طريق التحكم في صفوف وأعمدة DataBar. +* **Configure databar parameters** مثل النص، التنسيق، وجودة الصورة. + +## المتطلبات المسبقة + +* .NET 6.0 SDK أو أحدث مثبت. +* بيئة تطوير C# (Visual Studio، VS Code، Rider، إلخ). +* حزمة NuGet `Aspose.BarCode` (أو مكتبة مكافئة توفر `BarcodeGenerator`، `EncodeTypes`، و `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## استخدام مولد الباركود C# لإنشاء باركود DataBar + +الأقسام التالية تقودك خلال كل خطوة. التركيز الأساسي هو على واجهة برمجة التطبيقات **c# barcode generator**، لكن النمط نفسه ينطبق على مكتبات باركود أخرى تعرض خصائص مماثلة. + +### الخطوة 1: تهيئة مولد الباركود بنص تجريبي + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*لماذا هذه الخطوة؟* +`BarcodeGenerator` هو نقطة الدخول لجميع مهام إنشاء الباركود. توفير تعداد `EncodeTypes.DatabarExpandedStacked` يخبر المكتبة أي رموز يجب استخدامها، بينما يصبح معامل النص القيمة القابلة للقراءة للإنسان المشفرة في الرمز. + +### الخطوة 2: ضبط عدد الأعمدة (يتم استخدام الصفوف الافتراضية) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*لماذا هذه الخطوة؟* +رموز DataBar Expanded Stacked تتكون من عناصر خطية مكدسة. تعديل خاصية `Columns` يغيّر الكثافة الأفقية، مما يسمح لك بملء سلاسل بيانات أطول دون زيادة الارتفاع الكلي. هذا يخصّص **customizes barcode size** مباشرة. + +### الخطوة 3: حفظ صورة الباركود التي تستخدم أربعة أعمدة + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*ما تراه:* +الصورة المحفوظة `DatabarCols4.png` تعرض باركود DataBar أوسع من الافتراضي لأنه يحتوي على أربعة أعمدة. يمكنك فتح الملف في أي عارض صور للتحقق من النتيجة. + +### الخطوة 4: إعادة تهيئة المولد لتكوين جديد + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*لماذا إعادة التهيئة؟* +تغيير خاصية `Rows` مع الحفاظ على إعداد العمود السابق قد ينتج تركيبة غير متوقعة. البدء بمثيل جديد يضمن أن المعامل المقصود فقط (`Rows`) يؤثر على الصورة التالية. + +### الخطوة 5: ضبط عدد الصفوف (يتم استخدام الأعمدة الافتراضية) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*لماذا هذه الخطوة؟* +خاصية `Rows` تتحكم في التكديس العمودي. زيادة الصفوف تجعل الباركود أطول، وهو ما يمكن أن يكون مفيدًا عندما يكون الفضاء محدودًا أفقياً ولكن وفيرًا عموديًا. هذه طريقة أخرى لـ **customize barcode size**. + +### الخطوة 6: حفظ صورة الباركود التي تستخدم ثلاثة صفوف + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*النتيجة:* +`DatabarRows3.png` يظهر باركودًا أطول مع ثلاثة صفوف مكدسة، مما يوضح كيف أن **configure databar parameters** يؤثر على المظهر البصري. + +## مثال كامل قابل للتنفيذ + +فيما يلي برنامج كامل يمكنك نسخه، لصقه، وتشغيله. يتضمن جميع الاستيرادات، معالجة الأخطاء، وتعليقات للتوضيح. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**الناتج المتوقع** + +تشغيل البرنامج ينتج ملفين PNG: + +* `DatabarCols4.png` – باركود DataBar عريض بأربعة أعمدة. +* `DatabarRows3.png` – باركود DataBar طويل بثلاثة صفوف. + +افتح الصور لتأكيد أن أبعاد الباركود تتطابق مع المعلمات المكوَّنة. + +## الأسئلة الشائعة ومعالجة الحالات الخاصة + +| السؤال | الإجابة | +|----------|--------| +| *ماذا لو احتجت إلى كل من الصفوف المخصصة **و** الأعمدة؟* | قم بتعيين `Rows` **و** `Columns` على نفس مثيل `BarcodeGenerator` قبل استدعاء `Save`. تقوم المكتبة بدمج القيمتين لإنتاج شبكة بالحجم المطلوب. | +| *هل يمكنني تغيير تنسيق الصورة؟* | نعم. استبدل `BarCodeImageFormat.Png` بـ `Jpeg` أو `Bmp` أو `Gif` لتناسب سير عملك. | +| *ماذا يحدث عندما يكون النص أطول مما يمكن للرمز استيعابه؟* | المولد يرمي استثناء `ArgumentException`. قصّ النص أو زد `Columns`/`Rows` لتوفير سعة أكبر. | +| *هل هناك طريقة لتحديد DPI أو دقة الصورة؟* | استخدم `generator.Parameters.ImageResolution` لتحديد DPI المطلوب قبل الحفظ. هذا يضيف مزيدًا من **customizes barcode size** للطباعة عالية الدقة. | +| *هل تدعم المكتبة متغيرات DataBar أخرى؟* | نعم. استبدل `EncodeTypes.DatabarExpandedStacked` بـ `DatabarExpanded` أو `DatabarLimited`، إلخ، مع الحفاظ على نفس بنية المعاملات. | + +## نصائح لتوليد باركود موثوق + +* **Pro tip:** تحقق دائمًا من الصورة المولدة باستخدام ماسح ضوئي أو تطبيق هاتف قبل نشرها في الإنتاج. +* **Watch out for:** المجلدات الفارغة أو غير الموجودة—`Save` سيطرح استثناء إذا لم يكن المسار موجودًا. أنشئ المجلد برمجيًا إذا لزم الأمر. +* **Performance note:** إعادة استخدام مثيل واحد من `BarcodeGenerator` وتغيير `Rows` أو `Columns` فقط يمكن أن يقلل من عبء إنشاء الكائنات عند توليد العديد من الباركود في حلقة. + +## الخلاصة + +أنت الآن تعرف كيف تستخدم **c# barcode generator** لإنشاء صور **databar barcode**، **تخصيص حجم الباركود**، و **تكوين معلمات databar** مثل الصفوف والأعمدة. من خلال ضبط هذه الإعدادات يمكنك ملاءمة الباركود مع أي متطلبات تخطيط مع الحفاظ على موثوقية القراءة. + +بعد ذلك، استكشف المواضيع ذات الصلة مثل **how to generate barcode** PDFs، تضمين الباركود في التقارير، أو التحويل إلى رموز أخرى (QR، Code‑128، إلخ). جرّب `Rows`، `Columns`، ودقة الصور المختلفة للعثور على التكوين الأمثل لحالتك الخاصة. + +--- + + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مصدر يتضمن أمثلة شاملة من الشيفرة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [كيفية إنشاء وضبط ارتفاع الباركود لـ One-Dimensional Databar باستخدام Aspose.BarCode لـ .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [إنشاء باركودات One-Dimensional Databar ثنائية الأبعاد باستخدام Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [إنشاء باركود Aspose.BarCode Databar باستخدام .NET API – تكوين الصفوف والأعمدة](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/arabic/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..50dad539e --- /dev/null +++ b/barcode/arabic/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: تعلم كيفية إنشاء ملف باركود بصيغة PNG باستخدام C# وتعديل ارتفاعه، مع + تغطية كيفية إنشاء صور الباركود وتغيير ارتفاع الباركود بسهولة. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: ar +lastmod: 2026-08-19 +og_description: أنشئ ملف باركود بصيغة PNG باستخدام C# وتعلم كيفية توليد صور الباركود، + وضبط ارتفاع الباركود، وتغيير ارتفاعه للحصول على مسح أمثل. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: إنشاء ملف باركود PNG في C# – دليل خطوة بخطوة +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: كيفية إنشاء ملف باركود بصيغة PNG بارتفاع قابل للتعديل في C# +url: /ar/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# كيفية إنشاء ملف PNG للباركود بارتفاع قابل للتعديل في C# + +إذا كنت بحاجة إلى إنشاء **ملف PNG للباركود** في C#، فإن هذا الدليل يوضح لك بالضبط كيفية القيام بذلك. ستشاهد مثالًا كاملاً قابلاً للتنفيذ يوضح **كيفية توليد صور الباركود** وكيفية **ضبط ارتفاع الباركود** لمختلف حالات الاستخدام. + +إنشاء ملف PNG للباركود هو طلب شائع لأنظمة الجرد، وأجهزة نقاط البيع، وأي تطبيق يحتاج إلى طباعة أو عرض بيانات قابلة للقراءة آليًا. بنهاية هذا الدليل ستكون قادرًا على تغيير ارتفاع الباركود، حفظ ملفات PNG متعددة، وفهم تأثير الارتفاع على موثوقية القراءة. + +## المتطلبات المسبقة + +قبل أن تبدأ، تأكد من وجود ما يلي: + +* .NET 6.0 SDK أو أحدث مثبت +* Visual Studio 2022 (أو أي بيئة تطوير تدعم .NET) +* حزمة **Aspose.BarCode for .NET** من NuGet (العينة البرمجية تستخدم هذه المكتبة) + +يمكنك إضافة الحزمة من سطر الأوامر: + +```bash +dotnet add package Aspose.BarCode +``` + +> **نصيحة احترافية:** نسخة التقييم المجانية من Aspose.BarCode تكفي للتطوير والاختبار. للإنتاج، احصل على مفتاح مرخص. + +## تثبيت مكتبة الباركود + +الخطوة الأولى هي الإشارة إلى المكتبة في مشروعك. أضف توجيهات `using` التالية في أعلى ملف C# الخاص بك: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +هذه المساحات الاسمية تمنحك الوصول إلى `BarcodeGenerator` و `EncodeTypes` و `BarCodeImageFormat`. + +## إنشاء ملف PNG للباركود + +الآن نقوم بإنشاء كائن `BarcodeGenerator` سيولد **ملف PNG للباركود**. يستخدم المثال الترميز Databar OmniDirectional، لكن يمكنك استبدال `EncodeTypes.DatabarOmniDirectional` بأي نوع مدعوم آخر. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +السلسلة `"(01)12345678901231"` تتبع تنسيق معرف التطبيق GS1 لرقم GTIN المكوّن من 14 رقمًا. عدّل البيانات لتتناسب مع معرفات منتجاتك الخاصة. + +## ضبط البُعد X (اختياري) + +البُعد X يحدد عرض وحدة الباركود الواحدة. قيمة مبنية على البكسل تمنحك تحكمًا دقيقًا في حجم الصورة. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +قيمة `2` بكسل تعمل جيدًا لمعظم شاشات العرض. زدها إذا احتجت باركودًا أكبر عند الطباعة. + +## ضبط ارتفاع الباركود وحفظ ملف PNG للباركود + +خاصية **BarHeight** تتحكم في الحجم العمودي للخطوط. تغيير هذه القيمة يتيح لك **ضبط ارتفاع الباركود** دون التأثير على البيانات المشفرة. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +الملف `DatabarBarHeight30Pixels.png` أصبح الآن **ملف PNG للباركود** بارتفاع 30 بكسل. + +لـ **تغيير ارتفاع الباركود** وإنشاء صورة ثانية، ما عليك سوى تعيين قيمة جديدة واستدعاء `Save` مرة أخرى: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +الآن لديك ملفان PNG—أحدهما بارتفاع 30 بكسل والآخر بارتفاع 60 بكسل—مما يوضح كيفية **ضبط ارتفاع الباركود** في الوقت الفعلي. + +### لماذا ارتفاع الخط مهم + +* **قابلية القراءة:** الماسحات الضوئية تتطلب ارتفاعًا أدنى لاكتشاف موثوق. باركود قصير جدًا قد يُفوت، خاصةً على الكاميرات منخفضة الدقة. +* **الجمالية:** مطابقة ارتفاع الباركود مع عناصر التصميم المحيطة يخلق واجهة أكثر نظافة. +* **قيود الطباعة:** بعض طابعات الملصقات لديها فتحات ارتفاع ثابت؛ ضبط ارتفاع الباركود يضمن ملاءمته. + +**أفضل ممارسة:** حافظ على أن يكون الارتفاع مضاعفًا للبُعد X (مثلاً 30 بكسل عندما يكون البُعد X هو 2 بكسل) للحفاظ على النسبة وتجنب التشويه. + +## المثال الكامل + +فيما يلي البرنامج الكامل المستقل الذي يمكنك لصقه في تطبيق Console وتشغيله فورًا. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**الناتج المتوقع** + +تشغيل البرنامج ينشئ ملفين في دليل العمل الخاص بالملف التنفيذي: + +* `DatabarBarHeight30Pixels.png` – ملف PNG للباركود بارتفاع 30 بكسل +* `DatabarBarHeight60Pixels.png` – ملف PNG للباركود بارتفاع 60 بكسل + +افتح أي من ملفي PNG باستخدام عارض صور؛ سترى باركود Databar OmniDirectional واضحًا جاهزًا للقراءة. + +## الحالات الخاصة واستكشاف الأخطاء + +| الحالة | ما الذي يجب فحصه | الإصلاح الموصى به | +|-----------|---------------|-----------------| +| الباركود يظهر غير واضح | البُعد X منخفض بالنسبة للارتفاع المختار | زيادة `XDimension.Pixels` (مثلاً من 2 إلى 3) | +| الفحص يفشل على باركود منخفض الارتفاع | الارتفاع أقل من الحد الأدنى للماسحة | ضبط `BarHeight.Pixels` ليكون على الأقل 30 بكسل (أو وفق مواصفات الماسحة) | +| ملف PNG فارغ أو تالف | مسار الإخراج غير صالح أو عدم وجود صلاحية كتابة | استخدم مسارًا مطلقًا أو تأكد من أن التطبيق يملك صلاحية الكتابة | +| الحاجة إلى ترميز مختلف | `EncodeTypes` الحالي غير مناسب | استبدل `EncodeTypes.DatabarOmniDirectional` بقيمة enum أخرى (مثل `EncodeTypes.Code128`) | + +## الأسئلة المتكررة + +**س: هل يمكنني توليد صيغ صور أخرى (JPEG, BMP)؟** +ج: نعم. استبدل `BarCodeImageFormat.Png` بـ `BarCodeImageFormat.Jpeg` أو `BarCodeImageFormat.Bmp` وغيرها. + +**س: كيف يمكنني تضمين ملف PNG في صفحة ويب؟** +ج: قدم ملف PNG المولد عبر نقطة نهاية HTTP أو حوّله إلى سلسلة Base64 وضعها في خاصية `src` لعلامة ``. + +**س: هل هناك طريقة لتعيين لون الخلفية؟** +ج: استخدم `generator.Parameters.Image.BackgroundColor = Color.White;` (أو أي لون من `System.Drawing.Color`). + +## الخلاصة + +أنت الآن تعرف كيفية **توليد ملف PNG للباركود** في C# وكيفية **ضبط ارتفاع الباركود** بدقة لتلبية متطلبات القراءة أو التصميم. عبر تغيير خاصية `BarHeight.Pixels` يمكنك **تغيير ارتفاع الباركود** في الوقت الفعلي وإنتاج عدة ملفات PNG من قاعدة شفرة واحدة. + +بعد ذلك، استكشف خيارات تخصيص أخرى مثل لون الخطوط، الهوامش، وإضافة النص القابل للقراءة بشريًا. يمكنك أيضًا تجربة ترميزات مختلفة (`EncodeTypes.Code128`, `EncodeTypes.QR`) لتوسيع نطاق البيانات التي يمكنك ترميزها. + +برمجة سعيدة، ونتمنى أن تُقرأ باركوداتك دائمًا من المحاولة الأولى! + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مصدر يتضمن أمثلة شفرة كاملة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/arabic/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/arabic/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..b70a98a3a --- /dev/null +++ b/barcode/arabic/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,156 @@ +--- +category: general +date: 2026-08-19 +description: إنشاء ملفات PNG من نوع Databar في C# باستخدام Aspose.BarCode. تعلّم كيفية + توليد صور Databar، وتكوين معلمات Databar، وحفظ النتيجة بصيغة PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: ar +lastmod: 2026-08-19 +og_description: إنشاء ملفات PNG لباركود Databar باستخدام C# و Aspose.BarCode. يشرح + هذا الدليل كيفية إنشاء صور Databar، وتكوين معلمات Databar مثل البُعد X ونسبة العرض + إلى الارتفاع، وحفظ ملفات PNG عالية الجودة للطباعة أو الاستخدام على الويب. +og_image_alt: create databar PNG example +og_title: إنشاء صور PNG لبار البيانات في C# – دليل خطوة بخطوة +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: كيفية إنشاء صور PNG لباركود Databar باستخدام C# و Aspose.BarCode +url: /ar/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# كيفية إنشاء صور PNG لباركود DataBar باستخدام C# و Aspose.BarCode + +إذا كنت بحاجة إلى **إنشاء ملفات PNG لباركود DataBar** في تطبيق .NET، فإن هذا الدليل يوضح لك بالضبط كيفية القيام بذلك. سترى مثالًا كاملاً قابلاً للتنفيذ يولد رموز DataBar مكدسة متعددة الاتجاهات، يضبط المعلمات الرئيسية، ويحفظ ملفي PNG بنسب أبعاد مختلفة. + +إنشاء صورة DataBar لا يقتصر فقط على استدعاء طريقة واحدة. عليك أيضًا **تكوين معلمات DataBar** مثل البُعد X (عرض الوحدة) ونسبة الأبعاد لتلبية مواصفات الطباعة أو المسح. بنهاية هذا الدليل ستفهم **كيفية إنشاء رسومات DataBar** التي تعمل بشكل موثوق في السيناريوهات الواقعية. + +## المتطلبات المسبقة + +- .NET 6.0 أو أحدث (الكود يعمل أيضًا مع .NET Framework 4.7+) +- Visual Studio 2022 أو أي بيئة تطوير متوافقة مع C# +- ترخيص صالح لـ **Aspose.BarCode for .NET** (التقييم المجاني يعمل للاختبار) +- إلمام أساسي بصياغة C# + +> **نصيحة احترافية:** إذا لم يكن لديك ترخيص بعد، يمكنك طلب مفتاح تقييم مؤقت من بوابة Aspose. سلوك الـ API يبقى نفسه؛ فقط العلامة المائية تتغير. + +## الخطوة 1: تثبيت حزمة NuGet الخاصة بـ Aspose.BarCode + +افتح مشروعك في Visual Studio، انقر بزر الماوس الأيمن على الحل، واختر **Manage NuGet Packages**. ابحث عن `Aspose.BarCode` وقم بتثبيت أحدث نسخة مستقرة. + +```bash +dotnet add package Aspose.BarCode +``` + +هذا الأمر يضيف تجميع `Aspose.BarCode` إلى مشروعك ويجعل فئة `BarcodeGenerator` متاحة. + +## الخطوة 2: تهيئة مولد الباركود لباركود DataBar مكدس متعدد الاتجاهات + +يستقبل مُنشئ `BarcodeGenerator` معاملين: نوع الباركود وسلسلة البيانات الخام. للحصول على DataBar مكدس متعدد الاتجاهات، تستخدم `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**لماذا هذا مهم:** ثابت `EncodeTypes.DatabarStackedOmniDirectional` يخبر المكتبة بإنشاء باركود يمكن قراءته من أي اتجاه، وهو مثالي لملصقات الأرفف في المتاجر. + +## الخطوة 3: ضبط البُعد X (عرض الوحدة) بالبكسل + +البُعد X يتحكم في حجم أصغر عنصر شريط. ضبطه بالبكسل يمنحك تحكمًا دقيقًا في حجم الصورة النهائي. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +قيمة **2 بكسل** تمثل توازنًا جيدًا بين قابلية القراءة والضغط لمعظم طابعات الملصقات. عدّل هذه القيمة إذا كنت تحتاج إلى وحدات أكبر أو أصغر. + +## الخطوة 4: ضبط نسبة الأبعاد الأولى وحفظ ملف PNG + +نسبة الأبعاد تؤثر على ارتفاع DataBar المكدس. نسبة أبعاد **15** تنتج باركود قصير نسبيًا، بينما **30** تجعلها أطول. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +طريقة `Save` تكتب الباركود المُولد إلى ملف PNG. PNG هو تنسيق بدون فقدان، مما يحافظ على الحواف الواضحة المطلوبة لقارئات الباركود. + +## الخطوة 5: تغيير نسبة الأبعاد وحفظ PNG ثاني + +يمكنك إعادة استخدام نفس كائن `BarcodeGenerator` لإنتاج تنوعات ببساطة عن طريق تغيير نسبة الأبعاد. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +الآن لديك ملفا PNG—`DatabarAspectRatio15.png` و `DatabarAspectRatio30.png`—كل منهما بكثافة بصرية مختلفة. + +## الخطوة 6: التحقق من النتيجة + +افتح ملفات PNG المُولدة في أي عارض صور. يجب أن ترى باركود DataBar نظيفًا وعالي التباين. مسح الصور باستخدام ماسح باركود على الهاتف الذكي يؤكد أن كلا نسبتي الأبعاد تُفكّ الشيفرة إلى القيمة الأصلية للـ GTIN `12345678901231`. + +![create databar PNG example](databar_example.png) + +*الصورة أعلاه تُظهر ملفي PNG جنبًا إلى جنب. الصورة اليسرى تستخدم نسبة أبعاد 15، واليمين يستخدم نسبة أبعاد 30.* + +## الاختلافات الشائعة وحالات الحافة + +| السيناريو | ما الذي يجب تغييره | السبب | +|----------|-------------------|--------| +| **بيانات مختلفة** | استبدل السلسلة `(01)12345678901231` بأي معرف تطبيق GS1 صالح والبيانات | يسمح لك بترميز معرفات المنتجات، أرقام السلسلة، إلخ. | +| **دقة أعلى** | زيادة `XDimension.Pixels` إلى 3 أو 4 | مطلوب عندما يُطبع الباركود بأحجام كبيرة أو يُمسح من مسافة. | +| **أنواع DataBar أخرى** | استخدم `EncodeTypes.DatabarStacked` أو `EncodeTypes.DatabarExpanded` | اختر النوع الذي يناسب تخطيط ملصقك. | +| **خلفية شفافة** | مرّر `BarCodeImageFormat.Png` مع `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | مفيد لتراكب الباركود على ملصقات ملونة. | + +> **احذر من:** ضبط بُعد X صغير جدًا (< 1 بكسل) قد ينتج باركودًا يبدو غير واضح بعد + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مصدر يتضمن أمثلة شفرة كاملة تعمل مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [كيفية إنشاء وضبط ارتفاع الباركود لباركود DataBar أحادي البعد باستخدام Aspose.BarCode لـ .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [إنشاء ترميز GS1 لباركود DataBar أحادي البعد باستخدام Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [إنشاء باركود Aspose.BarCode DataBar باستخدام .NET API – تكوين الصف والعمود](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/arabic/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..2278138b9 --- /dev/null +++ b/barcode/arabic/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,210 @@ +--- +category: general +date: 2026-08-19 +description: تعلم كيفية إنشاء باركود بريدي في C# باستخدام Aspere.BarCode. يوضح هذا + الدليل خطوة بخطوة كيفية إنشاء باركود لتنسيقات Planet و RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: ar +lastmod: 2026-08-19 +og_description: إنشاء رمز شريطي بريدي في C# باستخدام Aspose.BarCode. اتبع هذا الدليل + لتعلم كيفية إنشاء رمز شريطي لـ Planet و RM4SCC بأبعاد مخصصة. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: إنشاء رمز شريطي بريدي في C# – دليل Aspose.BarCode الكامل +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: كيفية إنشاء باركود بريدي في C# باستخدام Aspose.BarCode +url: /ar/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# كيفية إنشاء الباركود البريدي في C# باستخدام Aspose.BarCode + +إذا كنت بحاجة إلى **إنشاء باركود بريدي** لتطبيقات البريد، يوضح لك هذا الدليل بالضبط كيفية إنشاء الباركود باستخدام مكتبة Aspose.BarCode. سترى مثالًا كاملاً قابلاً للتنفيذ ينشئ كلًا من باركود Planet (يتم حساب الارتفاع تلقائيًا) وباركود RM4SCC بارتفاع شريط صريح. + +إنشاء باركود بريدي هو طلب شائع لبرمجيات اللوجستيات، طابعات الملصقات الأوتوماتيكية، وأنظمة البريد الجماعي. بنهاية هذا الدرس ستتمكن من دمج توليد الباركود في أي مشروع .NET، تخصيص البُعد X، والتحكم في ارتفاع الشريط عندما يسمح التنسيق القياسي بذلك. + +**ما ستتعلمه** + +* كيفية إعداد Aspose.BarCode في مشروع C#. +* كيفية إنشاء باركودات Planet وRM4SCC البريدية. +* كيفية تعديل البُعد X (عرض الوحدة) وارتفاع الشريط. +* كيفية حفظ النتيجة كصورة PNG. + +لا توجد خدمات خارجية مطلوبة — كل شيء يعمل محليًا بعد الإشارة إلى حزمة Aspose.BarCode عبر NuGet. + +## المتطلبات المسبقة + +* .NET 6.0 SDK أو أحدث (الكود يعمل أيضًا مع .NET Framework 4.7+). +* Visual Studio 2022، Visual Studio Code، أو أي بيئة تطوير C# تفضلها. +* حزمة Aspose.BarCode for .NET – قم بتثبيتها عبر NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## إنشاء باركود بريدي باستخدام Aspose.BarCode + +الأقسام التالية تقودك خطوة بخطوة، من إنشاء كائنات المولد إلى حفظ ملفات PNG النهائية. + +### الخطوة 1: إنشاء باركود Planet (ارتفاع تلقائي) + +Planet هو باركود بريدي يُستخدم في العديد من البلدان لفرز البريد. عند إنشاء باركود Planet، تقوم المكتبة تلقائيًا بتحديد ارتفاع الشريط الأمثل بناءً على البيانات المشفرة. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**لماذا يعمل هذا** – `EncodeTypes.Planet` يخبر Aspose.BarCode باستخدام رموز Planet. خاصية `XDimension` تتحكم في عرض أصغر شريط (الوحدة). بما أن Planet لا يتطلب ارتفاع شريط ثابت، تحسب المكتبة ارتفاعًا مناسبًا تلقائيًا، مما يبسط الكود. + +### الخطوة 2: إنشاء باركود RM4SCC بارتفاع صريح + +RM4SCC هو رمز بريدي آخر غالبًا ما يتطلب ارتفاع شريط محدد لتوافق الماسحات. يوضح الكود التالي كيفية تعيين ذلك الارتفاع يدويًا. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**لماذا تقوم بتعيين الارتفاع** – بعض الماسحات البريدية تتوقع حدًا أدنى لارتفاع الشريط. بتعيين `BarHeight.Pixels = 100`، تضمن أن الصورة المولدة تلبي تلك المتطلبات. يبقى البُعد X متسقًا مع باركود Planet بحيث تشترك الصورتان في نفس الكثافة البصرية. + +### الخطوة 3: التحقق من المخرجات + +بعد تشغيل البرنامج، افتح ملفي PNG الموجودين في `YOUR_DIRECTORY`. يجب أن ترى باركودين مميزين: + +* `PostalPlanetBarHeightNone.png` – باركود Planet بارتفاع محسوب تلقائيًا. +* `PostalRM4SCCBarHeight100Pixels.png` – باركود RM4SCC بارتفاع 100 بكسل. + +يمكن إدخال الصورتين مباشرةً إلى طابعات الملصقات أو عرضهما في تطبيق ويب. + +![صورة باركود بريدي تم إنشاؤها باستخدام Aspose.BarCode](generated-postal-barcode.png) + +*نص بديل للصورة:* **Generated postal barcode** image using Aspose.BarCode (demonstrates how to generate postal barcode). + +## كيفية إنشاء باركود بأبعاد مخصصة (متقدم) + +إذا كنت بحاجة إلى ضبط معلمات أخرى — مثل الهوامش، موضع النص، أو اللون — توفر Aspose.BarCode كائن `Parameters` غني. المثال التالي يضيف خلفية بيضاء ويعطل النص القابل للقراءة البشرية. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**متى تستخدم هذا** – تعطيل النص القابل للقراءة البشرية شائع في الفرز الآلي حيث يهم النمط القابل للقراءة آليًا فقط. ضبط لون الخلفية يضمن طباعة الباركود بشكل صحيح على وسائط شفافة. + +## المشكلات الشائعة ونصائح احترافية + +| المشكلة | لماذا يحدث | الحل | +|-------|----------------|-----| +| يظهر الباركود مشوهًا | البُعد X كبير جدًا مقارنةً بحجم الصورة | حافظ على `XDimension.Pixels` بين 2 و5 لمعظم الباركودات البريدية | +| الماسح يرفض الصورة | ارتفاع الشريط أقل من الحد الأدنى المطلوب من قبل خدمة البريد | استخدم `BarHeight.Pixels` ≥ 80 لـ RM4SCC ما لم يحدد المواصفات غير ذلك | +| حجم ملف PNG كبير | دقة الصورة أعلى من اللازم | احفظ كـ PNG‑8 (`BarCodeImageFormat.Png8`) أو قلل أبعاد البكسل | + +**نصيحة احترافية:** اختبر دائمًا الباركود المولد باستخدام ماسح حقيقي قبل النشر في بيئة الإنتاج. الفروقات البصرية الصغيرة قد تؤثر على قابلية القراءة. + +## الكود الكامل + +انسخ الكتلة الكاملة أدناه إلى تطبيق وحدة تحكم جديد (`Program.cs`). عدل مسارات الإخراج إلى مجلد يمكن لعملية الكتابة فيه. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +عند تشغيل البرنامج سيطبع *“Barcodes generated successfully.”* وينشئ ملفي PNG في دليل العمل الخاص بالتنفيذ. + +## الخلاصة + +أنت الآن تعرف **كيفية إنشاء باركود بريدي** في C# باستخدام Aspose.BarCode، مع تغطية كل من باركودات Planet ذات الارتفاع التلقائي وباركودات RM4SCC ذات الارتفاع الثابت. كما أظهر الدليل **كيفية إنشاء باركود** بأبعاد X مخصصة، ارتفاع شريط، وخيارات بصرية، مما يوفر أساسًا قويًا لأي مشروع أتمتة بريدية. + +الخطوات التالية التي قد تستكشفها: + +* دمج ملفات PNG المولدة في فاتورة PDF باستخدام Aspose.PDF. +* تحويل تنسيق الإخراج إلى SVG للرسومات المتجهة القابلة للتوسع. +* استخدام فئة `BarcodeReader` للتحقق من البيانات المشفرة برمجيًا. + +لا تتردد في تجربة رموز مختلفة (مثل `EncodeTypes.Postnet`) ومشاركة نتائجك مع المجتمع. Happy coding! + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مصدر يتضمن أمثلة شاملة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [كيفية إنشاء صورة باركود مع تخصيص مساحة إضافية باستخدام Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [كيفية تكوين باركود – Code 39 باستخدام Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [كيفية إنشاء باركود DataMatrix (ECC 200) باستخدام Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/chinese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..92fc754f1 --- /dev/null +++ b/barcode/chinese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,248 @@ +--- +category: general +date: 2026-08-19 +description: C# 条码生成器教程展示了如何生成 DataBar Expanded Stacked 条码、定制条码尺寸以及配置行和列。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: zh +lastmod: 2026-08-19 +og_description: C# 条形码生成器教程教您如何生成 DataBar 条码、定制尺寸以及配置行列以实现精确输出。 +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# 条码生成器 – 定制 DataBar 条码的分步指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: C# 条码生成器:创建自定义 DataBar 条码 +url: /zh/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# 条形码生成器:创建自定义 DataBar 条码 + +如果您需要一个 **c# barcode generator** 能够生成 DataBar Expanded Stacked 符号,本指南将详细演示如何使用自定义行列生成条码图像。您将学习配置 databar 参数、调整条码尺寸,并将结果保存为 PNG 文件。 + +以编程方式生成条码可以省去手动设计步骤,并确保跨平台输出的一致性。在本教程中,您将: + +* 安装并引用 Aspose.BarCode for .NET 库(或任何兼容的包)。 +* 为 DataBar Expanded Stacked 符号创建条码生成器。 +* **如何生成条码** 图像并设置特定的列和行。 +* 通过控制 DataBar 行列 **自定义条码尺寸**。 +* **配置 databar 参数**,如文本、格式和图像质量。 + +## 前置条件 + +* 已安装 .NET 6.0 SDK 或更高版本。 +* C# 开发环境(Visual Studio、VS Code、Rider 等)。 +* NuGet 包 `Aspose.BarCode`(或提供 `BarcodeGenerator`、`EncodeTypes`、`BarCodeImageFormat` 的等效库)。 + +使用 .NET CLI 添加包: + +```bash +dotnet add package Aspose.BarCode +``` + +## 使用 C# 条形码生成器创建 DataBar 条码 + +以下章节将逐步演示每一步。主要聚焦于 **c# barcode generator** API,其他提供相似属性的条码库也可采用相同模式。 + +### 步骤 1:使用示例文本初始化条码生成器 + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*为什么要这一步?* +`BarcodeGenerator` 是所有条码创建任务的入口。传入 `EncodeTypes.DatabarExpandedStacked` 枚举告诉库使用哪种符号体系,而文本参数则成为符号中编码的可读值。 + +### 步骤 2:设置列数(使用默认行数) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*为什么要这一步?* +DataBar Expanded Stacked 符号由堆叠的线性元素组成。调整 `Columns` 属性会改变水平密度,使您在不增加整体高度的情况下容纳更长的数据字符串。这直接 **自定义条码尺寸**。 + +### 步骤 3:保存使用四列的条码图像 + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*您将看到:* +保存的 `DatabarCols4.png` 图像显示了一个比默认更宽的 DataBar 条码,因为它包含了四列。您可以使用任意图像查看器打开文件以验证输出。 + +### 步骤 4:为新配置重新初始化生成器 + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*为什么要重新初始化?* +在保持之前的列设置的同时更改 `Rows` 属性可能会产生意外组合。使用全新实例可确保只有预期的参数(`Rows`)影响下一张图像。 + +### 步骤 5:设置行数(使用默认列数) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*为什么要这一步?* +`Rows` 属性控制垂直堆叠。增加行数会使条码更高,当水平空间受限而垂直空间充足时,这非常有用。这是另一种 **自定义条码尺寸** 的方式。 + +### 步骤 6:保存使用三行的条码图像 + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*结果:* +`DatabarRows3.png` 展示了一个更高的条码,包含三行堆叠,演示了 **配置 databar 参数** 如何影响视觉外观。 + +## 完整可运行示例 + +下面是一个完整的程序,您可以复制、粘贴并运行。它包含所有引用、错误处理以及注释,便于理解。 + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**预期输出** + +运行程序后会生成两个 PNG 文件: + +* `DatabarCols4.png` – 具有四列的宽条 DataBar 条码。 +* `DatabarRows3.png` – 具有三行的高条 DataBar 条码。 + +打开图像即可确认条码尺寸与配置的参数相匹配。 + +## 常见问题与边缘情况处理 + +| Question | Answer | +|----------|--------| +| *What if I need both custom rows **and** columns?* | Set `Rows` **and** `Columns` on the same `BarcodeGenerator` instance before calling `Save`. The library combines both values to produce a grid of the requested size. | +| *Can I change the image format?* | Yes. Replace `BarCodeImageFormat.Png` with `Jpeg`, `Bmp`, or `Gif` to suit your workflow. | +| *What happens when the text is longer than the symbol can hold?* | The generator throws an `ArgumentException`. Shorten the text or increase `Columns`/`Rows` to provide more capacity. | +| *Is there a way to set DPI or image resolution?* | Use `generator.Parameters.ImageResolution` to specify the desired DPI before saving. This further **customizes barcode size** for high‑resolution printing. | +| *Does the library support other DataBar variants?* | Yes. Replace `EncodeTypes.DatabarExpandedStacked` with `DatabarExpanded`, `DatabarLimited`, etc., while keeping the same parameter structure. | + +## 稳定生成条码的技巧 + +* **专业提示:** 在投入生产前,务必使用扫描仪或移动应用验证生成的图像。 +* **注意事项:** 空的或不存在的输出目录会导致 `Save` 抛出异常。必要时请编程创建文件夹。 +* **性能说明:** 在循环生成大量条码时,复用同一个 `BarcodeGenerator` 实例并仅修改 `Rows` 或 `Columns` 可以减少对象创建开销。 + +## 结论 + +现在您已经掌握了如何使用 **c# barcode generator** 来 **创建 databar 条码** 图像、**自定义条码尺寸**,以及 **配置 databar 参数**(如行列)。通过调整这些设置,您可以将条码适配到任何布局需求,同时保持扫描可靠性。 + +接下来,您可以探索诸如 **如何生成条码 PDF**、在报表中嵌入条码,或切换到其他符号体系(QR、Code‑128 等)的相关主题。尝试不同的 `Rows`、`Columns` 和图像分辨率,以找到最适合您具体使用场景的配置。 + +--- + + +## 接下来应该学习什么? + +以下教程涵盖与本指南技术密切相关的主题,帮助您在项目中进一步使用 API 功能并探索替代实现方式。每个资源均提供完整的可运行代码示例和逐步说明。 + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/chinese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..ecf3c29ee --- /dev/null +++ b/barcode/chinese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,217 @@ +--- +category: general +date: 2026-08-19 +description: 学习如何在 C# 中生成条形码 PNG 文件并调整其高度,涵盖如何生成条形码图像以及轻松更改条形码高度。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: zh +lastmod: 2026-08-19 +og_description: 在 C# 中创建条形码 PNG 文件,学习如何生成条形码图像、调整条形码高度以及更改条形码高度以实现最佳扫描。 +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: 在 C# 中创建条形码 PNG 文件 – 步骤指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: 如何在 C# 中创建可调高度的条形码 PNG 文件 +url: /zh/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何在 C# 中创建可调高度的条形码 PNG 文件 + +如果您需要在 C# 中创建 **条形码 PNG 文件**,本指南将一步步演示完整的可运行示例,展示 **如何生成条形码** 图像以及 **如何调整条形码高度** 以适应不同的使用场景。 + +生成条形码 PNG 文件是库存系统、销售点终端以及任何需要打印或显示机器可读数据的应用程序的常见需求。完成本教程后,您将能够修改条形码高度、保存多个 PNG 文件,并了解高度对扫描可靠性的影响。 + +## 前置条件 + +在开始之前,请确保您已具备以下环境: + +* 已安装 .NET 6.0 SDK 或更高版本 +* Visual Studio 2022(或任何支持 .NET 的 IDE) +* **Aspose.BarCode for .NET** NuGet 包(示例代码使用该库) + +您可以通过命令行添加该包: + +```bash +dotnet add package Aspose.BarCode +``` + +> **小贴士:** Aspose.BarCode 的免费评估版可用于开发和测试。生产环境请获取授权密钥。 + +## 安装条形码库 + +第一步是在项目中引用该库。在 C# 文件顶部添加以下 `using` 指令: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +这些命名空间为您提供 `BarcodeGenerator`、`EncodeTypes` 和 `BarCodeImageFormat`。 + +## 创建条形码 PNG 文件 + +现在我们创建一个 `BarcodeGenerator` 实例,用于输出 **条形码 PNG 文件**。示例使用 Databar OmniDirectional 编码方式,您也可以将 `EncodeTypes.DatabarOmniDirectional` 替换为任意受支持的类型。 + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +字符串 `"(01)12345678901231"` 符合 GS1 应用标识符格式,表示 14 位 GTIN。请根据自己的产品标识符进行相应调整。 + +## 设置 X 维度(可选) + +X 维度定义单个条形码模块的宽度。使用像素值可以精确控制图像尺寸。 + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +`2` 像素的值在大多数屏幕显示下表现良好。如果需要在打印时获得更大的条形码,请增大该值。 + +## 调整条形码高度并保存条形码 PNG 文件 + +**BarHeight** 属性控制条形的垂直尺寸。修改该属性即可 **调整条形码高度**,而不会影响编码数据。 + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +文件 `DatabarBarHeight30Pixels.png` 现在是一个 **条形码 PNG 文件**,高度为 30 像素。 + +若要 **更改条形码高度** 并创建第二张图像,只需赋予新值并再次调用 `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +这样您就拥有了两张 PNG 文件——一张 30 px,另一张 60 px——演示了如何即时 **调整条形码高度**。 + +### 为什么条形码高度很重要 + +* **可读性:** 扫描器需要最小高度才能可靠检测。高度过低的条形码可能被漏检,尤其是在低分辨率摄像头下。 +* **美观性:** 将条形码高度与周围设计元素匹配,可获得更整洁的 UI。 +* **打印限制:** 某些标签打印机的高度槽位是固定的,调整条形码高度可确保其适配。 + +**最佳实践:** 保持高度为 X 维度的整数倍(例如 X 维度为 2 px 时高度设为 30 px),以维持比例并避免失真。 + +## 完整示例 + +下面是完整的、可直接粘贴到控制台应用程序并立即运行的代码。 + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**预期输出** + +运行程序后,执行目录下会生成两个文件: + +* `DatabarBarHeight30Pixels.png` – 高度为 30 像素的条形码 PNG 文件 +* `DatabarBarHeight60Pixels.png` – 高度为 60 像素的条形码 PNG 文件 + +使用任意图像查看器打开这两张 PNG,您将看到清晰的 Databar OmniDirectional 条形码,已准备好进行扫描。 + +## 边缘情况与故障排除 + +| 情况 | 检查要点 | 推荐解决方案 | +|-----------|---------------|-----------------| +| 条形码模糊 | X 维度相对于所选高度过低 | 增大 `XDimension.Pixels`(例如从 2 提升到 3) | +| 扫描器在低高度条形码上失效 | 高度低于扫描器最低要求 | 将 `BarHeight.Pixels` 设置为至少 30 px(或依据扫描器规格) | +| PNG 文件为空或损坏 | 输出路径无效或缺少写入权限 | 使用绝对路径或确保应用拥有写入权限 | +| 需要其他编码方式 | 当前 `EncodeTypes` 不适用 | 将 `EncodeTypes.DatabarOmniDirectional` 替换为其他枚举值(如 `EncodeTypes.Code128`) | + +## 常见问题 + +**问:我可以生成其他图像格式吗(JPEG、BMP)?** +答:可以。将 `BarCodeImageFormat.Png` 替换为 `BarCodeImageFormat.Jpeg`、`BarCodeImageFormat.Bmp` 等。 + +**问:如何在网页中嵌入 PNG?** +答:通过 HTTP 接口提供生成的 PNG,或将其转换为 Base64 字符串并放入 `` 标签的 `src` 属性中。 + +**问:可以设置背景颜色吗?** +答:使用 `generator.Parameters.Image.BackgroundColor = Color.White;`(或任意 `System.Drawing.Color`)即可。 + +## 结论 + +现在您已经掌握了在 C# 中 **生成条形码 PNG 文件** 并精确 **调整条形码高度** 的方法,以满足扫描或设计需求。通过修改 `BarHeight.Pixels` 属性,您可以即时 **更改条形码高度**,并从同一代码库生成多个 PNG 资源。 + +接下来,您可以探索前景色、边距以及添加可读文字等其他自定义选项。还可以尝试不同的编码方式(如 `EncodeTypes.Code128`、`EncodeTypes.QR`),以扩展可编码的数据范围。 + +祝编码愉快,愿您的条形码一次即能成功扫描! + +## 接下来您应该学习什么? + +以下教程涵盖与本指南技术紧密相关的主题,帮助您进一步掌握 API 功能并在项目中尝试替代实现方案,每篇资源均提供完整可运行的代码示例和逐步解释。 + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/chinese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/chinese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..7dad3de3e --- /dev/null +++ b/barcode/chinese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,155 @@ +--- +category: general +date: 2026-08-19 +description: 使用 Aspose.BarCode 在 C# 中创建 DataBar PNG 文件。了解如何生成 DataBar 图像、配置 DataBar + 参数并保存 PNG 输出。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: zh +lastmod: 2026-08-19 +og_description: 使用 Aspose.BarCode 在 C# 中创建 DataBar PNG 文件。本教程将指导您如何生成 DataBar 图像、配置 + DataBar 参数(如 X 维度和纵横比),并保存高质量的 PNG 文件以用于打印或网页使用。 +og_image_alt: create databar PNG example +og_title: 在 C# 中创建 databar PNG 图像 – 步骤指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: 如何使用 C# 和 Aspose.BarCode 创建 DataBar PNG 图像 +url: /zh/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何使用 C# 和 Aspose.BarCode 创建 databar PNG 图像 + +如果您需要在 .NET 应用程序中 **创建 databar PNG** 文件,本指南将一步步演示完整可运行的示例,生成堆叠全向 DataBar 条码,配置关键参数,并保存两个具有不同宽高比的 PNG 文件。 + +生成 DataBar 图像不仅仅是调用一个方法。您还必须 **配置 databar 参数**,例如 X 维度(模块宽度)和宽高比,以满足打印或扫描规范。完成本教程后,您将了解 **如何生成在实际场景中可靠工作的 databar** 图形。 + +## 前置条件 + +- .NET 6.0 或更高(代码同样适用于 .NET Framework 4.7+) +- Visual Studio 2022 或任何支持 C# 的 IDE +- 有效的 **Aspose.BarCode for .NET** 许可证(免费评估版可用于测试) +- 基本的 C# 语法了解 + +> **专业提示:** 如果您还没有许可证,可以从 Aspose 门户申请临时评估密钥。API 行为保持一致,仅水印会有所不同。 + +## 第一步:安装 Aspose.BarCode NuGet 包 + +在 Visual Studio 中打开项目,右键单击解决方案,选择 **Manage NuGet Packages**。搜索 `Aspose.BarCode` 并安装最新的稳定版本。 + +```bash +dotnet add package Aspose.BarCode +``` + +此命令会将 `Aspose.BarCode` 程序集添加到项目中,并使 `BarcodeGenerator` 类可用。 + +## 第二步:为堆叠全向 DataBar 初始化条码生成器 + +`BarcodeGenerator` 构造函数接受两个参数:条码类型和原始数据字符串。对于堆叠全向 DataBar,使用 `EncodeTypes.DatabarStackedOmniDirectional`。 + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**为什么重要:** `EncodeTypes.DatabarStackedOmniDirectional` 常量告诉库生成可从任意方向读取的条码,非常适合零售货架标签。 + +## 第三步:以像素配置 X 维度(模块宽度) + +X 维度控制最小条形元素的大小。以像素设置可精确控制最终图像尺寸。 + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +**2 像素** 的值在大多数标签打印机上在可读性和紧凑性之间取得了良好平衡。如需更大或更小的模块,请相应调整此值。 + +## 第四步:设置第一个宽高比并保存 PNG + +宽高比影响堆叠 DataBar 的高度。宽高比 **15** 生成相对较短的条码,而 **30** 则使其更高。 + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +`Save` 方法将生成的条码写入 PNG 文件。PNG 为无损格式,可保留条码扫描仪所需的清晰边缘。 + +## 第五步:更改宽高比并保存第二个 PNG + +您可以复用同一个 `BarcodeGenerator` 实例,只需更改宽高比即可生成不同的变体。 + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +现在您拥有两个 PNG 文件——`DatabarAspectRatio15.png` 和 `DatabarAspectRatio30.png`——它们的视觉密度各不相同。 + +## 第六步:验证输出 + +在任意图像查看器中打开生成的 PNG 文件。您应该看到清晰、高对比度的 DataBar 条码。使用智能手机条码扫描器扫描图像,可确认两种宽高比均能解码为原始 GTIN 值 `12345678901231`。 + +![创建 databar PNG 示例](databar_example.png) + +*上图展示了并排的两个 PNG 文件。左侧图像使用宽高比 15,右侧使用宽高比 30。* + +## 常见变体和边缘情况 + +| 场景 | 需要更改的内容 | 原因 | +|----------|----------------|--------| +| **不同的数据** | 将字符串 `(01)12345678901231` 替换为任意有效的 GS1 应用标识符及数据 | 允许您编码产品 ID、序列号等 | +| **更高分辨率** | 将 `XDimension.Pixels` 提升至 3 或 4 | 当条码需在大尺寸或远距离扫描时必需 | +| **其他 DataBar 类型** | 使用 `EncodeTypes.DatabarStacked` 或 `EncodeTypes.DatabarExpanded` | 选择最适合标签布局的类型 | +| **透明背景** | 传入 `BarCodeImageFormat.Png` 并使用 `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | 便于将条码叠加在彩色标签上 | + +> **注意:** 将 X 维度设置得过小(< 1 像素)会导致条码在放大后出现模糊。 + +## 接下来应该学习什么? + +以下教程涵盖与本指南技术密切相关的主题,进一步扩展您对 API 功能的掌握,并提供可直接在项目中使用的完整代码示例和逐步说明。 + +- [如何使用 Aspose.BarCode for .NET 生成并调整一维 Databar 条码高度](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [使用 Aspose.BarCode 创建一维 Databar GS1 编码](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [使用 .NET API 生成 Aspose.BarCode Databar 条码 – 行列配置](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/chinese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..895382405 --- /dev/null +++ b/barcode/chinese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,209 @@ +--- +category: general +date: 2026-08-19 +description: 学习如何使用 Aspere.BarCode 在 C# 中生成邮政条码。本分步指南展示了如何生成 Planet 和 RM4SCC 格式的条码。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: zh +lastmod: 2026-08-19 +og_description: 使用 Aspose.BarCode 在 C# 中生成邮政条码。请按照本指南学习如何使用自定义尺寸生成 Planet 和 RM4SCC + 条码。 +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: 在 C# 中生成邮政条形码 – 完整的 Aspose.BarCode 指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: 如何使用 Aspose.BarCode 在 C# 中生成邮政条形码 +url: /zh/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何在 C# 中使用 Aspose.BarCode 生成邮政条码 + +如果您需要为邮件应用程序**生成邮政条码**,本指南将向您展示如何使用 Aspose.BarCode 库生成条码。您将看到一个完整且可运行的示例,创建了 Planet 条码(高度自动计算)和具有明确条码高度的 RM4SCC 条码。 + +生成邮政条码是物流软件、自动标签打印机和批量邮件系统的常见需求。完成本教程后,您将能够在任何 .NET 项目中集成条码生成,定制 X‑dimension(模块宽度),以及在标准格式允许的情况下控制条码高度。 + +**您将学到** + +* 如何在 C# 项目中设置 Aspose.BarCode。 +* 如何生成 Planet 和 RM4SCC 邮政条码。 +* 如何调整 X‑dimension(模块宽度)和条码高度。 +* 如何将结果保存为 PNG 图像。 + +无需任何外部服务——在引用 Aspose.BarCode NuGet 包后,所有操作均在本地完成。 + +## 前提条件 + +* .NET 6.0 SDK 或更高版本(代码同样适用于 .NET Framework 4.7+)。 +* Visual Studio 2022、Visual Studio Code 或您喜欢的任何 C# IDE。 +* Aspose.BarCode for .NET 包——通过 NuGet 安装: + +```bash +dotnet add package Aspose.BarCode +``` + +## 使用 Aspose.BarCode 生成邮政条码 + +以下章节将逐步演示从创建生成器对象到保存最终 PNG 文件的全过程。 + +### 步骤 1:创建 Planet 条码(自动高度) + +Planet 是一种在多个国家用于邮件分拣的邮政条码。创建 Planet 条码时,库会根据编码数据自动确定最佳条码高度。 + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**工作原理** – `EncodeTypes.Planet` 告诉 Aspose.BarCode 使用 Planet 符号集。`XDimension` 属性控制最小条的宽度(模块宽度)。由于 Planet 不要求固定条码高度,库会自动计算合适的高度,从而简化代码。 + +### 步骤 2:创建具有明确高度的 RM4SCC 条码 + +RM4SCC 是另一种邮政符号,通常需要特定的条码高度以兼容扫描仪。下面的代码演示如何手动设置该高度。 + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**设置高度的原因** – 某些邮政扫描仪要求最小条码高度。通过将 `BarHeight.Pixels = 100`,您可以确保生成的图像满足这些要求。X‑dimension 与 Planet 条码保持一致,以便两幅图像具有相同的视觉密度。 + +### 步骤 3:验证输出 + +运行程序后,打开位于 `YOUR_DIRECTORY` 的两个 PNG 文件。您应看到两种不同的条码: + +* `PostalPlanetBarHeightNone.png` – 自动计算高度的 Planet 条码。 +* `PostalRM4SCCBarHeight100Pixels.png` – 条码高度为 100 像素的 RM4SCC 条码。 + +两幅图像均可直接送入标签打印机或在 Web 应用中显示。 + +![使用 Aspose.BarCode 生成的邮政条码图像](generated-postal-barcode.png) + +*图片说明:* **生成的邮政条码** 图像,使用 Aspose.BarCode(演示如何生成邮政条码)。 + +## 使用自定义尺寸生成条码(高级) + +如果您需要微调其他参数——例如边距、文本位置或颜色——Aspose.BarCode 提供了丰富的 `Parameters` 对象。下面的示例演示如何添加白色背景并禁用可读文本。 + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**适用场景** – 在仅机器可读模式的自动分拣中,禁用可读文本很常见。设置背景颜色可确保条码在透明介质上正确打印。 + +## 常见问题与专业提示 + +| 问题 | 产生原因 | 解决方案 | +|------|----------|----------| +| 条码出现拉伸 | X‑dimension 相对于图像尺寸过大 | 对大多数邮政条码,将 `XDimension.Pixels` 保持在 2 到 5 之间 | +| 扫描仪拒绝图像 | 条码高度低于邮政服务规定的最小值 | 对 RM4SCC 使用 `BarHeight.Pixels` ≥ 80,除非规格另有说明 | +| PNG 文件体积过大 | 图像分辨率高于实际需求 | 使用 PNG‑8 (`BarCodeImageFormat.Png8`) 或降低像素尺寸 | + +**专业提示:** 在投产前务必使用真实扫描仪测试生成的条码。细微的视觉差异可能影响可读性。 + +## 完整源代码 + +将下面的代码块全部复制到新的控制台应用程序(`Program.cs`)中。根据需要将输出路径调整为进程有写入权限的文件夹。 + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +运行程序后会在可执行文件的工作目录中打印 *“Barcodes generated successfully.”* 并生成上述两个 PNG 文件。 + +## 结论 + +现在,您已经掌握了如何在 C# 中使用 Aspose.BarCode **生成邮政条码**,包括自动高度的 Planet 条码和固定高度的 RM4SCC 条码。本文还展示了 **如何使用自定义 X‑dimension、条码高度和视觉选项生成条码**,为任何邮件自动化项目奠定了坚实基础。 + +您可以进一步探索的方向: + +* 将生成的 PNG 嵌入 Aspose.PDF 创建的 PDF 发票中。 +* 将输出格式切换为 SVG,以获得可缩放的矢量图形。 +* 使用 `BarcodeReader` 类以编程方式验证编码数据。 + +欢迎尝试不同的符号集(例如 `EncodeTypes.Postnet`),并将您的成果分享给社区。祝编码愉快! + +## 接下来您可以学习什么? + +以下教程涵盖与本指南技术紧密相关的主题,帮助您进一步掌握 API 功能并探索在项目中的替代实现方式,每篇资源均包含完整可运行的代码示例和逐步解释。 + +- [使用 Aspose.BarCode 自定义补充空间生成条码图像](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [使用 Aspose.BarCode 配置 Code 39 条码](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [使用 Aspose.BarCode for .NET 配置 DataMatrix 条码 (ECC 200)](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/czech/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..f6a9117b3 --- /dev/null +++ b/barcode/czech/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,251 @@ +--- +category: general +date: 2026-08-19 +description: Tutoriál generátoru čárových kódů v C# ukazuje, jak generovat DataBar + Expanded Stacked čárové kódy, přizpůsobit velikost čárových kódů a nastavit řádky + a sloupce. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: cs +lastmod: 2026-08-19 +og_description: Tutoriál generátoru čárových kódů v C# vás naučí, jak generovat DataBar + čárové kódy, přizpůsobit velikost a nastavit řádky a sloupce pro přesný výstup. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Generátor čárových kódů v C# – krok za krokem průvodce tvorbou vlastních + DataBar kódů +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Generátor čárových kódů v C#: vytvořte vlastní DataBar kódy' +url: /cs/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# generátor čárových kódů: vytvořte vlastní DataBar čárové kódy + +Pokud potřebujete **c# barcode generator**, který dokáže vytvářet symboly DataBar Expanded Stacked, tento průvodce vám přesně ukáže, jak generovat obrázky čárových kódů s vlastními řádky a sloupci. Naučíte se konfigurovat parametry databar, upravit velikost čárového kódu a uložit výsledek jako soubory PNG. + +Programatické generování čárových kódů odstraňuje ruční kroky návrhu a zaručuje konzistentní výstup napříč platformami. V tomto tutoriálu se naučíte: + +* Nainstalovat a odkazovat na knihovnu Aspose.BarCode pro .NET (nebo jakýkoli kompatibilní balíček). +* Vytvořit generátor čárových kódů pro symbologii DataBar Expanded Stacked. +* **How to generate barcode** obrázky s konkrétním nastavením sloupců a řádků. +* **Customize barcode size** ovládáním řádků a sloupců DataBar. +* **Configure databar parameters** jako text, formát a kvalita obrazu. + +## Požadavky + +* .NET 6.0 SDK nebo novější nainstalováno. +* Vývojové prostředí C# (Visual Studio, VS Code, Rider, atd.). +* NuGet balíček `Aspose.BarCode` (nebo ekvivalentní knihovna, která poskytuje `BarcodeGenerator`, `EncodeTypes` a `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Použití C# barcode generator k vytvoření DataBar čárových kódů + +Následující sekce vás provede každým krokem. Hlavní zaměření je na API **c# barcode generator**, ale stejný vzor platí i pro jiné knihovny čárových kódů, které poskytují podobné vlastnosti. + +### Krok 1: Inicializace generátoru čárových kódů se vzorovým textem + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Proč tento krok?* +`BarcodeGenerator` je vstupním bodem pro všechny úlohy tvorby čárových kódů. Poskytnutí výčtu `EncodeTypes.DatabarExpandedStacked` říká knihovně, kterou symbologii použít, zatímco argument textu se stane lidsky čitelnou hodnotou zakódovanou v symbolu. + +### Krok 2: Nastavte počet sloupců (použijí se výchozí řádky) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Proč tento krok?* +Symboly DataBar Expanded Stacked se skládají ze zásobníkových lineárních prvků. Úprava vlastnosti `Columns` mění horizontální hustotu, což vám umožní umístit delší datové řetězce bez zvýšení celkové výšky. Toto přímo **customizes barcode size**. + +### Krok 3: Uložte obrázek čárového kódu, který používá čtyři sloupce + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Co vidíte:* +Uložený obrázek `DatabarCols4.png` zobrazuje DataBar čárový kód, který je širší než výchozí, protože obsahuje čtyři sloupce. Soubor můžete otevřít v libovolném prohlížeči obrázků a ověřit výstup. + +### Krok 4: Znovu‑inicializujte generátor pro novou konfiguraci + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Proč znovu‑inicializovat?* +Změna vlastnosti `Rows` při zachování předchozího nastavení sloupců může vést k neočekávané kombinaci. Začátek s novou instancí zajišťuje, že pouze zamýšlený parametr (`Rows`) ovlivní následující obrázek. + +### Krok 5: Nastavte počet řádků (použijí se výchozí sloupce) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Proč tento krok?* +Vlastnost `Rows` řídí vertikální zásobení. Zvýšením řádků se čárový kód prodlouží, což může být užitečné, když je vodorovný prostor omezený, ale svislý prostor bohatý. Toto je další způsob, jak **customize barcode size**. + +### Krok 6: Uložte obrázek čárového kódu, který používá tři řádky + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Výsledek:* +`DatabarRows3.png` ukazuje vyšší čárový kód se třemi zásobníkovými řádky, což demonstruje, jak **configure databar parameters** ovlivňuje vizuální vzhled. + +## Kompletní spustitelný příklad + +Níže je kompletní program, který můžete zkopírovat, vložit a spustit. Obsahuje všechny importy, ošetření chyb a komentáře pro přehlednost. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Očekávaný výstup** + +Spuštění programu vytvoří dva PNG soubory: + +* `DatabarCols4.png` – široký DataBar čárový kód se čtyřmi sloupci. +* `DatabarRows3.png` – vysoký DataBar čárový kód se třemi řádky. + +Otevřete obrázky a ověřte, že rozměry čárového kódu odpovídají nastaveným parametrům. + +## Časté otázky a řešení okrajových případů + +| Question | Answer | +|----------|--------| +| *Co když potřebuji jak vlastní řádky **a** sloupce?* | Nastavte `Rows` **a** `Columns` na stejném `BarcodeGenerator` instance před voláním `Save`. Knihovna kombinuje obě hodnoty a vytvoří mřížku požadované velikosti. | +| *Mohu změnit formát obrázku?* | Ano. Nahraďte `BarCodeImageFormat.Png` za `Jpeg`, `Bmp` nebo `Gif` podle vašeho pracovního postupu. | +| *Co se stane, když je text delší, než symbol může pojmout?* | Generátor vyhodí `ArgumentException`. Zkraťte text nebo zvýšte `Columns`/`Rows`, aby byl k dispozici větší kapacita. | +| *Existuje způsob, jak nastavit DPI nebo rozlišení obrázku?* | Použijte `generator.Parameters.ImageResolution` k určení požadovaného DPI před uložením. Toto dále **customizes barcode size** pro tisk ve vysokém rozlišení. | +| *Podporuje knihovna jiné varianty DataBar?* | Ano. Nahraďte `EncodeTypes.DatabarExpandedStacked` za `DatabarExpanded`, `DatabarLimited` atd., přičemž zachováte stejnou strukturu parametrů. | + +## Tipy pro spolehlivé generování čárových kódů + +* **Pro tip:** Vždy ověřte vygenerovaný obrázek pomocí skeneru nebo mobilní aplikace před nasazením do produkce. +* **Watch out for:** Null nebo prázdné výstupní adresáře—`Save` vyhodí výjimku, pokud cesta neexistuje. Vytvořte složku programově, pokud je potřeba. +* **Performance note:** Opakované používání jedné instance `BarcodeGenerator` a změna pouze `Rows` nebo `Columns` může snížit režii vytváření objektů při generování mnoha čárových kódů ve smyčce. + +## Závěr + +Nyní víte, jak použít **c# barcode generator** k **vytvoření databar čárových kódů** obrázků, **customize barcode size**, a **configure databar parameters** jako řádky a sloupce. Úpravou těchto nastavení můžete přizpůsobit čárové kódy jakémukoli požadavku na rozvržení při zachování spolehlivosti skenování. + +Dále prozkoumejte související témata, jako jsou **how to generate barcode** PDF, vkládání čárových kódů do reportů, nebo přechod na jiné symbologie (QR, Code‑128 atd.). Experimentujte s různými `Rows`, `Columns` a rozlišeními obrázků, abyste našli optimální konfiguraci pro váš konkrétní případ použití. + +--- + +## 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/czech/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..1ed34e5af --- /dev/null +++ b/barcode/czech/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: Naučte se, jak v C# vytvořit soubor PNG s čárovým kódem a upravit jeho + výšku, včetně toho, jak snadno generovat obrázky čárových kódů a měnit výšku čárového + kódu. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: cs +lastmod: 2026-08-19 +og_description: Vytvořte PNG soubor s čárovým kódem v C# a naučte se, jak generovat + obrázky čárových kódů, upravovat výšku čárového kódu a měnit výšku čárového kódu + pro optimální skenování. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Vytvořte soubor PNG s čárovým kódem v C# – průvodce krok za krokem +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Jak vytvořit PNG soubor s čárovým kódem s nastavitelnou výškou v C# +url: /cs/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak vytvořit soubor PNG s čárovým kódem s nastavitelnou výškou v C# + +Pokud potřebujete v C# vytvořit **soubor PNG s čárovým kódem**, tento návod vám přesně ukáže, jak na to. Uvidíte kompletní, spustitelný příklad, který demonstruje **jak generovat čárový kód** obrázky a jak **upravit výšku čárového kódu** pro různé případy použití. + +Generování souboru PNG s čárovým kódem je běžná potřeba pro inventární systémy, pokladní terminály a jakoukoli aplikaci, která musí tisknout nebo zobrazovat strojově čitelná data. Na konci tohoto tutoriálu budete schopni změnit výšku čárového kódu, uložit více PNG souborů a pochopit vliv výšky na spolehlivost skenování. + +## Požadavky + +* .NET 6.0 SDK nebo novější nainstalováno +* Visual Studio 2022 (nebo jakékoli IDE podporující .NET) +* NuGet balíček **Aspose.BarCode for .NET** (ukázkový kód používá tuto knihovnu) + +Balíček můžete přidat z příkazové řádky: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Bezplatná evaluační verze Aspose.BarCode funguje pro vývoj a testování. Pro produkci získejte licencovaný klíč. + +## Instalace knihovny pro čárový kód + +Prvním krokem je odkaz na knihovnu ve vašem projektu. Přidejte následující `using` direktivy na začátek vašeho C# souboru: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Tyto jmenné prostory vám poskytují přístup k `BarcodeGenerator`, `EncodeTypes` a `BarCodeImageFormat`. + +## Vytvoření souboru PNG s čárovým kódem + +Nyní vytvoříme instanci `BarcodeGenerator`, která vygeneruje **soubor PNG s čárovým kódem**. Příklad používá symbologii Databar OmniDirectional, ale můžete nahradit `EncodeTypes.DatabarOmniDirectional` libovolným podporovaným typem. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Řetězec `"(01)12345678901231"` odpovídá formátu GS1 Application Identifier pro 14‑ciferný GTIN. Upravit data tak, aby odpovídala vašim vlastním identifikátorům produktu. + +## Nastavení X‑dimenze (volitelné) + +X‑dimenze určuje šířku jednoho modulu čárového kódu. Hodnota založená na pixelech vám poskytuje přesnou kontrolu nad velikostí obrázku. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Hodnota `2` pixely funguje dobře pro většinu displejů. Zvyšte ji, pokud potřebujete větší čárový kód při tisku. + +## Úprava výšky čárového kódu a uložení souboru PNG s čárovým kódem + +Vlastnost **BarHeight** řídí vertikální velikost čar. Změna této hodnoty vám umožní **upravit výšku čárového kódu** bez ovlivnění zakódovaných dat. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Soubor `DatabarBarHeight30Pixels.png` je nyní **soubor PNG s čárovým kódem**, který má výšku 30 pixelů. + +Pro **změnu výšky čárového kódu** a vytvoření druhého obrázku stačí přiřadit novou hodnotu a znovu zavolat `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Nyní máte dva PNG soubory — jeden o výšce 30 px a druhý o výšce 60 px — což demonstruje, jak **upravit výšku čárového kódu** za běhu. + +### Proč výška čárového kódu záleží + +* **Čitelnost:** Skenery očekávají minimální výšku pro spolehlivé rozpoznání. Příliš krátký čárový kód může být přehlédnut, zejména na nízkokvalitních kamerách. +* **Estetika:** Přizpůsobení výšky čárového kódu okolním designovým prvkům vytváří čistší UI. +* **Tisková omezení:** Některé tiskárny štítků mají pevně dané výškové sloty; úprava výšky čárového kódu zajišťuje, že se vejde. + +**Nejlepší praxe:** Udržujte výšku jako násobek X‑dimenze (např. 30 px při X‑dimenzi 2 px), aby byl zachován poměr a nedošlo k deformaci. + +## Kompletní příklad + +Níže je kompletní, samostatný program, který můžete vložit do konzolové aplikace a okamžitě spustit. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Očekávaný výstup** + +Spuštění programu vytvoří dva soubory v pracovním adresáři spustitelného souboru: + +* `DatabarBarHeight30Pixels.png` – 30‑pixelový soubor PNG s čárovým kódem +* `DatabarBarHeight60Pixels.png` – 60‑pixelový soubor PNG s čárovým kódem + +Otevřete kterýkoli PNG v libovolném prohlížeči obrázků; uvidíte jasný čárový kód Databar OmniDirectional připravený ke skenování. + +## Okrajové případy a řešení problémů + +| Situace | Co zkontrolovat | Doporučené řešení | +|-----------|---------------|-----------------| +| Čárový kód je rozmazaný | X‑dimenze je příliš nízká pro zvolenou výšku | Zvyšte `XDimension.Pixels` (např. z 2 na 3) | +| Skenování selže u nízkého čárového kódu | Výška pod minimem skeneru | Nastavte `BarHeight.Pixels` na alespoň 30 px (nebo dle specifikací skeneru) | +| Soubor PNG je prázdný nebo poškozený | Neplatná výstupní cesta nebo chybí oprávnění k zápisu | Použijte absolutní cestu nebo zajistěte, aby aplikace měla přístup k zápisu | +| Potřeba jiné symbologie | Aktuální `EncodeTypes` není vhodný | Nahraďte `EncodeTypes.DatabarOmniDirectional` jinou hodnotou enumu (např. `EncodeTypes.Code128`) | + +## Často kladené otázky + +**Q: Mohu generovat jiné formáty obrázků (JPEG, BMP)?** +A: Ano. Nahraďte `BarCodeImageFormat.Png` za `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` atd. + +**Q: Jak vložit PNG do webové stránky?** +A: Poskytněte vygenerovaný PNG přes HTTP endpoint nebo jej převeďte na Base64 řetězec a umístěte do atributu `src` značky ``. + +**Q: Existuje způsob, jak nastavit barvu pozadí?** +A: Použijte `generator.Parameters.Image.BackgroundColor = Color.White;` (nebo libovolnou `System.Drawing.Color`). + +## Závěr + +Nyní víte, jak **vygenerovat soubor PNG s čárovým kódem** v C# a přesně **upravit výšku čárového kódu**, aby vyhovovala požadavkům na skenování nebo design. Změnou vlastnosti `BarHeight.Pixels` můžete **měnit výšku čárového kódu** za běhu a vytvořit více PNG souborů z jedné základny kódu. + +Dále prozkoumejte další možnosti přizpůsobení, jako je barva popředí, okraje a přidání lidsky čitelného textu. Můžete také experimentovat s různými symbologiemi (`EncodeTypes.Code128`, `EncodeTypes.QR`) a rozšířit tak rozsah dat, která můžete kódovat. + +Šťastné programování a ať vaše čárové kódy vždy skenují na první pokus! + +## 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 návodu. 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. + +- [Jak generovat a upravit výšku čárového kódu pro jednorozměrný Databar pomocí Aspose.BarCode pro .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Jak generovat čárový kód – jednorozměrné typy čárových kódů](/barcode/english/net/one-dimensional-barcode-types/) +- [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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/czech/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..834037bd7 --- /dev/null +++ b/barcode/czech/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,158 @@ +--- +category: general +date: 2026-08-19 +description: Vytvořte soubory PNG s databar v C# pomocí Aspose.BarCode. Naučte se, + jak generovat obrázky databar, konfigurovat parametry databar a uložit výstup ve + formátu PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: cs +lastmod: 2026-08-19 +og_description: Vytvořte soubory PNG s databarem v C# pomocí Aspose.BarCode. Tento + tutoriál vás provede generováním obrázků databaru, nastavením parametrů databaru, + jako je X‑rozměr a poměr stran, a uložením vysoce kvalitních souborů PNG pro tisk + nebo webové použití. +og_image_alt: create databar PNG example +og_title: Vytvořte PNG obrázky datových pruhů v C# – krok za krokem. +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Jak vytvořit PNG obrázky databar pomocí C# a Aspose.BarCode +url: /cs/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak vytvořit PNG obrázky databar s C# a Aspose.BarCode + +Pokud potřebujete **vytvořit databar PNG** soubory v .NET aplikaci, tento průvodce vám přesně ukáže, jak na to. Uvidíte kompletní, spustitelný příklad, který generuje vrstvené omnidirekcionální DataBar kódy, nastavuje klíčové parametry a ukládá dva PNG soubory s různými poměry stran. + +Vytvoření DataBar obrázku není jen o zavolání jedné metody. Musíte také **nastavit parametry databar**, jako je X‑dimenze (šířka modulu) a poměr stran, aby vyhovovaly specifikacím tisku nebo skenování. Na konci tohoto tutoriálu pochopíte **jak generovat databar** grafiku, která spolehlivě funguje v reálných scénářích. + +## Požadavky + +- .NET 6.0 nebo novější (kód také funguje s .NET Framework 4.7+) +- Visual Studio 2022 nebo jakékoli C#‑kompatibilní IDE +- Platná licence pro **Aspose.BarCode for .NET** (bezplatná zkušební verze funguje pro testování) +- Základní znalost syntaxe C# + +> **Tip:** Pokud ještě nemáte licenci, můžete požádat o dočasný zkušební klíč na portálu Aspose. API se chová stejně; mění se jen vodoznak. + +## Krok 1: Nainstalujte NuGet balíček Aspose.BarCode + +Otevřete svůj projekt ve Visual Studiu, klikněte pravým tlačítkem na řešení a vyberte **Manage NuGet Packages**. Vyhledejte `Aspose.BarCode` a nainstalujte nejnovější stabilní verzi. + +```bash +dotnet add package Aspose.BarCode +``` + +Tento příkaz přidá sestavení `Aspose.BarCode` do vašeho projektu a zpřístupní třídu `BarcodeGenerator`. + +## Krok 2: Inicializujte generátor čárových kódů pro vrstvený omnidirekcionální DataBar + +Konstruktor `BarcodeGenerator` přijímá dva argumenty: typ čárového kódu a řetězec surových dat. Pro vrstvený omnidirekcionální DataBar použijete `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Proč je to důležité:** Konstantní `EncodeTypes.DatabarStackedOmniDirectional` říká knihovně, aby vytvořila čárový kód, který lze číst z jakékoli orientace, což je ideální pro regálové etikety v maloobchodě. + +## Krok 3: Nastavte X‑dimenzi (šířku modulu) v pixelech + +X‑dimenze řídí velikost nejmenšího pruhu. Nastavením v pixelech získáte přesnou kontrolu nad konečnou velikostí obrázku. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Hodnota **2 pixely** představuje dobrý kompromis mezi čitelností a kompaktností pro většinu tiskáren etiket. Upravit tuto hodnotu můžete, pokud potřebujete větší nebo menší moduly. + +## Krok 4: Nastavte první poměr stran a uložte PNG + +Poměr stran ovlivňuje výšku vrstveného DataBar. Poměr **15** vytváří relativně krátký čárový kód, zatímco **30** jej prodlužuje. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Metoda `Save` zapíše vygenerovaný čárový kód do PNG souboru. PNG je bezztrátový formát, který zachovává ostré hrany potřebné pro skenery čárových kódů. + +## Krok 5: Změňte poměr stran a uložte druhý PNG + +Můžete znovu použít stejnou instanci `BarcodeGenerator` k vytvoření variant jednoduše změnou poměru stran. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Nyní máte dva PNG soubory — `DatabarAspectRatio15.png` a `DatabarAspectRatio30.png` — každý s jinou vizuální hustotou. + +## Krok 6: Ověřte výstup + +Otevřete vygenerované PNG soubory v libovolném prohlížeči obrázků. Měli byste vidět čistý, vysokokontrastní DataBar čárový kód. Skenování obrázků pomocí čtečky čárových kódů ve smartphonu potvrdí, že oba poměry stran dekódují původní GTIN hodnotu `12345678901231`. + +![create databar PNG example](databar_example.png) + +*Obrázek výše zobrazuje dva PNG soubory vedle sebe. Levý obrázek používá poměr stran 15, pravý poměr stran 30.* + +## Běžné varianty a okrajové případy + +| Scénář | Co změnit | Důvod | +|----------|----------------|--------| +| **Různá data** | Nahraďte řetězec `(01)12345678901231` jakýmkoli platným GS1 identifikátorem aplikace a daty | Umožňuje kódovat ID produktů, sériová čísla atd. | +| **Vyšší rozlišení** | Zvyšte `XDimension.Pixels` na 3 nebo 4 | Potřebné, když bude čárový kód tištěn ve velkých rozměrech nebo skenován z větší vzdálenosti. | +| **Jiné typy DataBar** | Použijte `EncodeTypes.DatabarStacked` nebo `EncodeTypes.DatabarExpanded` | Vyberte typ, který nejlépe vyhovuje rozvržení vaší etikety. | +| **Průhledné pozadí** | Předávejte `BarCodeImageFormat.Png` s `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Užitečné pro překrytí čárového kódu na barevných etiketách. | + +> **Pozor:** Nastavení X‑dimenze, která je příliš malá (< 1 pixel), může vytvořit čárový kód, který po... + +## 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í příklady 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. + +- [Jak generovat a upravit výšku čárového kódu pro jednorozměrný Databar pomocí Aspose.BarCode pro .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Vytvořit jednorozměrné GS1 kódování Databar s Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generovat Databar čárový kód pomocí Aspose.BarCode a .NET API – konfigurace řádků a sloupců](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/czech/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..975f38a64 --- /dev/null +++ b/barcode/czech/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Naučte se, jak v C# generovat poštovní čárový kód pomocí Aspere.BarCode. + Tento krok‑za‑krokem průvodce ukazuje, jak generovat čárový kód pro formáty Planet + a RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: cs +lastmod: 2026-08-19 +og_description: Vygenerujte poštovní čárový kód v C# s Aspose.BarCode. Postupujte + podle tohoto návodu a naučte se, jak vytvořit čárový kód pro Planet a RM4SCC s vlastními + rozměry. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Generování poštovního čárového kódu v C# – kompletní průvodce Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Jak v C# generovat poštovní čárový kód pomocí Aspose.BarCode +url: /cs/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak generovat poštovní čárový kód v C# s Aspose.BarCode + +Pokud potřebujete **generovat poštovní čárový kód** pro poštovní aplikace, tento průvodce vám přesně ukáže, jak generovat čárový kód pomocí knihovny Aspose.BarCode. Uvidíte kompletní, spustitelný příklad, který vytváří jak Planet čárový kód (výška vypočítána automaticky), tak RM4SCC čárový kód s explicitní výškou čáry. + +Generování poštovního čárového kódu je běžnou požadavkem pro logistický software, automatické tiskárny štítků a systémy hromadné pošty. Na konci tohoto tutoriálu budete schopni integrovat generování čárových kódů do libovolného .NET projektu, přizpůsobit X‑dimenzi a řídit výšku čáry, pokud to standardní formát umožňuje. + +**Co se naučíte** + +* Jak nastavit Aspose.BarCode v C# projektu. +* Jak generovat Planet a RM4SCC poštovní čárové kódy. +* Jak upravit X‑dimenzi (šířku modulu) a výšku čáry. +* Jak uložit výsledek jako PNG obrázek. + +Nejsou vyžadovány žádné externí služby — vše běží lokálně po přidání reference na NuGet balíček Aspose.BarCode. + +## Požadavky + +* .NET 6.0 SDK nebo novější (kód funguje také s .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code nebo jakékoli C# IDE dle vaší preference. +* Aspose.BarCode for .NET balíček — nainstalujte jej přes NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generování poštovního čárového kódu s Aspose.BarCode + +Následující sekce vás provede každým krokem, od vytvoření objektů generátoru až po uložení finálních PNG souborů. + +### Krok 1: Vytvoření Planet čárového kódu (automatická výška) + +Planet je poštovní čárový kód používaný v mnoha zemích pro třídění pošty. Při vytvoření Planet čárového kódu knihovna automaticky určí optimální výšku čáry na základě zakódovaných dat. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Proč to funguje** — `EncodeTypes.Planet` říká Aspose.BarCode, aby použil symbologii Planet. Vlastnost `XDimension` řídí šířku nejmenší čáry (modulu). Protože Planet nevyžaduje pevnou výšku čáry, knihovna automaticky vypočítá vhodnou výšku, což zjednodušuje kód. + +### Krok 2: Vytvoření RM4SCC čárového kódu s explicitní výškou + +RM4SCC je další poštovní symbologie, která často vyžaduje specifickou výšku čáry pro kompatibilitu se skenery. Následující kód ukazuje, jak nastavit tuto výšku ručně. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Proč nastavujete výšku** — Některé poštovní skenery očekávají minimální výšku čáry. Přiřazením `BarHeight.Pixels = 100` zajistíte, že vygenerovaný obrázek splňuje tyto požadavky. X‑dimenze zůstává konzistentní s Planet čárovým kódem, takže oba obrázky mají stejnou vizuální hustotu. + +### Krok 3: Ověření výstupu + +Po spuštění programu otevřete dva PNG soubory umístěné v `YOUR_DIRECTORY`. Měli byste vidět dva odlišné čárové kódy: + +* `PostalPlanetBarHeightNone.png` — Planet čárový kód s automaticky vypočítanou výškou. +* `PostalRM4SCCBarHeight100Pixels.png` — RM4SCC čárový kód s výškou 100 pixelů. + +Oba obrázky lze přímo poslat do tiskáren štítků nebo zobrazit ve webové aplikaci. + +![Vygenerovaný obrázek poštovního čárového kódu pomocí Aspose.BarCode](generated-postal-barcode.png) + +*Obrázek alt text:* **Vygenerovaný poštovní čárový kód** obrázek pomocí Aspose.BarCode (ukazuje, jak vygenerovat poštovní čárový kód). + +## Jak generovat čárový kód s vlastními rozměry (pokročilé) + +Pokud potřebujete doladit další parametry — například okraje, umístění textu nebo barvu — Aspose.BarCode poskytuje bohatý objekt `Parameters`. Níže je rychlý příklad, který přidá bílý pozadí a vypne lidsky čitelný text. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Kdy použít** — Vypnutí lidsky čitelného textu je běžné pro automatické třídění, kde záleží jen na strojově čitelném vzoru. Nastavení barvy pozadí zajišťuje správný tisk čárového kódu na průhledném médiu. + +## Časté problémy a tipy profesionálů + +| Problém | Proč se vyskytuje | Řešení | +|-------|----------------|-----| +| Čárový kód vypadá roztaženě | X‑dimenze je příliš velká vzhledem k velikosti obrázku | Udržujte `XDimension.Pixels` mezi 2 a 5 pro většinu poštovních čárových kódů | +| Skener odmítá obrázek | Výška čáry je pod minimem požadovaným poštovní službou | Použijte `BarHeight.Pixels` ≥ 80 pro RM4SCC, pokud specifikace neuvádí jinak | +| Velikost PNG souboru je velká | Rozlišení obrazu je vyšší, než je potřeba | Uložte jako PNG‑8 (`BarCodeImageFormat.Png8`) nebo snižte rozměry v pixelech | + +**Tip profesionála:** Vždy otestujte vygenerovaný čárový kód na skutečném skeneru před nasazením do produkce. Malé vizuální rozdíly mohou ovlivnit čitelnost. + +## Kompletní zdrojový kód + +Zkopírujte celý blok níže do nové konzolové aplikace (`Program.cs`). Upravit výstupní cesty na složku, do které má proces právo zapisovat. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Spuštěním programu se vypíše *„Barcodes generated successfully.“* a vytvoří se dva PNG soubory v pracovním adresáři spustitelného souboru. + +## Závěr + +Nyní víte, jak **generovat poštovní čárový kód** v C# s Aspose.BarCode, a to jak pro Planet čárové kódy s automatickou výškou, tak pro RM4SCC čárové kódy s pevnou výškou. Průvodce také ukázal, **jak generovat čárový kód** s vlastní X‑dimenzí, výškou čáry a vizuálními možnostmi, což poskytuje pevný základ pro jakýkoli projekt automatizace pošty. + +Další kroky, které můžete prozkoumat: + +* Integrovat vygenerované PNG do PDF faktury pomocí Aspose.PDF. +* Přepnout výstupní formát na SVG pro škálovatelnou vektorovou grafiku. +* Použít třídu `BarcodeReader` k programatickému ověření zakódovaných dat. + +Neváhejte experimentovat s různými symbologiemi (např. `EncodeTypes.Postnet`) a sdílet své výsledky s komunitou. Šťastné kódování! + +## 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ým krok‑za‑krokem vysvětlením, aby vám pomohl zvládnout další funkce API a prozkoumat alternativní implementační přístupy ve vašich projektech. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/dutch/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..21b87047e --- /dev/null +++ b/barcode/dutch/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,250 @@ +--- +category: general +date: 2026-08-19 +description: C#-barcodegenerator tutorial laat zien hoe je DataBar Expanded Stacked‑barcodes + genereert, de barcodegrootte aanpast en rijen en kolommen configureert. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: nl +lastmod: 2026-08-19 +og_description: C# barcode generator tutorial leert je hoe je DataBar-barcodes genereert, + de grootte aanpast en rijen en kolommen configureert voor een nauwkeurige output. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# barcodegenerator – stap‑voor‑stap gids voor aangepaste DataBar-barcodes +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C# barcodegenerator: maak aangepaste DataBar‑barcodes' +url: /nl/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# barcodegenerator: aangepaste DataBar-barcodes maken + +Als je een **c# barcode generator** nodig hebt die DataBar Expanded Stacked‑symbolen kan produceren, laat deze gids je precies zien hoe je barcode‑afbeeldingen met aangepaste rijen en kolommen kunt genereren. Je leert databar‑parameters te configureren, de barcode‑grootte aan te passen en het resultaat op te slaan als PNG‑bestanden. + +Het programmatisch genereren van barcodes verwijdert handmatige ontwerpprocessen en garandeert consistente output op verschillende platformen. In deze tutorial zul je: + +* Installeer en verwijs naar de Aspose.BarCode for .NET‑bibliotheek (of een compatibel pakket). +* Maak een barcodegenerator voor de DataBar Expanded Stacked‑symbologie. +* **Hoe barcode**‑afbeeldingen te genereren met specifieke kolom‑ en rij‑instellingen. +* **Pas de barcode‑grootte aan** door DataBar‑rijen en -kolommen te regelen. +* **Configureer databar‑parameters** zoals tekst, formaat en beeldkwaliteit. + +## Vereisten + +* .NET 6.0 SDK of later geïnstalleerd. +* Een C#‑ontwikkelomgeving (Visual Studio, VS Code, Rider, enz.). +* NuGet‑pakket `Aspose.BarCode` (of een gelijkwaardige bibliotheek die `BarcodeGenerator`, `EncodeTypes` en `BarCodeImageFormat` biedt). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## De C# barcodegenerator gebruiken om DataBar‑barcodes te maken + +De volgende secties leiden je stap voor stap door het proces. De primaire focus ligt op de **c# barcode generator**‑API, maar hetzelfde patroon is van toepassing op andere barcode‑bibliotheken die vergelijkbare eigenschappen blootleggen. + +### Stap 1: Initialise de barcodegenerator met voorbeeldtekst + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Waarom deze stap?* +`BarcodeGenerator` is het toegangspunt voor alle barcode‑creatietaken. Het opgeven van de `EncodeTypes.DatabarExpandedStacked`‑enum vertelt de bibliotheek welke symbologie te gebruiken, terwijl het tekstargument de mens‑leesbare waarde wordt die in het symbool wordt gecodeerd. + +### Stap 2: Stel het aantal kolommen in (standaard rijen worden gebruikt) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Waarom deze stap?* +DataBar Expanded Stacked‑symbolen bestaan uit gestapelde lineaire elementen. Het aanpassen van de `Columns`‑eigenschap wijzigt de horizontale dichtheid, waardoor je langere gegevensreeksen kunt plaatsen zonder de totale hoogte te verhogen. Dit **past de barcode‑grootte direct aan**. + +### Stap 3: Sla de barcode‑afbeelding op die vier kolommen gebruikt + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Wat je ziet:* +De opgeslagen `DatabarCols4.png`‑afbeelding toont een DataBar‑barcode die breder is dan de standaard omdat deze vier kolommen bevat. Je kunt het bestand openen in elke afbeeldingsviewer om de output te verifiëren. + +### Stap 4: Re‑initialiseer de generator voor een nieuwe configuratie + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Waarom opnieuw initialiseren?* +Het wijzigen van de `Rows`‑eigenschap terwijl de vorige kolominstelling behouden blijft, kan een onverwachte combinatie opleveren. Beginnen met een nieuw exemplaar zorgt ervoor dat alleen de beoogde parameter (`Rows`) de volgende afbeelding beïnvloedt. + +### Stap 5: Stel het aantal rijen in (standaard kolommen worden gebruikt) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Waarom deze stap?* +De `Rows`‑eigenschap regelt de verticale stapeling. Het verhogen van het aantal rijen maakt de barcode hoger, wat nuttig kan zijn wanneer de ruimte horizontaal beperkt is maar verticaal overvloedig. Dit is een andere manier om **de barcode‑grootte aan te passen**. + +### Stap 6: Sla de barcode‑afbeelding op die drie rijen gebruikt + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Resultaat:* +`DatabarRows3.png` toont een hogere barcode met drie gestapelde rijen, waarmee wordt aangetoond hoe **databar‑parameters configureren** de visuele weergave beïnvloedt. + +## Volledig uitvoerbaar voorbeeld + +Hieronder staat een compleet programma dat je kunt kopiëren, plakken en uitvoeren. Het bevat alle imports, foutafhandeling en commentaren voor duidelijkheid. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Verwachte output** + +Het uitvoeren van het programma genereert twee PNG‑bestanden: + +* `DatabarCols4.png` – een brede DataBar‑barcode met vier kolommen. +* `DatabarRows3.png` – een hoge DataBar‑barcode met drie rijen. + +Open de afbeeldingen om te bevestigen dat de barcode‑afmetingen overeenkomen met de geconfigureerde parameters. + +## Veelgestelde vragen en afhandeling van randgevallen + +| Vraag | Antwoord | +|----------|--------| +| *Wat als ik zowel aangepaste rijen **en** kolommen nodig heb?* | Stel `Rows` **en** `Columns` in op dezelfde `BarcodeGenerator`‑instantie voordat je `Save` aanroept. De bibliotheek combineert beide waarden om een raster van de gevraagde grootte te produceren. | +| *Kan ik het afbeeldingsformaat wijzigen?* | Ja. Vervang `BarCodeImageFormat.Png` door `Jpeg`, `Bmp` of `Gif` om aan je workflow te voldoen. | +| *Wat gebeurt er als de tekst langer is dan het symbool kan bevatten?* | De generator gooit een `ArgumentException`. Verkort de tekst of vergroot `Columns`/`Rows` om meer capaciteit te bieden. | +| *Is er een manier om DPI of beeldresolutie in te stellen?* | Gebruik `generator.Parameters.ImageResolution` om de gewenste DPI in te stellen vóór het opslaan. Dit **past de barcode‑grootte verder aan** voor hoge‑resolutie‑afdrukken. | +| *Ondersteunt de bibliotheek andere DataBar‑varianten?* | Ja. Vervang `EncodeTypes.DatabarExpandedStacked` door `DatabarExpanded`, `DatabarLimited`, enz., terwijl je dezelfde parameterstructuur behoudt. | + +## Tips voor betrouwbare barcode‑generatie + +* **Pro tip:** Verifieer altijd de gegenereerde afbeelding met een scanner of een mobiele app voordat je deze in productie neemt. +* **Let op:** Null of lege uitvoermap‑paden—`Save` zal een uitzondering gooien als het pad niet bestaat. Maak de map programmatisch aan indien nodig. +* **Prestatie‑opmerking:** Het hergebruiken van één `BarcodeGenerator`‑instantie en alleen `Rows` of `Columns` wijzigen kan de overhead van objectcreatie verminderen bij het genereren van veel barcodes in een lus. + +## Conclusie + +Je weet nu hoe je een **c# barcode generator** kunt gebruiken om **databar‑barcode**‑afbeeldingen te **maken**, **de barcode‑grootte aan te passen**, en **databar‑parameters** zoals rijen en kolommen te **configureren**. Door deze instellingen aan te passen kun je barcodes in elke lay‑outvereiste passen terwijl je de scan‑betrouwbaarheid behoudt. + +Vervolgens kun je gerelateerde onderwerpen verkennen, zoals **hoe barcode**‑PDF's te genereren, barcodes in rapporten in te sluiten, of over te schakelen naar andere symbologieën (QR, Code‑128, enz.). Experimenteer met verschillende `Rows`, `Columns` en beeldresoluties om de optimale configuratie voor jouw specifieke geval te vinden. + +--- + + +## Wat moet je hierna 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 stapsgewijze uitleg om je te helpen extra API‑functies onder de knie te krijgen en alternatieve implementatie‑benaderingen in je eigen projecten te verkennen. + +- [Hoe barcode‑hoogte te genereren en aan te passen voor één‑dimensionale Databar met Aspose.BarCode voor .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Genereer één‑dimensionale Databar 2D‑barcodes met Aspose.BarCode .NET‑API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Genereer Aspose.BarCode Databar‑barcode met .NET‑API – rij‑ en kolomconfiguratie](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/dutch/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..31e5f26cc --- /dev/null +++ b/barcode/dutch/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,220 @@ +--- +category: general +date: 2026-08-19 +description: Leer hoe je een barcode‑PNG‑bestand genereert in C# en de hoogte ervan + aanpast, met uitleg over het genereren van barcode‑afbeeldingen en het eenvoudig + wijzigen van de barcodehoogte. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: nl +lastmod: 2026-08-19 +og_description: Maak een barcode‑PNG‑bestand in C# en leer hoe je barcode‑afbeeldingen + genereert, de barcodehoogte aanpast en de barcodehoogte wijzigt voor optimale scans. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Maak een barcode PNG‑bestand in C# – stapsgewijze handleiding +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Hoe maak je een barcode PNG‑bestand met verstelbare hoogte in C# +url: /nl/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hoe maak je een barcode PNG‑bestand met verstelbare hoogte in C# + +Als je een **barcode PNG‑bestand** in C# moet maken, laat deze gids je precies zien hoe. Je ziet een volledig, uitvoerbaar voorbeeld dat demonstreert **hoe je barcode‑afbeeldingen genereert** en hoe je de **barcode‑hoogte kunt aanpassen** voor verschillende gebruikssituaties. + +Het genereren van een barcode PNG‑bestand is een veelvoorkomende eis voor voorraadbeheersystemen, kassaterminals en elke applicatie die machine‑leesbare gegevens moet afdrukken of weergeven. Aan het einde van deze tutorial kun je de barcode‑hoogte wijzigen, meerdere PNG‑bestanden opslaan en de impact van hoogte op scan‑betrouwbaarheid begrijpen. + +## Vereisten + +Voordat je begint, zorg dat je het volgende hebt: + +* .NET 6.0 SDK of later geïnstalleerd +* Visual Studio 2022 (of een IDE die .NET ondersteunt) +* Het **Aspose.BarCode for .NET** NuGet‑pakket (de code‑voorbeeld gebruikt deze bibliotheek) + +Je kunt het pakket toevoegen via de opdrachtregel: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** De gratis evaluatieversie van Aspose.BarCode werkt voor ontwikkeling en testen. Voor productie moet je een gelicentieerde sleutel verkrijgen. + +## Installeer de barcode‑bibliotheek + +De eerste stap is om de bibliotheek in je project te refereren. Voeg de volgende `using`‑directieven toe aan de bovenkant van je C#‑bestand: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Deze namespaces geven je toegang tot `BarcodeGenerator`, `EncodeTypes` en `BarCodeImageFormat`. + +## Maak het barcode PNG‑bestand + +Nu maken we een `BarcodeGenerator`‑instantie die een **barcode PNG‑bestand** zal produceren. Het voorbeeld gebruikt de Databar OmniDirectional‑symbologie, maar je kunt `EncodeTypes.DatabarOmniDirectional` vervangen door elk ondersteund type. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +De string `"(01)12345678901231"` volgt het GS1 Application Identifier‑formaat voor een 14‑cijferige GTIN. Pas de gegevens aan zodat ze overeenkomen met jouw eigen product‑identifiers. + +## Stel de X‑dimensie in (optioneel) + +De X‑dimensie bepaalt de breedte van één barcode‑module. Een pixel‑gebaseerde waarde geeft je precieze controle over de afbeeldingsgrootte. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Een waarde van `2` pixels werkt goed voor de meeste schermweergaven. Verhoog deze als je een grotere barcode nodig hebt bij afdrukken. + +## Pas de barcode‑hoogte aan en sla het barcode PNG‑bestand op + +De eigenschap **BarHeight** regelt de verticale grootte van de strepen. Door deze waarde te wijzigen kun je de **barcode‑hoogte aanpassen** zonder de gecodeerde data te beïnvloeden. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Het bestand `DatabarBarHeight30Pixels.png` is nu een **barcode PNG‑bestand** dat 30 pixels hoog is. + +Om de **barcode‑hoogte te wijzigen** en een tweede afbeelding te maken, wijs je simpelweg een nieuwe waarde toe en roep je `Save` opnieuw aan: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Je hebt nu twee PNG‑bestanden — één van 30 px en een andere van 60 px — die laten zien hoe je **barcode‑hoogte** dynamisch kunt **aanpassen**. + +### Waarom bar‑hoogte belangrijk is + +* **Leesbaarheid:** Scanners verwachten een minimale hoogte voor betrouwbare detectie. Een te korte barcode kan gemist worden, vooral bij lage‑resolutiecamera's. +* **Esthetiek:** Het afstemmen van de barcode‑hoogte op omliggende designelementen zorgt voor een nettere UI. +* **Printbeperkingen:** Sommige labelprinters hebben vaste hoogte‑sleuven; door de barcode‑hoogte aan te passen, zorg je dat deze past. + +**Best practice:** Houd de hoogte een veelvoud van de X‑dimensie (bijv. 30 px wanneer X‑dimensie 2 px is) om de proportie te behouden en vervorming te voorkomen. + +## Volledig voorbeeld + +Hieronder staat het volledige, zelfstandige programma dat je in een console‑applicatie kunt plakken en direct kunt uitvoeren. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Verwachte output** + +Het uitvoeren van het programma maakt twee bestanden aan in de werkmap van de executable: + +* `DatabarBarHeight30Pixels.png` – een 30‑pixel‑hoge barcode PNG‑bestand +* `DatabarBarHeight60Pixels.png` – een 60‑pixel‑hoge barcode PNG‑bestand + +Open een van beide PNG‑bestanden met een willekeurige afbeeldingsviewer; je ziet een duidelijke Databar OmniDirectional barcode die klaar is om te scannen. + +## Randgevallen en probleemoplossing + +| Situatie | Wat te controleren | Aanbevolen oplossing | +|-----------|-------------------|----------------------| +| Barcode is onscherp | X‑dimensie te laag voor gekozen hoogte | Verhoog `XDimension.Pixels` (bijv. van 2 naar 3) | +| Scanner faalt bij lage barcode‑hoogte | Hoogte onder het minimum van de scanner | Stel `BarHeight.Pixels` in op minstens 30 px (of volgens de specificaties van de scanner) | +| PNG‑bestand is leeg of corrupt | Uitvoerpad ongeldig of schrijfrechten ontbreken | Gebruik een absoluut pad of zorg dat de app schrijfrechten heeft | +| Andere symbologie nodig | Huidige `EncodeTypes` niet geschikt | Vervang `EncodeTypes.DatabarOmniDirectional` door een andere enum‑waarde (bijv. `EncodeTypes.Code128`) | + +## Veelgestelde vragen + +**V: Kan ik andere afbeeldingsformaten genereren (JPEG, BMP)?** +A: Ja. Vervang `BarCodeImageFormat.Png` door `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, enz. + +**V: Hoe embed ik de PNG in een webpagina?** +A: Serveer de gegenereerde PNG via een HTTP‑endpoint of converteer deze naar een Base64‑string en plaats deze in het `src`‑attribuut van een ``‑tag. + +**V: Is er een manier om de achtergrondkleur in te stellen?** +A: Gebruik `generator.Parameters.Image.BackgroundColor = Color.White;` (of een andere `System.Drawing.Color`). + +## Conclusie + +Je weet nu hoe je een **barcode PNG‑bestand** in C# kunt **genereren** en de **barcode‑hoogte** nauwkeurig kunt **aanpassen** om te voldoen aan scan‑ of ontwerpeisen. Door de eigenschap `BarHeight.Pixels` te wijzigen kun je de **barcode‑hoogte** dynamisch veranderen en meerdere PNG‑assets uit één code‑basis produceren. + +Verken vervolgens andere aanpassingsopties zoals voorgrondkleur, marges en het toevoegen van mens‑leesbare tekst. Je kunt ook experimenteren met verschillende symbologieën (`EncodeTypes.Code128`, `EncodeTypes.QR`) om het scala aan gegevens dat je kunt coderen uit te breiden. + +Veel programmeerplezier, en moge je barcodes altijd bij de eerste poging scannen! + +## Wat moet je hierna 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/dutch/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/dutch/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..06c1744fa --- /dev/null +++ b/barcode/dutch/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Maak databar PNG‑bestanden in C# met Aspose.BarCode. Leer hoe je databar‑afbeeldingen + genereert, databar‑parameters configureert en PNG‑uitvoer opslaat. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: nl +lastmod: 2026-08-19 +og_description: Maak databar‑PNG‑bestanden in C# met Aspose.BarCode. Deze tutorial + leidt je stap voor stap door het genereren van databar‑afbeeldingen, het configureren + van databar‑parameters zoals X‑dimensie en beeldverhouding, en het opslaan van PNG‑bestanden + van hoge kwaliteit voor afdrukken of webgebruik. +og_image_alt: create databar PNG example +og_title: Maak databar PNG‑afbeeldingen in C# – stap‑voor‑stap gids +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Hoe databar PNG-afbeeldingen te maken met C# en Aspose.BarCode +url: /nl/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hoe databar PNG‑afbeeldingen te maken met C# en Aspose.BarCode + +Als je **databar PNG**‑bestanden moet maken in een .NET‑applicatie, laat deze gids je precies zien hoe. Je ziet een volledig, uitvoerbaar voorbeeld dat gestapelde omnidirectionele DataBar‑codes genereert, belangrijke parameters configureert en twee PNG‑bestanden opslaat met verschillende beeldverhoudingen. + +Het genereren van een DataBar‑afbeelding gaat niet alleen om het aanroepen van één methode. Je moet ook **databar‑parameters configureren** zoals de X‑dimensie (modulebreedte) en de beeldverhouding om te voldoen aan afdruk‑ of scan‑specificaties. Aan het einde van deze tutorial begrijp je **hoe je databar**‑grafieken genereert die betrouwbaar werken in praktijksituaties. + +## Vereisten + +- .NET 6.0 of later (de code werkt ook met .NET Framework 4.7+) +- Visual Studio 2022 of een andere C#‑compatibele IDE +- Een geldige licentie voor **Aspose.BarCode for .NET** (de gratis evaluatie werkt voor testen) +- Basiskennis van C#‑syntaxis + +> **Pro tip:** Als je nog geen licentie hebt, kun je een tijdelijke evaluatiesleutel aanvragen via het Aspose‑portaal. De API werkt hetzelfde; alleen het watermerk verandert. + +## Stap 1: Installeer het Aspose.BarCode NuGet‑pakket + +Open je project in Visual Studio, klik met de rechtermuisknop op de oplossing en selecteer **Manage NuGet Packages**. Zoek naar `Aspose.BarCode` en installeer de nieuwste stabiele versie. + +```bash +dotnet add package Aspose.BarCode +``` + +Deze opdracht voegt de `Aspose.BarCode`‑assembly toe aan je project en maakt de `BarcodeGenerator`‑klasse beschikbaar. + +## Stap 2: Initialiseert de barcode‑generator voor een gestapelde omnidirectionele DataBar + +De constructor van `BarcodeGenerator` ontvangt twee argumenten: het type barcode en de ruwe gegevensreeks. Voor een gestapelde omnidirectionele DataBar gebruik je `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Waarom dit belangrijk is:** De constante `EncodeTypes.DatabarStackedOmniDirectional` vertelt de bibliotheek een barcode te produceren die vanuit elke oriëntatie gelezen kan worden, wat ideaal is voor winkelrek‑labels. + +## Stap 3: Configureer de X‑dimensie (modulebreedte) in pixels + +De X‑dimensie bepaalt de grootte van het kleinste balk‑element. Instellen in pixels geeft je precieze controle over de uiteindelijke afbeeldingsgrootte. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Een waarde van **2 pixels** is een goede balans tussen leesbaarheid en compactheid voor de meeste labelprinters. Pas deze waarde aan als je grotere of kleinere modules nodig hebt. + +## Stap 4: Stel de eerste beeldverhouding in en sla de PNG op + +De beeldverhouding beïnvloedt de hoogte van de gestapelde DataBar. Een beeldverhouding van **15** levert een relatief korte barcode op, terwijl **30** deze hoger maakt. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +De `Save`‑methode schrijft de gegenereerde barcode naar een PNG‑bestand. PNG is lossless, waardoor de scherpe randen behouden blijven die barcode‑scanners nodig hebben. + +## Stap 5: Verander de beeldverhouding en sla een tweede PNG op + +Je kunt dezelfde `BarcodeGenerator`‑instantie hergebruiken om variaties te maken door simpelweg de beeldverhouding te wijzigen. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Nu heb je twee PNG‑bestanden — `DatabarAspectRatio15.png` en `DatabarAspectRatio30.png` — elk met een andere visuele dichtheid. + +## Stap 6: Controleer de output + +Open de gegenereerde PNG‑bestanden in een willekeurige afbeeldingsviewer. Je zou een schone, hoog‑contrast DataBar‑barcode moeten zien. Het scannen van de afbeeldingen met een smartphone‑barcode‑scanner bevestigt dat beide beeldverhoudingen decoderen naar de oorspronkelijke GTIN‑waarde `12345678901231`. + +![create databar PNG example](databar_example.png) + +*De afbeelding hierboven toont de twee PNG‑bestanden naast elkaar. De linker afbeelding gebruikt beeldverhouding 15, de rechter gebruikt beeldverhouding 30.* + +## Veelvoorkomende variaties en randgevallen + +| Scenario | Wat te wijzigen | Reden | +|----------|----------------|-------| +| **Andere data** | Vervang de string `(01)12345678901231` door een geldige GS1‑toepassingsidentificator en gegevens | Hiermee kun je product‑ID’s, serienummers, enz. coderen | +| **Hogere resolutie** | Verhoog `XDimension.Pixels` naar 3 of 4 | Noodzakelijk wanneer de barcode op grote formaten wordt afgedrukt of van afstand wordt gescand | +| **Andere DataBar‑types** | Gebruik `EncodeTypes.DatabarStacked` of `EncodeTypes.DatabarExpanded` | Kies het type dat het beste past bij je label‑lay‑out | +| **Transparante achtergrond** | Geef `BarCodeImageFormat.Png` mee met `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Handig om de barcode over gekleurde labels te leggen | + +> **Let op:** Het instellen van een X‑dimensie die te klein is (< 1 pixel) kan een barcode opleveren die er wazig uitziet na + +## Wat moet je hierna leren? + +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. + +- [Hoe de barcode‑hoogte te genereren en aan te passen voor één‑dimensionale Databar met Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Maak één‑dimensionale Databar GS1‑codering met Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Genereer Aspose.BarCode Databar barcode met .NET API – Rij‑ en kolomconfiguratie](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/dutch/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..2cdc180ea --- /dev/null +++ b/barcode/dutch/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,210 @@ +--- +category: general +date: 2026-08-19 +description: Leer hoe je een postbarcode genereert in C# met Aspere.BarCode. Deze + stapsgewijze gids laat zien hoe je een barcode genereert voor de Planet- en RM4SCC-formaten. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: nl +lastmod: 2026-08-19 +og_description: Genereer een postbarcode in C# met Aspose.BarCode. Volg deze gids + om te leren hoe je een barcode voor Planet en RM4SCC met aangepaste afmetingen genereert. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Genereer postbarcode in C# – volledige Aspose.BarCode-gids +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Hoe genereer je een postbarcode in C# met Aspose.BarCode +url: /nl/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hoe een postbarcode genereren in C# met Aspose.BarCode + +Als je een **postbarcode moet genereren** voor mailtoepassingen, laat deze gids je precies zien hoe je een barcode genereert met de Aspose.BarCode bibliotheek. Je ziet een compleet, uitvoerbaar voorbeeld dat zowel een Planet-barcode (hoogte automatisch berekend) als een RM4SCC-barcode met een expliciete balkhoogte maakt. + +Het genereren van een postbarcode is een veelvoorkomende eis voor logistieke software, geautomatiseerde labelprinters en bulkmailingsystemen. Aan het einde van deze tutorial kun je barcode‑generatie integreren in elk .NET‑project, de X‑dimensie aanpassen en de balkhoogte regelen wanneer het standaardformaat dit toelaat. + +**Wat je leert** + +* Hoe je Aspose.BarCode instelt in een C#‑project. +* Hoe je Planet‑ en RM4SCC‑postbarcodes genereert. +* Hoe je de X‑dimensie (module‑breedte) en balkhoogte aanpast. +* Hoe je het resultaat opslaat als een PNG‑afbeelding. + +Er zijn geen externe services nodig — alles draait lokaal nadat je het Aspose.BarCode NuGet‑pakket hebt toegevoegd. + +## Vereisten + +* .NET 6.0 SDK of later (de code werkt ook met .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code, of een andere C#‑IDE naar keuze. +* Aspose.BarCode for .NET‑pakket – installeer het via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Postbarcode genereren met Aspose.BarCode + +De volgende secties lopen stap voor stap door het proces, van het maken van de generatorobjecten tot het opslaan van de uiteindelijke PNG‑bestanden. + +### Stap 1: Een Planet‑barcode maken (automatische hoogte) + +Planet is een postbarcode die in veel landen wordt gebruikt voor postsortering. Wanneer je een Planet‑barcode maakt, bepaalt de bibliotheek automatisch de optimale balkhoogte op basis van de gecodeerde data. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Waarom dit werkt** – `EncodeTypes.Planet` vertelt Aspose.BarCode om de Planet‑symbologie te gebruiken. De eigenschap `XDimension` regelt de breedte van de kleinste balk (de module). Omdat Planet geen vaste balkhoogte vereist, berekent de bibliotheek automatisch een geschikte hoogte, wat de code vereenvoudigt. + +### Stap 2: Een RM4SCC‑barcode maken met expliciete hoogte + +RM4SCC is een andere postsymbologie die vaak een specifieke balkhoogte nodig heeft voor scanner‑compatibiliteit. De onderstaande code laat zien hoe je die hoogte handmatig instelt. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Waarom je de hoogte instelt** – Sommige postscanners verwachten een minimale balkhoogte. Door `BarHeight.Pixels = 100` toe te wijzen, zorg je ervoor dat de gegenereerde afbeelding aan die eisen voldoet. De X‑dimensie blijft consistent met de Planet‑barcode zodat beide afbeeldingen dezelfde visuele dichtheid hebben. + +### Stap 3: De output verifiëren + +Na het uitvoeren van het programma open je de twee PNG‑bestanden in `YOUR_DIRECTORY`. Je zou twee verschillende barcodes moeten zien: + +* `PostalPlanetBarHeightNone.png` – een Planet‑barcode met automatisch berekende hoogte. +* `PostalRM4SCCBarHeight100Pixels.png` – een RM4SCC‑barcode met een balkhoogte van 100 pixels. + +Beide afbeeldingen kunnen direct naar labelprinters worden gestuurd of in een webapplicatie worden weergegeven. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Afbeeldingsalt-tekst:* **Generated postal barcode** afbeelding met Aspose.BarCode (toont hoe een postbarcode te genereren). + +## Hoe een barcode genereren met aangepaste afmetingen (geavanceerd) + +Als je andere parameters fijn wilt afstemmen — zoals marges, tekstplaatsing of kleur — biedt Aspose.BarCode een rijk `Parameters`‑object. Hieronder een kort voorbeeld dat een witte achtergrond toevoegt en de menselijk‑leesbare tekst uitschakelt. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Wanneer dit te gebruiken** – Het uitschakelen van de menselijk‑leesbare tekst is gebruikelijk bij geautomatiseerde sortering waar alleen het machine‑leesbare patroon van belang is. Het instellen van een achtergrondkleur zorgt ervoor dat de barcode correct wordt afgedrukt op transparante media. + +## Veelvoorkomende valkuilen en pro‑tips + +| Issue | Why it happens | Fix | +|-------|----------------|-----| +| Barcode ziet er uitgerekt uit | X‑dimension is te groot ten opzichte van de afbeeldingsgrootte | Houd `XDimension.Pixels` tussen 2 en 5 voor de meeste postbarcodes | +| Scanner wijst de afbeelding af | Balkhoogte is lager dan het minimum vereist door de postdienst | Gebruik `BarHeight.Pixels` ≥ 80 voor RM4SCC tenzij de specificatie anders aangeeft | +| PNG-bestandsgrootte is groot | Beeldresolutie is hoger dan nodig | Sla op als PNG‑8 (`BarCodeImageFormat.Png8`) of verklein de pixelafmetingen | + +**Pro tip:** Test de gegenereerde barcode altijd met een echte scanner voordat je deze in productie neemt. Kleine visuele verschillen kunnen de leesbaarheid beïnvloeden. + +## Volledige broncode + +Kopieer het volledige blok hieronder naar een nieuwe console‑applicatie (`Program.cs`). Pas de output‑paden aan naar een map waar je proces schrijfrechten heeft. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Het uitvoeren van het programma geeft *“Barcodes generated successfully.”* weer en maakt de twee PNG‑bestanden aan in de werkmap van het uitvoerbare bestand. + +## Conclusie + +Je weet nu hoe je **postbarcode moet genereren** in C# met Aspose.BarCode, zowel voor automatische‑hoogte Planet‑barcodes als voor vaste‑hoogte RM4SCC‑barcodes. De gids liet ook zien **hoe je barcode kunt genereren** met aangepaste X‑dimensie, balkhoogte en visuele opties, waardoor je een solide basis hebt voor elk post‑automatiseringsproject. + +Volgende stappen die je kunt verkennen: + +* Integreer de gegenereerde PNG's in een PDF‑factuur met Aspose.PDF. +* Schakel het uitvoerformaat naar SVG voor schaalbare vectorafbeeldingen. +* Gebruik de `BarcodeReader`‑klasse om de gecodeerde data programmatisch te verifiëren. + +Voel je vrij om te experimenteren met verschillende symbologieën (bijv. `EncodeTypes.Postnet`) en deel je resultaten met de community. Veel programmeerplezier! + +## Wat moet je hierna leren? + +De volgende tutorials behandelen nauw verwante onderwerpen die voortbouwen op de technieken die in deze gids zijn 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. + +- [Hoe een barcode‑afbeelding te genereren met aangepaste aanvullende ruimte met Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Hoe een barcode te genereren – Code 39 configuratie met Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Hoe DataMatrix‑barcodes (ECC 200) te genereren met Aspose.BarCode voor .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/english/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..7f5160f3d --- /dev/null +++ b/barcode/english/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,251 @@ +--- +category: general +date: 2026-08-19 +description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: en +lastmod: 2026-08-19 +og_description: C# barcode generator tutorial teaches you how to generate DataBar + barcodes, customize size, and configure rows and columns for precise output. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# barcode generator – step‑by‑step guide for custom DataBar barcodes +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C# barcode generator: create custom DataBar barcodes' +url: /python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# barcode generator: create custom DataBar barcodes + +If you need a **c# barcode generator** that can produce DataBar Expanded Stacked symbols, this guide shows you exactly how to generate barcode images with custom rows and columns. You’ll learn to configure databar parameters, adjust barcode size, and save the result as PNG files. + +Generating barcodes programmatically removes manual design steps and guarantees consistent output across platforms. In this tutorial you will: + +* Install and reference the Aspose.BarCode for .NET library (or any compatible package). +* Create a barcode generator for the DataBar Expanded Stacked symbology. +* **How to generate barcode** images with specific column and row settings. +* **Customize barcode size** by controlling DataBar rows and columns. +* **Configure databar parameters** such as text, format, and image quality. + +## Prerequisites + +* .NET 6.0 SDK or later installed. +* A C# development environment (Visual Studio, VS Code, Rider, etc.). +* NuGet package `Aspose.BarCode` (or an equivalent library that provides `BarcodeGenerator`, `EncodeTypes`, and `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Using the C# barcode generator to create DataBar barcodes + +The following sections walk you through each step. The primary focus is on the **c# barcode generator** API, but the same pattern applies to other barcode libraries that expose similar properties. + +### Step 1: Initialise the barcode generator with sample text + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Why this step?* +`BarcodeGenerator` is the entry point for all barcode creation tasks. Supplying the `EncodeTypes.DatabarExpandedStacked` enum tells the library which symbology to use, while the text argument becomes the human‑readable value encoded in the symbol. + +### Step 2: Set the number of columns (default rows are used) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Why this step?* +DataBar Expanded Stacked symbols consist of stacked linear elements. Adjusting the `Columns` property changes the horizontal density, allowing you to fit longer data strings without increasing overall height. This directly **customizes barcode size**. + +### Step 3: Save the barcode image that uses four columns + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*What you see:* +The saved `DatabarCols4.png` image displays a DataBar barcode that is wider than the default because it contains four columns. You can open the file in any image viewer to verify the output. + +### Step 4: Re‑initialise the generator for a new configuration + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Why re‑initialise?* +Changing the `Rows` property while keeping the previous column setting could produce an unexpected combination. Starting with a fresh instance ensures that only the intended parameter (`Rows`) influences the next image. + +### Step 5: Set the number of rows (default columns are used) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Why this step?* +The `Rows` property controls vertical stacking. Increasing rows makes the barcode taller, which can be useful when space is limited horizontally but abundant vertically. This is another way to **customize barcode size**. + +### Step 6: Save the barcode image that uses three rows + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Result:* +`DatabarRows3.png` shows a taller barcode with three stacked rows, demonstrating how **configure databar parameters** impacts the visual appearance. + +## Full runnable example + +Below is a complete program that you can copy, paste, and run. It includes all imports, error handling, and comments for clarity. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Expected output** + +Running the program produces two PNG files: + +* `DatabarCols4.png` – a wide DataBar barcode with four columns. +* `DatabarRows3.png` – a tall DataBar barcode with three rows. + +Open the images to confirm that the barcode dimensions match the configured parameters. + +## Common questions and edge‑case handling + +| Question | Answer | +|----------|--------| +| *What if I need both custom rows **and** columns?* | Set `Rows` **and** `Columns` on the same `BarcodeGenerator` instance before calling `Save`. The library combines both values to produce a grid of the requested size. | +| *Can I change the image format?* | Yes. Replace `BarCodeImageFormat.Png` with `Jpeg`, `Bmp`, or `Gif` to suit your workflow. | +| *What happens when the text is longer than the symbol can hold?* | The generator throws an `ArgumentException`. Shorten the text or increase `Columns`/`Rows` to provide more capacity. | +| *Is there a way to set DPI or image resolution?* | Use `generator.Parameters.ImageResolution` to specify the desired DPI before saving. This further **customizes barcode size** for high‑resolution printing. | +| *Does the library support other DataBar variants?* | Yes. Replace `EncodeTypes.DatabarExpandedStacked` with `DatabarExpanded`, `DatabarLimited`, etc., while keeping the same parameter structure. | + +## Tips for reliable barcode generation + +* **Pro tip:** Always verify the generated image with a scanner or a mobile app before deploying it to production. +* **Watch out for:** Null or empty output directories—`Save` will throw an exception if the path does not exist. Create the folder programmatically if needed. +* **Performance note:** Re‑using a single `BarcodeGenerator` instance and only changing `Rows` or `Columns` can reduce object‑creation overhead when generating many barcodes in a loop. + +## Conclusion + +You now know how to use a **c# barcode generator** to **create databar barcode** images, **customize barcode size**, and **configure databar parameters** such as rows and columns. By adjusting these settings you can fit barcodes into any layout requirement while maintaining scan reliability. + +Next, explore related topics like **how to generate barcode** PDFs, embedding barcodes in reports, or switching to other symbologies (QR, Code‑128, etc.). Experiment with different `Rows`, `Columns`, and image resolutions to find the optimal configuration for your specific use case. + +--- + + +## 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 and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/og-image.png b/barcode/english/python-java/general/c-barcode-generator-create-custom-databar-barcodes/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..34ad14547bb3522c2c04579a96ef8e60010e225e GIT binary patch literal 52857 zcmbSz1ymeeuqH7eIKe%H-~j>*?hxD|K=9!1?j%@%00|5dY>?pY&IAkYKDfL4VA~}B z|Mu;^-LukX4%4Tn`*z=|x+PzIO{kKBBsvN)3IYNGy0p|g6$FH*r3eU*U6CIHM}EE9 zMMXdu5SD%?^4=Y`JLlp)BSC?5$ll?w{Fa?PHYPiPjeWF-do!WNt#7DUw}y?Ko!u!W z_(z#RdCb%Sg{=Tr8J-jA#kB{VzxVakPrkX7Q=DXTyixBjpn)8Q=fE9+ZIgvJ?C&1J zBg(%!FJC_WyYn>g@3+4{*54g0tcT|Uw#TA>zlDX7|L!0oKl-yHT*IpT=jxZscE>li zBBHSf^i(E43l-^mKlA+=?r`LXc?I-4n~Frwo`A{UTf98@k?T1q`RAZb65Ib~bm77^ zWc+R7(Z>%X&Q{Y?{e8}k0m*SMnlLbMwe1X;euyFaN-AZ^JO9Ppt3QwAPu@oM&*T0- zOlXfx_52O74AS3OMJ-|cBb@)uvjM05-;2*b(x@j{Ol;}T*a(~Kvy^`Y{$Hf|U&j<^ zeTV&Ung17P_esOE=W36Ceg%Io7tDHty8lNxzhuoa`tKxqq=@KiF8)Irj`b*ir16W9 z5Irn!jr&ZU3C!yS<&h@Jso59j_*_V`~V`0q4_?f^^W9avpx02Ow(|0XV>WkVXAFUrrO3bda>j0twJixagG5MpIw zDakF&&yHLeGXG_mNJzp9)4KHFB_bkLGIkO+{t}atb?H|!8{XSRA6JDR_QI;JCGeYU zjZww1Z2LW*sjvn+4%N|pY6EtP#(NruRcSG*X~h19orYohqrAEdsHB8THE5&f2OA)e zUw%1GbdM2~5`|wD=B=5m;zF9wR~@_&DFa*5+zu}FSDkj0qm}4z@9i8-KXDT~msc1M zRSiF*Hd&?MccSHGt@v3O-D!t~62$K-CatOFY&g-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rt&A9HcuoSNl8^^!+Gtz1349E{44A)c>hgqMk}CC}_AC z^@u7U4Tn^Sqj_OsxTn0JoQ+vNK6n`V*k)G18?jTq`V%q}`oJHb+$UfEU=VLU zX}H0Yh`=xguoAzJi1a<4lLsG^^c1r_^r#FjyK^cNIrQQ!f2FOZrDbMzwln+d&Dq*e zMzx~;t}ZLB{0IJad)MuH-WWay^Re>{9stJ$%F}z3wWb4jj@jEQB;+nrT-J=~WVyL= zNTa0;nw8G*t@)zRBuhu|1NyFz6mQVKoCp0&n|U=oz4<)%Ti8V;vYzb+7W7e%5!>dT z(Cf&#bz(_(|B7{%w)S?Ync_{P-T9vP<>h_6t({I+tWUI;>pMe$#96y@4S^oibE*YW zCBQiXwOX;Yvd{yJ0|{|nt1Vb`P&Er50WLNHR_>q1Nhs2m{I$i!8Clefg1mgoUV3tB zBjfDc{3{20IC{4!eMMGIzrm10J?TVdu~-lu$*IE)g+R4$Xoa>Vf9IMwtqGrlJCFdd zQA3>ONgF^WyjkS>6V%mI$Y$!M7)vVxq#p`;w|>i*0aHjr@o@TuvJ$zk`4u&lze%s4 zg;twSz|4Yynbn~{R0quOh?x` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: How to create a barcode PNG file with adjustable height in C# +url: /python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# How to create a barcode PNG file with adjustable height in C# + +If you need to create a **barcode PNG file** in C#, this guide shows you exactly how. You’ll see a complete, runnable example that demonstrates **how to generate barcode** images and how to **adjust barcode height** for different use‑cases. + +Generating a barcode PNG file is a common requirement for inventory systems, point‑of‑sale terminals, and any application that must print or display machine‑readable data. By the end of this tutorial you will be able to change the barcode height, save multiple PNG files, and understand the impact of height on scan reliability. + +## Prerequisites + +Before you start, make sure you have: + +* .NET 6.0 SDK or later installed +* Visual Studio 2022 (or any IDE that supports .NET) +* The **Aspose.BarCode for .NET** NuGet package (the code sample uses this library) + +You can add the package from the command line: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** The free evaluation version of Aspose.BarCode works for development and testing. For production, obtain a licensed key. + +## Install the barcode library + +The first step is to reference the library in your project. Add the following `using` directives at the top of your C# file: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +These namespaces give you access to `BarcodeGenerator`, `EncodeTypes`, and `BarCodeImageFormat`. + +## Create the barcode PNG file + +Now we create a `BarcodeGenerator` instance that will output a **barcode PNG file**. The example uses the Databar OmniDirectional symbology, but you can replace `EncodeTypes.DatabarOmniDirectional` with any supported type. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +The string `"(01)12345678901231"` follows the GS1 Application Identifier format for a 14‑digit GTIN. Adjust the data to match your own product identifiers. + +## Set the X‑dimension (optional) + +The X‑dimension defines the width of a single barcode module. A pixel‑based value gives you precise control over image size. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +A value of `2` pixels works well for most screen displays. Increase it if you need a larger barcode when printed. + +## Adjust barcode height and save the barcode PNG file + +The **BarHeight** property controls the vertical size of the bars. Changing this value lets you **adjust barcode height** without affecting the encoded data. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +The file `DatabarBarHeight30Pixels.png` is now a **barcode PNG file** that is 30 pixels tall. + +To **change barcode height** and create a second image, simply assign a new value and call `Save` again: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +You now have two PNG files—one at 30 px and another at 60 px—demonstrating how to **adjust barcode height** on the fly. + +### Why bar height matters + +* **Readability:** Scanners expect a minimum height for reliable detection. Too short a barcode may be missed, especially on low‑resolution cameras. +* **Aesthetics:** Matching the barcode height to surrounding design elements creates a cleaner UI. +* **Print constraints:** Some label printers have fixed height slots; adjusting the barcode height ensures it fits. + +**Best practice:** Keep the height a multiple of the X‑dimension (e.g., 30 px when X‑dimension is 2 px) to maintain proportion and avoid distortion. + +## Complete example + +Below is the full, self‑contained program you can paste into a console application and run immediately. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Expected output** + +Running the program creates two files in the executable’s working directory: + +* `DatabarBarHeight30Pixels.png` – a 30‑pixel‑high barcode PNG file +* `DatabarBarHeight60Pixels.png` – a 60‑pixel‑high barcode PNG file + +Open either PNG with any image viewer; you’ll see a clear Databar OmniDirectional barcode ready for scanning. + +## Edge cases and troubleshooting + +| Situation | What to check | Recommended fix | +|-----------|---------------|-----------------| +| Barcode appears blurry | X‑dimension too low for chosen height | Increase `XDimension.Pixels` (e.g., from 2 to 3) | +| Scanner fails on low‑height barcode | Height below scanner’s minimum | Set `BarHeight.Pixels` to at least 30 px (or per scanner specs) | +| PNG file is empty or corrupted | Output path invalid or write permission denied | Use an absolute path or ensure the app has write access | +| Need a different symbology | Current `EncodeTypes` not suitable | Replace `EncodeTypes.DatabarOmniDirectional` with another enum value (e.g., `EncodeTypes.Code128`) | + +## Frequently asked questions + +**Q: Can I generate other image formats (JPEG, BMP)?** +A: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, etc. + +**Q: How do I embed the PNG in a web page?** +A: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 string and place it in an `` tag’s `src` attribute. + +**Q: Is there a way to set the background color?** +A: Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any `System.Drawing.Color`). + +## Conclusion + +You now know how to **generate a barcode PNG file** in C# and precisely **adjust barcode height** to meet scanning or design requirements. By changing the `BarHeight.Pixels` property you can **change barcode height** on the fly and produce multiple PNG assets from a single code base. + +Next, explore other customization options such as foreground color, margins, and adding human‑readable text. You can also experiment with different symbologies (`EncodeTypes.Code128`, `EncodeTypes.QR`) to broaden the range of data you can encode. + +Happy coding, and may your barcodes always scan on the first try! + + +## 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 and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/og-image.png b/barcode/english/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..58e79df92421b9278fec8acad1dbb47d78b5d308 GIT binary patch literal 52754 zcmc$`WmFtdvo=Z$2!SBMHCS*6p5PMPb%F;7?!i5R1Se?l;O;WmFu{YnGq}Sb!G{69 zCdqq#+nJ!bb{t{xg7Dzw8`9yvBwcXz3xw@&UBKlyBbPIuM0@9(#v znwpxv6z_6$XUTnAC2fy}6chyK-?0Pp`~M)D|9aZiDzSRvu^7|ETXEFZ}PvYq>q^5on{|ahyPXe z|6YLqrGsHVOnh-Fi<3S!(zzNdGe#&xi`(d7bU|j}>EY!ZOeAN_3gN}d;%sWf?@gwl zAt4JQI@szIj2N){Opq5&`rgc*6%juMie;waLBBEQB$F63QYm>YqURopRXD`DL*7K5Uyc*1R?BxD(*i;SK z?=&L*ly9T$7V<%`^hb{FtTv;(qELH4v;x0+Sg%dMt)Pwm_mFR&4*iEZbK|ro9%Fd6 zu2~vrpYJ2I<(0kc3zrVIvxC2qN9E(b`m?kB0qBL>RyFQ_`z7m6}##~OxGB9W;QWumSiiM$k4Sfp})Z%n*-g5V3WsZDcFa%Y8q3MgTBN90&~COxq#t+#3{o$b5$A& z;1^krm=npw&Kmieo22$OI`}X)wGE?{O7a2hlnNG_lxjFUKdX%1;LDNN4#)9%_3Eb* z52SvlJ@9sXvb4rm>A^27hCEmGiMx9Sph6yV?VTDR}duvX^q^`u-4dUp(SD6&yW;raK-$wo87Cen&%D{ zt&0XihUSKa0XN^2X#>Xj>(&x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B#iyWhKrtrCOXrh&)@yh?4_YD?*`c{jBw}+a?KL0O55s0=S(>n_sA2LqoNnb ziy^QIZ(IttvV!!p>{Oqw(@MYbA3ScAB3bmqFBIBiE=M2z86dGLqL`(d+lcWzqhk57 zM{bR-rTXyq9ih6wSMskEyOM4GT09cnIRUY*wy~QoLa>u8Uo1OO{+{((WVdt&xoc8n@rkP}h4uxFl27HK;Nc?p0y0O%KBKFYKQN3N2i zQTe90jj@7`-yJ!2uZ`i*Hdm)r75w3W=b*+zDQPen6!jan3QO4~&lh@!wq<;o<0ZUg z2WQW08}=GNA`q*lw9EULRV`p)VE1M5C$IxQg_uPg7ha>(0LhvQBiK z;QyHER}?dgD5C(>6Cruh=TCcm+r?xe;KoL7PL8>Sh23kFb3i7Sn@W0`9_ov_qQ&yu zB=$znp>AW#Y;|EE4wgZq$yUo>im}S5@B(_WJtXd#RTY+L9=8*L0Ib8j2u?Wm%kUDS zI}L>Sjqcm0W@;A%7%b-j^dg5Z>~}= zLi+==zh78ZvvM7T(K5chnXNXT((`!qLQwX?GN&8Jdj2<}nBS%x(()Jb6RQ8M{Nz8V iQT}Uw{Ej-mEb!c%#`)zW97t3yy^&FVRU-Y)=YIfE;9LCw literal 0 HcmV?d00001 diff --git a/barcode/english/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/english/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..44fc85a1d --- /dev/null +++ b/barcode/english/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,159 @@ +--- +category: general +date: 2026-08-19 +description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: en +lastmod: 2026-08-19 +og_description: Create databar PNG files in C# using Aspose.BarCode. This tutorial + walks you through how to generate databar images, configure databar parameters such + as X‑dimension and aspect ratio, and save high‑quality PNG files for printing or + web use. +og_image_alt: create databar PNG example +og_title: Create databar PNG images in C# – step‑by‑step guide +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: How to create databar PNG images with C# and Aspose.BarCode +url: /python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# How to create databar PNG images with C# and Aspose.BarCode + +If you need to **create databar PNG** files in a .NET application, this guide shows you exactly how. You’ll see a complete, runnable example that generates stacked omnidirectional DataBar codes, configures key parameters, and saves two PNG files with different aspect ratios. + +Generating a DataBar image isn’t just about calling a single method. You also have to **configure databar parameters** like the X‑dimension (module width) and the aspect ratio to meet printing or scanning specifications. By the end of this tutorial you’ll understand **how to generate databar** graphics that work reliably in real‑world scenarios. + +## Prerequisites + +- .NET 6.0 or later (the code also works with .NET Framework 4.7+) +- Visual Studio 2022 or any C#‑compatible IDE +- A valid license for **Aspose.BarCode for .NET** (the free evaluation works for testing) +- Basic familiarity with C# syntax + +> **Pro tip:** If you don’t have a license yet, you can request a temporary evaluation key from the Aspose portal. The API behaves the same; only the watermark changes. + +## Step 1: Install the Aspose.BarCode NuGet package + +Open your project in Visual Studio, right‑click the solution, and select **Manage NuGet Packages**. Search for `Aspose.BarCode` and install the latest stable version. + +```bash +dotnet add package Aspose.BarCode +``` + +This command adds the `Aspose.BarCode` assembly to your project and makes the `BarcodeGenerator` class available. + +## Step 2: Initialize the barcode generator for a stacked omnidirectional DataBar + +The `BarcodeGenerator` constructor receives two arguments: the barcode type and the raw data string. For a stacked omnidirectional DataBar you use `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Why this matters:** The `EncodeTypes.DatabarStackedOmniDirectional` constant tells the library to produce a barcode that can be read from any orientation, which is ideal for retail shelf labels. + +## Step 3: Configure the X‑dimension (module width) in pixels + +The X‑dimension controls the size of the smallest bar element. Setting it in pixels gives you precise control over the final image size. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +A value of **2 pixels** is a good balance between readability and compactness for most label printers. Adjust this value if you need larger or smaller modules. + +## Step 4: Set the first aspect ratio and save the PNG + +The aspect ratio influences the height of the stacked DataBar. An aspect ratio of **15** produces a relatively short barcode, while **30** makes it taller. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +The `Save` method writes the generated barcode to a PNG file. PNG is lossless, which preserves the crisp edges required for barcode scanners. + +## Step 5: Change the aspect ratio and save a second PNG + +You can reuse the same `BarcodeGenerator` instance to produce variations simply by changing the aspect ratio. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Now you have two PNG files—`DatabarAspectRatio15.png` and `DatabarAspectRatio30.png`—each with a different visual density. + +## Step 6: Verify the output + +Open the generated PNG files in any image viewer. You should see a clean, high‑contrast DataBar barcode. Scanning the images with a smartphone barcode scanner confirms that both aspect ratios decode to the original GTIN value `12345678901231`. + +![create databar PNG example](databar_example.png) + +*The image above shows the two PNG files side by side. The left image uses aspect ratio 15, the right uses aspect ratio 30.* + +## Common variations and edge cases + +| Scenario | What to change | Reason | +|----------|----------------|--------| +| **Different data** | Replace the string `(01)12345678901231` with any valid GS1 Application Identifier and data | Allows you to encode product IDs, serial numbers, etc. | +| **Higher resolution** | Increase `XDimension.Pixels` to 3 or 4 | Needed when the barcode will be printed at large sizes or scanned from a distance. | +| **Other DataBar types** | Use `EncodeTypes.DatabarStacked` or `EncodeTypes.DatabarExpanded` | Choose the type that best fits your label layout. | +| **Transparent background** | Pass `BarCodeImageFormat.Png` with `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Useful for overlaying the barcode on colored labels. | + +> **Watch out for:** Setting an X‑dimension that’s too small (< 1 pixel) can produce a barcode that looks blurry after + + +## 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 and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/og-image.png b/barcode/english/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..53a661c7e094cd1cb695ccfda3b8fc89064c86a1 GIT binary patch literal 51532 zcmbTe1z1$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o~83=c+tire@(89}LW#4Kahl%gs=&Jq#rN_??kk2$KHrK}%w*Q`ehviaZSl&%XPdC8A%%u5E zy+UVqnPFncZuaeYU5HFPFQ3Ug3kZ>)ob1r6qS1~7>)%rJ8l4YGxNWW0`aZevXpm}6<#pu+ z26oY_=;4xae_V*UD=lVx`?e1bheaaiXHyVufQ>yFyPb4b^r=$-}!a{rLS-)6kt!&GN5X^q3!@`a3wNdH6byvzf}E+ zP&~g)flHw~00OH-4=tWXKBcA2nJC|kJ>MrmomKiGsx9KmpU4FbDrD9PTxJRX#x1MT z0AiJqks*}Q*44ocVAGAM(_zcWkIKr!*~}iATb;YTL6(hBZ{`@O>KfUY){Wh7>D&!D zgGLMU^Kl%7C!&=$D~YwWXIOT73-DX-;?A7Vav)Y-2d_!_QEXZ>yq`-5ToU!tyX+*!XkwiUYF2}AGGKK-l6vO4X)@~r|@Yzt^+7=lzx!#qTZzQ99(vYxr z_H{yId=%Bb1Y9a0UsGp)?0PxZJ1np;R~HA?IZ6DKbl2;>#hv-o#`vyMK-GH{SG!^J zndqsuytcdJp$MW6SH`0I!Tq3sdz&v?T16nd`OdBN)NGmU^A=PyqctW@_Yn9XjH{;r z@95}A{mKKvz~b9)D?%+Eb{r#tDf9Q1ofb9P#ERp{&m%hYa;H}ju_xE2yf7c}u7nb=@AoS_$ Fe*?%Av#}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# How to generate postal barcode in C# with Aspose.BarCode + +If you need to **generate postal barcode** for mailing applications, this guide shows you exactly how to generate barcode using the Aspose.BarCode library. You’ll see a complete, runnable example that creates both a Planet barcode (height calculated automatically) and an RM4SCC barcode with an explicit bar height. + +Generating postal barcode is a common requirement for logistics software, automated label printers, and bulk mailing systems. By the end of this tutorial you will be able to integrate barcode generation into any .NET project, customize the X‑dimension, and control the bar height when the standard format allows it. + +**What you’ll learn** + +* How to set up Aspose.BarCode in a C# project. +* How to generate Planet and RM4SCC postal barcodes. +* How to adjust the X‑dimension (module width) and bar height. +* How to save the result as a PNG image. + +No external services are required—everything runs locally after you reference the Aspose.BarCode NuGet package. + +## Prerequisites + +* .NET 6.0 SDK or later (the code also works with .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code, or any C# IDE you prefer. +* Aspose.BarCode for .NET package – install it via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generate postal barcode with Aspose.BarCode + +The following sections walk you through each step, from creating the generator objects to saving the final PNG files. + +### Step 1: Create a Planet barcode (automatic height) + +Planet is a postal barcode used in many countries for mail sorting. When you create a Planet barcode, the library automatically determines the optimal bar height based on the encoded data. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Why this works** – `EncodeTypes.Planet` tells Aspose.BarCode to use the Planet symbology. The `XDimension` property controls the width of the smallest bar (the module). Because Planet does not require a fixed bar height, the library computes a suitable height automatically, which simplifies the code. + +### Step 2: Create an RM4SCC barcode with explicit height + +RM4SCC is another postal symbology that often requires a specific bar height for scanner compatibility. The following code shows how to set that height manually. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Why you set the height** – Some postal scanners expect a minimum bar height. By assigning `BarHeight.Pixels = 100`, you guarantee that the generated image meets those requirements. The X‑dimension remains consistent with the Planet barcode so that both images share the same visual density. + +### Step 3: Verify the output + +After running the program, open the two PNG files located in `YOUR_DIRECTORY`. You should see two distinct barcodes: + +* `PostalPlanetBarHeightNone.png` – a Planet barcode with automatically calculated height. +* `PostalRM4SCCBarHeight100Pixels.png` – an RM4SCC barcode with a 100‑pixel bar height. + +Both images can be fed directly into label printers or displayed in a web application. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Image alt text:* **Generated postal barcode** image using Aspose.BarCode (demonstrates how to generate postal barcode). + +## How to generate barcode with custom dimensions (advanced) + +If you need to fine‑tune other parameters—such as margins, text placement, or color—Aspose.BarCode provides a rich `Parameters` object. Below is a quick example that adds a white background and disables the human‑readable text. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**When to use this** – Disabling the human‑readable text is common for automated sorting where only the machine‑readable pattern matters. Setting a background color ensures the barcode prints correctly on transparent media. + +## Common pitfalls and pro tips + +| Issue | Why it happens | Fix | +|-------|----------------|-----| +| Barcode appears stretched | X‑dimension is too large relative to image size | Keep `XDimension.Pixels` between 2 and 5 for most postal barcodes | +| Scanner rejects the image | Bar height is below the minimum required by the postal service | Use `BarHeight.Pixels` ≥ 80 for RM4SCC unless the spec says otherwise | +| PNG file size is large | Image resolution is higher than needed | Save as PNG‑8 (`BarCodeImageFormat.Png8`) or reduce pixel dimensions | + +**Pro tip:** Always test the generated barcode with a real scanner before deploying to production. Small visual differences can affect readability. + +## Full source code + +Copy the entire block below into a new console application (`Program.cs`). Adjust the output paths to a folder that your process can write to. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Running the program prints *“Barcodes generated successfully.”* and creates the two PNG files in the executable’s working directory. + +## Conclusion + +You now know how to **generate postal barcode** in C# with Aspose.BarCode, covering both automatic‑height Planet barcodes and fixed‑height RM4SCC barcodes. The guide also showed **how to generate barcode** with custom X‑dimension, bar height, and visual options, providing a solid foundation for any mailing‑automation project. + +Next steps you might explore: + +* Integrate the generated PNGs into a PDF invoice using Aspose.PDF. +* Switch the output format to SVG for scalable vector graphics. +* Use the `BarcodeReader` class to verify the encoded data programmatically. + +Feel free to experiment with different symbologies (e.g., `EncodeTypes.Postnet`) and share your results with the community. Happy coding! + + +## 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 Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/og-image.png b/barcode/english/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..cb9f34805de61c915b7b75847eae371117a32bce GIT binary patch literal 56026 zcmbrmbyQT}+whGAC@n~bppw$v-3)-(%sz+1JWG>LzgrR-OaoQ{eFMz zUhnU@*Yn3Si{%{8%-Lt}Ywvx<=eo`WD=A2#y&!ynfPjD|EhVOcfbg^&0pYO=@?+r4 zFN$3h1cccPX))msZnL`!&Tcr8WJrhH;kxq+x>3})^9wa@8Kbd{b#@CRGO`u8uC7%6 znD0ft3CD1e+s3W!FAAcUlDpPz;@$X=rsi$$?eFgI4({Hoo0?BJ@&&&|&$C1Z?gG4= z^qq_!{XKjv^7max=%3G!k^lMR5&7RwUcY|&_u#4j-*;bM%)bYim=C>1KoHvO7Q=lw z@ckaSJf8P#yT&U!EGEjqRYsGLkNn|k-_267xx4U~C>E7{7|ol%ExMP9O?dK${5d%t zgY{2i2>-txQLONP%r818vMWa|3A0fg2j(fLB8|;KQ!^b%hAa}u0Ykim-tWPzWb<({|NeDDgLJy z|J6h~kpTs;FaSaK_8e}He?8R__%m?cocCydNBPT9BXjQ_5C#E_>sbuVXyK-tO!9BH zM%*Eahs!X+5XGU#VUKCvm}Jja(5QA`|DAPT(ii{E@?WWM6?87isZKRn0u8-ckB}$$ z`!Tf(f8ipX@;_4`_a##`f#-i0v~Q~a4E+TRLXD12e@aZ-@>};V8`&NCB|*|0IX2Lp z#yZASsyldaghh?@v z^;(P#`8A0C*E@mNln;yQtDeN)rTTxDAi}@Hbn=!n7N#=0oRTN($##+cmR=yti}G0N zgYMkt%i9tc!Le;Ne%;!fgs8}(l$wC&qtP13 zQ zT~#X6IQUT|#J*8U>et!eSM9hJAKD=ion%Bkf`uTizGM+6H%~+0d=sH3ue+KOv)exQ z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a*EfVbD%15t&knYa9=wwHDRSrO7KIi6LTcLbpC9XN) z)6(J^QiMU^$`iq&j&WWUd(SCQ7ah*xXYcGlvN5KJA7(#qD#{^OFxaUVBEF2JS)bdO zvEEv#A~Xl_9)P9G_w*FntWVc@M%*=0wH;Z|f`*Y9JrX(g7epLjL~K0wg00#>^R67ie9Z#R?oJ&*ouXeG3W_up1q)-v{xldiLv?ngE!)`x6VRaqXElc^&oO zs9ZK66FFbZzF9YPR>O#fQh>O&`?x{_$DhDi(jwZvQz*8x?w6+h8%Ulv#3h?O8W^0Q_ z=wnB6a^c!)YN98D*_xaeI`ytp3@xLX3mMX($a=Ut*ilUp!9L`cH+sDef&(czSGmsH_&H?OKV&LKKp8+gcTikEI|lueM8b;rP}oj6f;0crdCc{ z<#R2<0G#yU#Z;D^c+diJ$(BTkJ45x22!o%P4b^IuuzU3LW4{rDzX=`77!~OVFq6pP zcJ%PFnb?B5dK5FshD|xGd+?lbA3zr_%xx5U=W{G}F~PF;F?C=euH9Hh3>o7&W<1>)xHl|75|Xw1S_r~x}K$9 zKmF@b%somviJyhAi#x=9w&21@RPk2o33-&O1+xK@KPa!7`r~DuBmQnVwNOAS#8yOjHBU4YJO_h+4Qtu zKm6KG@5KU?i3XIsxrLXI=nMTC8@PwW>MB)6n*x=ni~Bk7zpryMx5`xDBm7V`QgE9^xcZbgYLl+=Ju}vqEb-v-67mF8%CSp$Gv1 zfevP+z4D(_4j~$c)V#c|!O>;_cspwtTU>F9iXsPz+E^WJ&Bz#YeYt9Tj6JMaL7SM4 z(&dSSK)&&^k`9a+$cm;HTpopE z@5%dbo3GPNSNHXHBRfZ%dz!jlaB{J6boR+15ILLLX=oE7qyfC zMC3Pq8pu2%9=}+M0jAqfagLU9~@GrZ;reSgvG0h<)78&qol`;+07>ec ArT_o{ literal 0 HcmV?d00001 diff --git a/barcode/french/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/french/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..b50988376 --- /dev/null +++ b/barcode/french/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,253 @@ +--- +category: general +date: 2026-08-19 +description: Le tutoriel du générateur de codes‑barres C# montre comment générer des + codes‑barres DataBar Expanded Stacked, personnaliser la taille du code‑barres et + configurer les lignes et les colonnes. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: fr +lastmod: 2026-08-19 +og_description: Le tutoriel du générateur de codes-barres C# vous apprend à créer + des codes-barres DataBar, à personnaliser la taille et à configurer les lignes et + les colonnes pour un rendu précis. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Générateur de codes-barres C# – guide étape par étape pour les codes-barres + DataBar personnalisés +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Générateur de codes-barres C# : créer des codes-barres DataBar personnalisés' +url: /fr/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Générateur de codes-barres C# : créer des codes-barres DataBar personnalisés + +Si vous avez besoin d’un **c# barcode generator** capable de produire des symboles DataBar Expanded Stacked, ce guide vous montre exactement comment générer des images de codes-barres avec des lignes et des colonnes personnalisées. Vous apprendrez à configurer les paramètres databar, ajuster la taille du code-barres et enregistrer le résultat au format PNG. + +Créer des codes-barres de façon programmatique supprime les étapes de conception manuelle et garantit une sortie cohérente sur toutes les plateformes. Dans ce tutoriel, vous allez : + +* Installer et référencer la bibliothèque Aspose.BarCode pour .NET (ou tout package compatible). +* Créer un générateur de code-barres pour la symbologie DataBar Expanded Stacked. +* **Comment générer des images de code-barres** avec des paramètres de colonne et de ligne spécifiques. +* **Personnaliser la taille du code-barres** en contrôlant les lignes et colonnes DataBar. +* **Configurer les paramètres databar** tels que le texte, le format et la qualité de l’image. + +## Prérequis + +* SDK .NET 6.0 ou version ultérieure installé. +* Un environnement de développement C# (Visual Studio, VS Code, Rider, etc.). +* Package NuGet `Aspose.BarCode` (ou une bibliothèque équivalente qui fournit `BarcodeGenerator`, `EncodeTypes` et `BarCodeImageFormat`). + +Ajoutez le package avec la CLI .NET : + +```bash +dotnet add package Aspose.BarCode +``` + +## Utilisation du générateur de codes-barres C# pour créer des codes-barres DataBar + +Les sections suivantes vous guident à travers chaque étape. L’accent principal est mis sur l’API **c# barcode generator**, mais le même modèle s’applique aux autres bibliothèques de codes-barres qui exposent des propriétés similaires. + +### Étape 1 : Initialiser le générateur de code-barres avec du texte d’exemple + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Pourquoi cette étape ?* +`BarcodeGenerator` est le point d’entrée pour toutes les tâches de création de code-barres. Fournir l’énumération `EncodeTypes.DatabarExpandedStacked` indique à la bibliothèque quelle symbologie utiliser, tandis que l’argument texte devient la valeur lisible par l’homme encodée dans le symbole. + +### Étape 2 : Définir le nombre de colonnes (les lignes par défaut sont utilisées) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Pourquoi cette étape ?* +Les symboles DataBar Expanded Stacked sont composés d’éléments linéaires empilés. Ajuster la propriété `Columns` modifie la densité horizontale, vous permettant d’insérer des chaînes de données plus longues sans augmenter la hauteur globale. Cela **personnalise directement la taille du code-barres**. + +### Étape 3 : Enregistrer l’image du code-barres qui utilise quatre colonnes + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Ce que vous voyez :* +L’image enregistrée `DatabarCols4.png` montre un code-barres DataBar plus large que la valeur par défaut car il contient quatre colonnes. Vous pouvez ouvrir le fichier dans n’importe quel visualiseur d’images pour vérifier le résultat. + +### Étape 4 : Ré‑initialiser le générateur pour une nouvelle configuration + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Pourquoi ré‑initialiser ?* +Modifier la propriété `Rows` tout en conservant le réglage de colonne précédent pourrait produire une combinaison inattendue. Commencer avec une nouvelle instance garantit que seul le paramètre prévu (`Rows`) influence l’image suivante. + +### Étape 5 : Définir le nombre de lignes (les colonnes par défaut sont utilisées) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Pourquoi cette étape ?* +La propriété `Rows` contrôle l’empilement vertical. Augmenter le nombre de lignes rend le code-barres plus haut, ce qui peut être utile lorsque l’espace est limité horizontalement mais abondant verticalement. C’est une autre façon de **personnaliser la taille du code-barres**. + +### Étape 6 : Enregistrer l’image du code-barres qui utilise trois lignes + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Résultat :* +`DatabarRows3.png` montre un code-barres plus haut avec trois lignes empilées, démontrant comment **configurer les paramètres databar** influence l’apparence visuelle. + +## Exemple complet exécutable + +Voici un programme complet que vous pouvez copier, coller et exécuter. Il inclut tous les imports, la gestion des erreurs et des commentaires pour plus de clarté. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Sortie attendue** + +Exécuter le programme produit deux fichiers PNG : + +* `DatabarCols4.png` – un code-barres DataBar large avec quatre colonnes. +* `DatabarRows3.png` – un code-barres DataBar haut avec trois lignes. + +Ouvrez les images pour confirmer que les dimensions du code-barres correspondent aux paramètres configurés. + +## Questions fréquentes et gestion des cas limites + +| Question | Réponse | +|----------|--------| +| *Et si j’ai besoin à la fois de lignes personnalisées **et** de colonnes ?* | Définissez `Rows` **et** `Columns` sur la même instance de `BarcodeGenerator` avant d’appeler `Save`. La bibliothèque combine les deux valeurs pour produire une grille de la taille demandée. | +| *Puis-je changer le format de l’image ?* | Oui. Remplacez `BarCodeImageFormat.Png` par `Jpeg`, `Bmp` ou `Gif` selon votre flux de travail. | +| *Que se passe-t-il lorsque le texte est plus long que ce que le symbole peut contenir ?* | Le générateur lève une `ArgumentException`. Raccourcissez le texte ou augmentez `Columns`/`Rows` pour offrir plus de capacité. | +| *Existe-t-il un moyen de définir le DPI ou la résolution de l’image ?* | Utilisez `generator.Parameters.ImageResolution` pour spécifier le DPI souhaité avant l’enregistrement. Cela **personnalise davantage la taille du code-barres** pour l’impression haute résolution. | +| *La bibliothèque prend‑elle en charge d’autres variantes DataBar ?* | Oui. Remplacez `EncodeTypes.DatabarExpandedStacked` par `DatabarExpanded`, `DatabarLimited`, etc., tout en conservant la même structure de paramètres. | + +## Conseils pour une génération fiable de codes-barres + +* **Astuce pro :** Vérifiez toujours l’image générée avec un scanner ou une application mobile avant de la déployer en production. +* **Attention à :** Les répertoires de sortie nuls ou vides—`Save` lèvera une exception si le chemin n’existe pas. Créez le dossier programmatique si nécessaire. +* **Note de performance :** Réutiliser une seule instance de `BarcodeGenerator` et ne modifier que `Rows` ou `Columns` peut réduire la surcharge de création d’objets lors de la génération de nombreux codes-barres dans une boucle. + +## Conclusion + +Vous savez maintenant comment utiliser un **c# barcode generator** pour **créer des images de code-barres databar**, **personnaliser la taille du code-barres** et **configurer les paramètres databar** tels que les lignes et les colonnes. En ajustant ces paramètres, vous pouvez adapter les codes-barres à n’importe quelle exigence de mise en page tout en conservant la fiabilité du scan. + +Ensuite, explorez des sujets connexes comme **comment générer des PDF de code-barres**, l’intégration de codes-barres dans des rapports, ou le passage à d’autres symbologies (QR, Code‑128, etc.). Expérimentez avec différents `Rows`, `Columns` et résolutions d’image pour trouver la configuration optimale pour votre cas d’utilisation spécifique. + +--- + + +## 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 générer et ajuster la hauteur du code-barres pour Databar unidimensionnel avec Aspose.BarCode pour .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Générer des codes-barres Databar 2D unidimensionnels en utilisant l’API Aspose.BarCode .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Générer un code-barres Aspose.BarCode Databar avec l’API .NET – Configuration des lignes et colonnes](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/french/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..c366c6529 --- /dev/null +++ b/barcode/french/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,221 @@ +--- +category: general +date: 2026-08-19 +description: Apprenez à générer un fichier PNG de code‑barres en C# et à ajuster sa + hauteur, en couvrant la génération d’images de code‑barres et la modification facile + de la hauteur du code‑barres. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: fr +lastmod: 2026-08-19 +og_description: Créez un fichier PNG de code‑barres en C# et apprenez à générer des + images de code‑barres, à ajuster la hauteur du code‑barres et à modifier la hauteur + du code‑barres pour des scans optimaux. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Créer un fichier PNG de code‑barres en C# – guide étape par étape +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Comment créer un fichier PNG de code‑barres avec une hauteur réglable en C# +url: /fr/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Comment créer un fichier PNG de code‑barres avec hauteur réglable en C# + +Si vous devez créer un **fichier PNG de code‑barres** en C#, ce guide vous montre exactement comment faire. Vous verrez un exemple complet et exécutable qui démontre **comment générer des images de code‑barres** et comment **ajuster la hauteur du code‑barres** pour différents cas d’utilisation. + +Générer un fichier PNG de code‑barres est une exigence courante pour les systèmes d’inventaire, les terminaux de point de vente et toute application qui doit imprimer ou afficher des données lisibles par machine. À la fin de ce tutoriel, vous serez capable de modifier la hauteur du code‑barres, d’enregistrer plusieurs fichiers PNG et de comprendre l’impact de la hauteur sur la fiabilité de la lecture. + +## Prérequis + +Avant de commencer, assurez‑vous d’avoir : + +* Le SDK .NET 6.0 ou une version ultérieure installé +* Visual Studio 2022 (ou tout IDE supportant .NET) +* Le package NuGet **Aspose.BarCode for .NET** (l’exemple de code utilise cette bibliothèque) + +Vous pouvez ajouter le package depuis la ligne de commande : + +```bash +dotnet add package Aspose.BarCode +``` + +> **Astuce :** La version d’évaluation gratuite d’Aspose.BarCode fonctionne pour le développement et les tests. Pour la production, obtenez une clé sous licence. + +## Installer la bibliothèque de code‑barres + +La première étape consiste à référencer la bibliothèque dans votre projet. Ajoutez les directives `using` suivantes en haut de votre fichier C# : + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Ces espaces de noms vous donnent accès à `BarcodeGenerator`, `EncodeTypes` et `BarCodeImageFormat`. + +## Créer le fichier PNG de code‑barres + +Nous créons maintenant une instance de `BarcodeGenerator` qui produira un **fichier PNG de code‑barres**. L’exemple utilise la symbologie Databar OmniDirectional, mais vous pouvez remplacer `EncodeTypes.DatabarOmniDirectional` par n’importe quel type supporté. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +La chaîne `"(01)12345678901231"` suit le format d’Identifiant d’Application GS1 pour un GTIN à 14 chiffres. Ajustez les données pour correspondre à vos propres identifiants de produit. + +## Définir la dimension X (facultatif) + +La dimension X définit la largeur d’un seul module du code‑barres. Une valeur basée sur les pixels vous donne un contrôle précis sur la taille de l’image. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Une valeur de `2` pixels fonctionne bien pour la plupart des affichages écran. Augmentez‑la si vous avez besoin d’un code‑barres plus grand lors de l’impression. + +## Ajuster la hauteur du code‑barres et enregistrer le fichier PNG + +La propriété **BarHeight** contrôle la taille verticale des barres. Modifier cette valeur vous permet de **ajuster la hauteur du code‑barres** sans affecter les données encodées. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Le fichier `DatabarBarHeight30Pixels.png` est maintenant un **fichier PNG de code‑barres** de 30 pixels de haut. + +Pour **modifier la hauteur du code‑barres** et créer une seconde image, il suffit d’assigner une nouvelle valeur et d’appeler à nouveau `Save` : + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Vous avez maintenant deux fichiers PNG — un à 30 px et un autre à 60 px — démontrant comment **ajuster la hauteur du code‑barres** à la volée. + +### Pourquoi la hauteur des barres est importante + +* **Lisibilité :** Les lecteurs attendent une hauteur minimale pour une détection fiable. Un code‑barres trop court peut être manqué, surtout avec des caméras basse résolution. +* **Esthétique :** Adapter la hauteur du code‑barres aux éléments de design environnants crée une interface plus propre. +* **Contraintes d’impression :** Certains imprimantes d’étiquettes ont des emplacements de hauteur fixes ; ajuster la hauteur du code‑barres garantit qu’il s’y intègre. + +**Bonne pratique :** Gardez la hauteur comme multiple de la dimension X (par ex., 30 px lorsque la dimension X est de 2 px) afin de maintenir les proportions et éviter les distorsions. + +## Exemple complet + +Voici le programme complet, autonome, que vous pouvez coller dans une application console et exécuter immédiatement. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Sortie attendue** + +L’exécution du programme crée deux fichiers dans le répertoire de travail de l’exécutable : + +* `DatabarBarHeight30Pixels.png` – un fichier PNG de code‑barres de 30 pixels de haut +* `DatabarBarHeight60Pixels.png` – un fichier PNG de code‑barres de 60 pixels de haut + +Ouvrez l’un ou l’autre PNG avec n’importe quel visualiseur d’images ; vous verrez un code‑barres Databar OmniDirectional clair, prêt à être scanné. + +## Cas limites et dépannage + +| Situation | À vérifier | Correction recommandée | +|-----------|------------|------------------------| +| Le code‑barres apparaît flou | Dimension X trop basse pour la hauteur choisie | Augmentez `XDimension.Pixels` (par ex., de 2 à 3) | +| Le lecteur échoue sur un code‑barres de faible hauteur | Hauteur inférieure au minimum du lecteur | Définissez `BarHeight.Pixels` à au moins 30 px (ou selon les spécifications du lecteur) | +| Le fichier PNG est vide ou corrompu | Chemin de sortie invalide ou permission d’écriture refusée | Utilisez un chemin absolu ou assurez‑vous que l’application a les droits d’écriture | +| Besoin d’une symbologie différente | `EncodeTypes` actuel inadapté | Remplacez `EncodeTypes.DatabarOmniDirectional` par une autre valeur d’énumération (par ex., `EncodeTypes.Code128`) | + +## Questions fréquentes + +**Q : Puis‑je générer d’autres formats d’image (JPEG, BMP) ?** +R : Oui. Remplacez `BarCodeImageFormat.Png` par `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, etc. + +**Q : Comment intégrer le PNG dans une page web ?** +R : Servez le PNG généré via un point de terminaison HTTP ou convertissez‑le en chaîne Base64 et placez‑le dans l’attribut `src` d’une balise ``. + +**Q : Existe‑t‑il un moyen de définir la couleur d’arrière‑plan ?** +R : Utilisez `generator.Parameters.Image.BackgroundColor = Color.White;` (ou toute `System.Drawing.Color`). + +## Conclusion + +Vous savez maintenant comment **générer un fichier PNG de code‑barres** en C# et **ajuster précisément la hauteur du code‑barres** pour répondre aux exigences de lecture ou de design. En modifiant la propriété `BarHeight.Pixels`, vous pouvez **modifier la hauteur du code‑barres** à la volée et produire plusieurs actifs PNG à partir d’une même base de code. + +Ensuite, explorez d’autres options de personnalisation telles que la couleur du premier plan, les marges et l’ajout de texte lisible par l’homme. Vous pouvez également expérimenter avec différentes symbologies (`EncodeTypes.Code128`, `EncodeTypes.QR`) pour élargir le champ des données que vous pouvez encoder. + +Bon codage, et que vos codes‑barres soient toujours lus du premier coup ! + +## 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 avec des explications pas à pas pour vous aider à maîtriser des fonctionnalités supplémentaires de l’API et à explorer des approches d’implémentation alternatives dans vos propres projets. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/french/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/french/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..e7dbee0ae --- /dev/null +++ b/barcode/french/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,158 @@ +--- +category: general +date: 2026-08-19 +description: Créer des fichiers PNG databar en C# avec Aspose.BarCode. Apprenez à + générer des images databar, à configurer les paramètres databar et à enregistrer + la sortie PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: fr +lastmod: 2026-08-19 +og_description: Créez des fichiers PNG de databar en C# avec Aspose.BarCode. Ce tutoriel + vous guide pas à pas pour générer des images databar, configurer les paramètres + du databar tels que la dimension X et le rapport d’aspect, et enregistrer des fichiers + PNG de haute qualité pour l’impression ou l’utilisation Web. +og_image_alt: create databar PNG example +og_title: Créer des images PNG de databar en C# – guide étape par étape +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Comment créer des images PNG de databar avec C# et Aspose.BarCode +url: /fr/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Comment créer des images PNG databar avec C# et Aspose.BarCode + +Si vous devez **créer des fichiers PNG databar** dans une application .NET, ce guide vous montre exactement comment procéder. Vous verrez un exemple complet et exécutable qui génère des codes DataBar empilés omnidirectionnels, configure les paramètres clés et enregistre deux fichiers PNG avec des rapports d’aspect différents. + +Générer une image DataBar ne consiste pas seulement à appeler une seule méthode. Vous devez également **configurer les paramètres du databar** tels que la X‑dimension (largeur du module) et le rapport d’aspect afin de répondre aux spécifications d’impression ou de numérisation. À la fin de ce tutoriel, vous comprendrez **comment générer des graphiques databar** qui fonctionnent de manière fiable dans des scénarios réels. + +## Prérequis + +- .NET 6.0 ou version ultérieure (le code fonctionne également avec .NET Framework 4.7+) +- Visual Studio 2022 ou tout IDE compatible C# +- Une licence valide pour **Aspose.BarCode for .NET** (l’évaluation gratuite fonctionne pour les tests) +- Familiarité de base avec la syntaxe C# + +> **Astuce :** Si vous n’avez pas encore de licence, vous pouvez demander une clé d’évaluation temporaire depuis le portail Aspose. L’API se comporte de la même façon ; seul le filigrane change. + +## Étape 1 : Installer le package NuGet Aspose.BarCode + +Ouvrez votre projet dans Visual Studio, faites un clic droit sur la solution et sélectionnez **Manage NuGet Packages**. Recherchez `Aspose.BarCode` et installez la dernière version stable. + +```bash +dotnet add package Aspose.BarCode +``` + +Cette commande ajoute l’assembly `Aspose.BarCode` à votre projet et rend la classe `BarcodeGenerator` disponible. + +## Étape 2 : Initialiser le générateur de code-barres pour un DataBar empilé omnidirectionnel + +Le constructeur `BarcodeGenerator` reçoit deux arguments : le type de code-barres et la chaîne de données brutes. Pour un DataBar empilé omnidirectional, vous utilisez `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Pourquoi c’est important :** La constante `EncodeTypes.DatabarStackedOmniDirectional` indique à la bibliothèque de produire un code-barres qui peut être lu sous n’importe quelle orientation, ce qui est idéal pour les étiquettes de rayonnage en magasin. + +## Étape 3 : Configurer la X‑dimension (largeur du module) en pixels + +La X‑dimension contrôle la taille du plus petit élément de barre. La définir en pixels vous donne un contrôle précis sur la taille finale de l’image. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Une valeur de **2 pixels** représente un bon compromis entre lisibilité et compacité pour la plupart des imprimantes d’étiquettes. Ajustez cette valeur si vous avez besoin de modules plus grands ou plus petits. + +## Étape 4 : Définir le premier rapport d’aspect et enregistrer le PNG + +Le rapport d’aspect influence la hauteur du DataBar empilé. Un rapport d’aspect de **15** produit un code-barres relativement court, tandis que **30** le rend plus haut. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +La méthode `Save` écrit le code-barres généré dans un fichier PNG. Le PNG est sans perte, ce qui préserve les bords nets requis pour les lecteurs de codes-barres. + +## Étape 5 : Modifier le rapport d’aspect et enregistrer un deuxième PNG + +Vous pouvez réutiliser la même instance `BarcodeGenerator` pour produire des variantes simplement en modifiant le rapport d’aspect. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Vous avez maintenant deux fichiers PNG — `DatabarAspectRatio15.png` et `DatabarAspectRatio30.png` — chacun avec une densité visuelle différente. + +## Étape 6 : Vérifier la sortie + +Ouvrez les fichiers PNG générés dans n’importe quel visualiseur d’images. Vous devriez voir un code-barres DataBar net et à fort contraste. Scanner les images avec un lecteur de code-barres sur smartphone confirme que les deux rapports d’aspect décodent la valeur GTIN originale `12345678901231`. + +![create databar PNG example](databar_example.png) + +*L’image ci‑dessus montre les deux fichiers PNG côte à côte. L’image de gauche utilise le rapport d’aspect 15, celle de droite utilise le rapport d’aspect 30.* + +## Variations courantes et cas limites + +| Scénario | Ce qu’il faut modifier | Raison | +|----------|------------------------|--------| +| **Données différentes** | Remplacez la chaîne `(01)12345678901231` par tout identifiant d’application GS1 valide et les données | Permet d’encoder des ID produit, numéros de série, etc. | +| **Résolution supérieure** | Augmentez `XDimension.Pixels` à 3 ou 4 | Nécessaire lorsque le code-barres sera imprimé en grande taille ou scanné à distance. | +| **Autres types de DataBar** | Utilisez `EncodeTypes.DatabarStacked` ou `EncodeTypes.DatabarExpanded` | Choisissez le type qui convient le mieux à la mise en page de votre étiquette. | +| **Fond transparent** | Passez `BarCodeImageFormat.Png` avec `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Utile pour superposer le code-barres sur des étiquettes colorées. | + +> **Attention :** Définir une X‑dimension trop petite (< 1 pixel) peut produire un code-barres qui apparaît flou après + +## 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 supplémentaires de l’API et à explorer des approches d’implémentation alternatives dans vos propres projets. + +- [Comment générer et ajuster la hauteur du code-barres pour Databar unidimensionnel avec Aspose.BarCode pour .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Créer un encodage GS1 Databar unidimensionnel avec Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Générer un code-barres Databar Aspose.BarCode en utilisant l’API .NET – Configuration des lignes et colonnes](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/french/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..03b9b9712 --- /dev/null +++ b/barcode/french/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Apprenez à générer un code‑barres postal en C# avec Aspere.BarCode. Ce + guide étape par étape montre comment créer un code‑barres pour les formats Planet + et RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: fr +lastmod: 2026-08-19 +og_description: Générez un code‑barres postal en C# avec Aspose.BarCode. Suivez ce + guide pour apprendre comment créer un code‑barres pour Planet et RM4SCC avec des + dimensions personnalisées. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Générer un code‑barres postal en C# – guide complet d’Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Comment générer un code‑barres postal en C# avec Aspose.BarCode +url: /fr/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Comment générer un code‑barres postal en C# avec Aspose.BarCode + +Si vous devez **générer un code‑barres postal** pour des applications d'envoi, ce guide vous montre exactement comment générer un code‑barres en utilisant la bibliothèque Aspose.BarCode. Vous verrez un exemple complet et exécutable qui crée à la fois un code‑barres Planet (hauteur calculée automatiquement) et un code‑barres RM4SCC avec une hauteur de barre explicite. + +La génération de code‑barres postal est une exigence courante pour les logiciels logistiques, les imprimantes d'étiquettes automatisées et les systèmes d'envoi en masse. À la fin de ce tutoriel, vous serez capable d'intégrer la génération de code‑barres dans n'importe quel projet .NET, de personnaliser la X‑dimension et de contrôler la hauteur des barres lorsque le format standard le permet. + +**Ce que vous apprendrez** + +* Comment configurer Aspose.BarCode dans un projet C#. +* Comment générer les codes‑barres postaux Planet et RM4SCC. +* Comment ajuster la X‑dimension (largeur du module) et la hauteur des barres. +* Comment enregistrer le résultat sous forme d'image PNG. + +Aucun service externe n'est requis — tout s'exécute localement après avoir référencé le package NuGet Aspose.BarCode. + +## Prérequis + +* .NET 6.0 SDK ou version ultérieure (le code fonctionne également avec .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code, ou tout IDE C# de votre choix. +* Package Aspose.BarCode for .NET – installez-le via NuGet : + +```bash +dotnet add package Aspose.BarCode +``` + +## Générer un code‑barres postal avec Aspose.BarCode + +Les sections suivantes vous guident à travers chaque étape, de la création des objets générateurs à l'enregistrement des fichiers PNG finaux. + +### Étape 1 : Créer un code‑barres Planet (hauteur automatique) + +Planet est un code‑barres postal utilisé dans de nombreux pays pour le tri du courrier. Lorsque vous créez un code‑barres Planet, la bibliothèque détermine automatiquement la hauteur optimale des barres en fonction des données encodées. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Pourquoi cela fonctionne** – `EncodeTypes.Planet` indique à Aspose.BarCode d'utiliser la symbologie Planet. La propriété `XDimension` contrôle la largeur de la plus petite barre (le module). Comme Planet ne nécessite pas de hauteur de barre fixe, la bibliothèque calcule automatiquement une hauteur adaptée, ce qui simplifie le code. + +### Étape 2 : Créer un code‑barres RM4SCC avec hauteur explicite + +RM4SCC est une autre symbologie postale qui nécessite souvent une hauteur de barre spécifique pour la compatibilité avec les scanners. Le code suivant montre comment définir cette hauteur manuellement. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Pourquoi vous définissez la hauteur** – Certains scanners postaux attendent une hauteur de barre minimale. En assignant `BarHeight.Pixels = 100`, vous garantissez que l'image générée répond à ces exigences. La X‑dimension reste cohérente avec le code‑barres Planet afin que les deux images partagent la même densité visuelle. + +### Étape 3 : Vérifier la sortie + +Après avoir exécuté le programme, ouvrez les deux fichiers PNG situés dans `YOUR_DIRECTORY`. Vous devriez voir deux codes‑barres distincts : + +* `PostalPlanetBarHeightNone.png` – un code‑barres Planet avec hauteur calculée automatiquement. +* `PostalRM4SCCBarHeight100Pixels.png` – un code‑barres RM4SCC avec une hauteur de barre de 100 pixels. + +Les deux images peuvent être directement envoyées aux imprimantes d'étiquettes ou affichées dans une application web. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Texte alternatif de l'image :* **Code‑barres postal généré** image using Aspose.BarCode (démontre comment générer un code‑barres postal). + +## Comment générer un code‑barres avec des dimensions personnalisées (avancé) + +Si vous devez affiner d'autres paramètres — tels que les marges, le placement du texte ou la couleur — Aspose.BarCode fournit un objet `Parameters` riche. Voici un exemple rapide qui ajoute un arrière‑plan blanc et désactive le texte lisible par l'homme. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Quand l'utiliser** – Désactiver le texte lisible par l'homme est courant pour le tri automatisé où seul le motif lisible par la machine importe. Définir une couleur d'arrière‑plan garantit que le code‑barres s'imprime correctement sur un support transparent. + +## Pièges courants et astuces pro + +| Problème | Pourquoi cela se produit | Solution | +|----------|--------------------------|----------| +| Le code‑barres apparaît étiré | La X‑dimension est trop grande par rapport à la taille de l'image | Conservez `XDimension.Pixels` entre 2 et 5 pour la plupart des codes‑barres postaux | +| Le scanner rejette l'image | La hauteur de la barre est inférieure au minimum requis par le service postal | Utilisez `BarHeight.Pixels` ≥ 80 pour RM4SCC sauf si la spécification indique le contraire | +| La taille du fichier PNG est grande | La résolution de l'image est supérieure à ce qui est nécessaire | Enregistrez en PNG‑8 (`BarCodeImageFormat.Png8`) ou réduisez les dimensions en pixels | + +**Astuce pro :** Testez toujours le code‑barres généré avec un vrai scanner avant de le déployer en production. De petites différences visuelles peuvent affecter la lisibilité. + +## Code source complet + +Copiez le bloc complet ci‑dessus dans une nouvelle application console (`Program.cs`). Ajustez les chemins de sortie vers un dossier dans lequel votre processus peut écrire. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +L'exécution du programme affiche *« Barcodes generated successfully. »* et crée les deux fichiers PNG dans le répertoire de travail de l'exécutable. + +## Conclusion + +Vous savez maintenant comment **générer un code‑barres postal** en C# avec Aspose.BarCode, couvrant à la fois les codes‑barres Planet à hauteur automatique et les codes‑barres RM4SCC à hauteur fixe. Le guide a également montré **comment générer un code‑barres** avec une X‑dimension personnalisée, une hauteur de barre et des options visuelles, offrant une base solide pour tout projet d'automatisation d'envoi. + +Les prochaines étapes que vous pourriez explorer : + +* Intégrer les PNG générés dans une facture PDF à l'aide d'Aspose.PDF. +* Passer le format de sortie à SVG pour des graphiques vectoriels évolutifs. +* Utiliser la classe `BarcodeReader` pour vérifier les données encodées programmatiquement. + +N'hésitez pas à expérimenter différentes symbologies (par ex., `EncodeTypes.Postnet`) et à partager vos résultats avec la communauté. Bon codage ! + +## 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 générer une image de code‑barres avec personnalisation de l'espace supplémentaire en utilisant Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Comment générer un code‑barres – Configuration Code 39 avec Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-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/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/german/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..f6101a22f --- /dev/null +++ b/barcode/german/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,251 @@ +--- +category: general +date: 2026-08-19 +description: Das C#‑Barcode‑Generator‑Tutorial zeigt, wie man DataBar Expanded Stacked‑Barcodes + erzeugt, die Barcode‑Größe anpasst und Zeilen sowie Spalten konfiguriert. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: de +lastmod: 2026-08-19 +og_description: Das C#‑Barcode‑Generator‑Tutorial zeigt Ihnen, wie Sie DataBar‑Barcodes + erzeugen, die Größe anpassen und Zeilen sowie Spalten für eine präzise Ausgabe konfigurieren. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C#-Barcode-Generator – Schritt‑für‑Schritt‑Anleitung für benutzerdefinierte + DataBar‑Barcodes +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C#‑Barcode‑Generator: benutzerdefinierte DataBar‑Barcodes erstellen' +url: /de/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# Barcode-Generator: benutzerdefinierte DataBar-Barcodes erstellen + +Wenn Sie einen **c# barcode generator** benötigen, der DataBar Expanded Stacked‑Symbole erzeugen kann, zeigt Ihnen dieser Leitfaden genau, wie Sie Barcode‑Bilder mit benutzerdefinierten Zeilen und Spalten generieren. Sie lernen, Databar‑Parameter zu konfigurieren, die Barcode‑Größe anzupassen und das Ergebnis als PNG‑Dateien zu speichern. + +Das programmgesteuerte Erzeugen von Barcodes eliminiert manuelle Designschritte und garantiert konsistente Ausgaben über verschiedene Plattformen hinweg. In diesem Tutorial werden Sie: + +* Die Aspose.BarCode for .NET‑Bibliothek installieren und referenzieren (oder ein kompatibles Paket). +* Einen Barcode‑Generator für die DataBar Expanded Stacked‑Symbologie erstellen. +* **How to generate barcode**‑Bilder mit spezifischen Spalten‑ und Zeileneinstellungen erzeugen. +* **Customize barcode size** durch Steuerung der DataBar‑Zeilen und -Spalten anpassen. +* **Configure databar parameters** wie Text, Format und Bildqualität konfigurieren. + +## Voraussetzungen + +* .NET 6.0 SDK oder höher installiert. +* Eine C#‑Entwicklungsumgebung (Visual Studio, VS Code, Rider usw.). +* NuGet‑Paket `Aspose.BarCode` (oder eine gleichwertige Bibliothek, die `BarcodeGenerator`, `EncodeTypes` und `BarCodeImageFormat` bereitstellt). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Verwendung des C# Barcode-Generators zur Erstellung von DataBar-Barcodes + +Die folgenden Abschnitte führen Sie Schritt für Schritt durch den Prozess. Der Schwerpunkt liegt auf der **c# barcode generator**‑API, aber das gleiche Muster gilt für andere Barcode‑Bibliotheken, die ähnliche Eigenschaften bereitstellen. + +### Schritt 1: Initialisieren des Barcode-Generators mit Beispieltext + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Warum dieser Schritt?* +`BarcodeGenerator` ist der Einstiegspunkt für alle Barcode‑Erstellungsaufgaben. Durch die Angabe des Enums `EncodeTypes.DatabarExpandedStacked` wird der Bibliothek mitgeteilt, welche Symbologie verwendet werden soll, während das Text‑Argument den menschenlesbaren Wert im Symbol darstellt. + +### Schritt 2: Anzahl der Spalten festlegen (Standard‑Zeilen werden verwendet) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Warum dieser Schritt?* +DataBar Expanded Stacked‑Symbole bestehen aus gestapelten linearen Elementen. Das Anpassen der Eigenschaft `Columns` ändert die horizontale Dichte und ermöglicht es, längere Datenzeichenketten unter Beibehaltung der Gesamthöhe unterzubringen. Dies **customizes barcode size** direkt. + +### Schritt 3: Barcode‑Bild speichern, das vier Spalten verwendet + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Was Sie sehen:* +Das gespeicherte Bild `DatabarCols4.png` zeigt einen DataBar‑Barcode, der breiter als der Standard ist, weil er vier Spalten enthält. Sie können die Datei in jedem Bildbetrachter öffnen, um das Ergebnis zu überprüfen. + +### Schritt 4: Generator für eine neue Konfiguration neu initialisieren + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Warum neu initialisieren?* +Das Ändern der Eigenschaft `Rows` bei gleichzeitig beibehaltener vorheriger Spalteneinstellung könnte zu einer unerwarteten Kombination führen. Das Starten mit einer frischen Instanz stellt sicher, dass nur der beabsichtigte Parameter (`Rows`) das nächste Bild beeinflusst. + +### Schritt 5: Anzahl der Zeilen festlegen (Standard‑Spalten werden verwendet) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Warum dieser Schritt?* +Die Eigenschaft `Rows` steuert das vertikale Stapeln. Mehr Zeilen machen den Barcode höher, was nützlich sein kann, wenn horizontal wenig Platz, aber vertikal viel Raum vorhanden ist. Dies ist ein weiterer Weg, um **customize barcode size** zu erreichen. + +### Schritt 6: Barcode‑Bild speichern, das drei Zeilen verwendet + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Ergebnis:* +`DatabarRows3.png` zeigt einen höheren Barcode mit drei gestapelten Zeilen und demonstriert, wie **configure databar parameters** das visuelle Erscheinungsbild beeinflussen. + +## Vollständiges ausführbares Beispiel + +Unten finden Sie ein komplettes Programm, das Sie kopieren, einfügen und ausführen können. Es enthält alle Importe, Fehlerbehandlung und Kommentare zur Klarheit. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Erwartete Ausgabe** + +Das Ausführen des Programms erzeugt zwei PNG‑Dateien: + +* `DatabarCols4.png` – ein breiter DataBar‑Barcode mit vier Spalten. +* `DatabarRows3.png` – ein hoher DataBar‑Barcode mit drei Zeilen. + +Öffnen Sie die Bilder, um zu bestätigen, dass die Barcode‑Abmessungen den konfigurierten Parametern entsprechen. + +## Häufige Fragen und Edge‑Case‑Behandlung + +| Frage | Antwort | +|----------|--------| +| *Was ist, wenn ich sowohl benutzerdefinierte Zeilen **und** Spalten benötige?* | Setzen Sie `Rows` **und** `Columns` auf derselben `BarcodeGenerator`‑Instanz, bevor Sie `Save` aufrufen. Die Bibliothek kombiniert beide Werte, um ein Raster der gewünschten Größe zu erzeugen. | +| *Kann ich das Bildformat ändern?* | Ja. Ersetzen Sie `BarCodeImageFormat.Png` durch `Jpeg`, `Bmp` oder `Gif`, um Ihren Workflow zu unterstützen. | +| *Was passiert, wenn der Text länger ist als das Symbol aufnehmen kann?* | Der Generator wirft eine `ArgumentException`. Kürzen Sie den Text oder erhöhen Sie `Columns`/`Rows`, um mehr Kapazität zu erhalten. | +| *Gibt es eine Möglichkeit, DPI oder Bildauflösung festzulegen?* | Verwenden Sie `generator.Parameters.ImageResolution`, um die gewünschte DPI vor dem Speichern anzugeben. Dies **customizes barcode size** weiter für hochauflösenden Druck. | +| *Unterstützt die Bibliothek andere DataBar‑Varianten?* | Ja. Ersetzen Sie `EncodeTypes.DatabarExpandedStacked` durch `DatabarExpanded`, `DatabarLimited` usw., während Sie die gleiche Parameterstruktur beibehalten. | + +## Tipps für zuverlässige Barcode-Generierung + +* **Pro‑Tipp:** Überprüfen Sie das erzeugte Bild immer mit einem Scanner oder einer mobilen App, bevor Sie es in die Produktion übernehmen. +* **Achten Sie auf:** Null‑ oder leere Ausgabeverzeichnisse – `Save` wirft eine Ausnahme, wenn der Pfad nicht existiert. Erstellen Sie den Ordner bei Bedarf programmgesteuert. +* **Leistungshinweis:** Das Wiederverwenden einer einzelnen `BarcodeGenerator`‑Instanz und das bloße Ändern von `Rows` oder `Columns` kann den Overhead der Objekterstellung reduzieren, wenn Sie viele Barcodes in einer Schleife erzeugen. + +## Fazit + +Sie wissen jetzt, wie Sie einen **c# barcode generator** einsetzen, um **databar barcode**‑Bilder zu **create**, **customize barcode size** und **configure databar parameters** wie Zeilen und Spalten zu konfigurieren. Durch das Anpassen dieser Einstellungen können Sie Barcodes in jede Layout‑Anforderung einpassen und gleichzeitig die Scan‑Zuverlässigkeit wahren. + +Als Nächstes können Sie verwandte Themen erkunden, etwa **how to generate barcode**‑PDFs, das Einbetten von Barcodes in Berichte oder das Umschalten auf andere Symbologien (QR, Code‑128 usw.). Experimentieren Sie mit verschiedenen `Rows`, `Columns` und Bildauflösungen, um die optimale Konfiguration für Ihren Anwendungsfall zu finden. + +--- + + +## 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, zusätzliche API‑Funktionen zu meistern und alternative Implementierungsansätze in Ihren eigenen Projekten zu erkunden. + +- [Wie man die Barcode‑Höhe für eindimensionale Databar mit Aspose.BarCode für .NET generiert und anpasst](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Eindimensionale Databar‑2D‑Barcodes mit Aspose.BarCode .NET API generieren](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Aspose.BarCode Databar‑Barcode mit .NET API erzeugen – Zeilen‑ & Spalten‑Konfiguration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/german/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..098df14af --- /dev/null +++ b/barcode/german/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,221 @@ +--- +category: general +date: 2026-08-19 +description: Erfahren Sie, wie Sie in C# eine Barcode‑PNG‑Datei erzeugen und deren + Höhe anpassen können, einschließlich einer Anleitung zum einfachen Erstellen von + Barcode‑Bildern und Ändern der Barcode‑Höhe. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: de +lastmod: 2026-08-19 +og_description: Erstellen Sie eine Barcode‑PNG‑Datei in C# und lernen Sie, wie Sie + Barcode‑Bilder erzeugen, die Barcode‑Höhe anpassen und die Barcode‑Höhe für optimale + Scans ändern. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Erstelle eine Barcode‑PNG‑Datei in C# – Schritt‑für‑Schritt‑Anleitung +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Wie man eine Barcode‑PNG‑Datei mit einstellbarer Höhe in C# erstellt +url: /de/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Wie man eine Barcode‑PNG‑Datei mit einstellbarer Höhe in C# erstellt + +Wenn Sie eine **Barcode‑PNG‑Datei** in C# erstellen müssen, zeigt Ihnen diese Anleitung genau, wie es geht. Sie sehen ein vollständiges, ausführbares Beispiel, das **wie man Barcode‑Bilder generiert** und **wie man die Barcode‑Höhe** für verschiedene Anwendungsfälle anpasst. + +Das Erzeugen einer Barcode‑PNG‑Datei ist eine gängige Anforderung für Inventursysteme, Point‑of‑Sale‑Terminals und jede Anwendung, die maschinenlesbare Daten drucken oder anzeigen muss. Am Ende dieses Tutorials können Sie die Barcode‑Höhe ändern, mehrere PNG‑Dateien speichern und die Auswirkung der Höhe auf die Scan‑Zuverlässigkeit verstehen. + +## Voraussetzungen + +Bevor Sie beginnen, stellen Sie sicher, dass Sie Folgendes haben: + +* .NET 6.0 SDK oder neuer installiert +* Visual Studio 2022 (oder jede IDE, die .NET unterstützt) +* Das **Aspose.BarCode for .NET** NuGet‑Paket (der Code‑Beispiel verwendet diese Bibliothek) + +Sie können das Paket über die Befehlszeile hinzufügen: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro Tipp:** Die kostenlose Evaluierungsversion von Aspose.BarCode funktioniert für Entwicklung und Tests. Für die Produktion benötigen Sie einen lizenzierten Schlüssel. + +## Barcode‑Bibliothek installieren + +Der erste Schritt besteht darin, die Bibliothek in Ihrem Projekt zu referenzieren. Fügen Sie die folgenden `using`‑Direktiven am Anfang Ihrer C#‑Datei hinzu: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Diese Namespaces geben Ihnen Zugriff auf `BarcodeGenerator`, `EncodeTypes` und `BarCodeImageFormat`. + +## Die Barcode‑PNG‑Datei erstellen + +Jetzt erstellen wir eine `BarcodeGenerator`‑Instanz, die eine **Barcode‑PNG‑Datei** ausgibt. Das Beispiel verwendet die Databar OmniDirectional‑Symbologie, Sie können jedoch `EncodeTypes.DatabarOmniDirectional` durch jeden unterstützten Typ ersetzen. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Der String `"(01)12345678901231"` folgt dem GS1‑Application‑Identifier‑Format für eine 14‑stellige GTIN. Passen Sie die Daten an Ihre eigenen Produktkennzeichnungen an. + +## X‑Dimension festlegen (optional) + +Die X‑Dimension definiert die Breite eines einzelnen Barcode‑Moduls. Ein pixelbasierter Wert gibt Ihnen präzise Kontrolle über die Bildgröße. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Ein Wert von `2` Pixel funktioniert gut für die meisten Bildschirme. Erhöhen Sie ihn, wenn Sie einen größeren Barcode für den Druck benötigen. + +## Barcode‑Höhe anpassen und die Barcode‑PNG‑Datei speichern + +Die Eigenschaft **BarHeight** steuert die vertikale Größe der Balken. Durch Ändern dieses Wertes können Sie die **Barcode‑Höhe** anpassen, ohne die codierten Daten zu beeinflussen. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Die Datei `DatabarBarHeight30Pixels.png` ist nun eine **Barcode‑PNG‑Datei**, die 30 Pixel hoch ist. + +Um die **Barcode‑Höhe** zu ändern und ein zweites Bild zu erstellen, weisen Sie einfach einen neuen Wert zu und rufen `Save` erneut auf: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Sie haben jetzt zwei PNG‑Dateien – eine mit 30 px und eine mit 60 px – die zeigen, wie man die **Barcode‑Höhe** on‑the‑fly anpasst. + +### Warum die Balkenhöhe wichtig ist + +* **Lesbarkeit:** Scanner erwarten eine Mindesthöhe für zuverlässige Erkennung. Ein zu kurzer Barcode kann übersehen werden, besonders bei Kameras mit niedriger Auflösung. +* **Ästhetik:** Die Anpassung der Barcode‑Höhe an umliegende Designelemente sorgt für ein saubereres UI. +* **Druckbeschränkungen:** Einige Etikettendrucker haben feste Höhen‑Slots; das Anpassen der Barcode‑Höhe stellt sicher, dass er passt. + +**Best Practice:** Halten Sie die Höhe ein Vielfaches der X‑Dimension (z. B. 30 px bei einer X‑Dimension von 2 px), um das Seitenverhältnis zu bewahren und Verzerrungen zu vermeiden. + +## Komplettes Beispiel + +Unten finden Sie das vollständige, eigenständige Programm, das Sie in eine Konsolenanwendung einfügen und sofort ausführen können. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Erwartete Ausgabe** + +Beim Ausführen des Programms werden zwei Dateien im Arbeitsverzeichnis der ausführbaren Datei erstellt: + +* `DatabarBarHeight30Pixels.png` – eine 30 Pixel‑hohe Barcode‑PNG‑Datei +* `DatabarBarHeight60Pixels.png` – eine 60 Pixel‑hohe Barcode‑PNG‑Datei + +Öffnen Sie eine der PNG‑Dateien mit einem beliebigen Bildbetrachter; Sie sehen einen klaren Databar OmniDirectional‑Barcode, bereit zum Scannen. + +## Randfälle und Fehlersuche + +| Situation | Was zu prüfen ist | Empfohlene Lösung | +|-----------|-------------------|-------------------| +| Barcode erscheint unscharf | X‑Dimension zu niedrig für die gewählte Höhe | Erhöhen Sie `XDimension.Pixels` (z. B. von 2 auf 3) | +| Scanner schlägt bei niedriger Barcode‑Höhe fehl | Höhe liegt unter dem Minimum des Scanners | Setzen Sie `BarHeight.Pixels` auf mindestens 30 px (oder gemäß Scanner‑Spezifikationen) | +| PNG‑Datei ist leer oder beschädigt | Ausgabepfad ungültig oder Schreibrechte fehlen | Verwenden Sie einen absoluten Pfad oder stellen Sie sicher, dass die Anwendung Schreibzugriff hat | +| Andere Symbologie benötigt | Aktuelles `EncodeTypes` ist nicht geeignet | Ersetzen Sie `EncodeTypes.DatabarOmniDirectional` durch einen anderen Enum‑Wert (z. B. `EncodeTypes.Code128`) | + +## Häufig gestellte Fragen + +**F: Kann ich andere Bildformate (JPEG, BMP) erzeugen?** +A: Ja. Ersetzen Sie `BarCodeImageFormat.Png` durch `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` usw. + +**F: Wie binde ich das PNG in eine Webseite ein?** +A: Stellen Sie das erzeugte PNG über einen HTTP‑Endpunkt bereit oder konvertieren Sie es in einen Base64‑String und setzen Sie ihn in das `src`‑Attribut eines ``‑Tags. + +**F: Gibt es eine Möglichkeit, die Hintergrundfarbe zu setzen?** +A: Verwenden Sie `generator.Parameters.Image.BackgroundColor = Color.White;` (oder jede `System.Drawing.Color`). + +## Fazit + +Sie wissen jetzt, wie man **eine Barcode‑PNG‑Datei** in C# generiert und die **Barcode‑Höhe** präzise **anpasst**, um Scan‑ oder Design‑Anforderungen zu erfüllen. Durch Ändern der Eigenschaft `BarHeight.Pixels` können Sie die **Barcode‑Höhe** on‑the‑fly ändern und mehrere PNG‑Assets aus einer einzigen Codebasis erzeugen. + +Als Nächstes können Sie weitere Anpassungsoptionen erkunden, etwa Vordergrundfarbe, Ränder und das Hinzufügen von menschenlesbarem Text. Experimentieren Sie auch mit verschiedenen Symbologien (`EncodeTypes.Code128`, `EncodeTypes.QR`), um das Spektrum der codierbaren Daten zu erweitern. + +Viel Spaß beim Coden und möge Ihr Barcode beim ersten Versuch immer scannen! + +## 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 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 Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/german/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..0ddee3c62 --- /dev/null +++ b/barcode/german/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,158 @@ +--- +category: general +date: 2026-08-19 +description: Erstellen Sie Databar‑PNG‑Dateien in C# mit Aspose.BarCode. Erfahren + Sie, wie Sie Databar‑Bilder generieren, Databar‑Parameter konfigurieren und die + PNG‑Ausgabe speichern. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: de +lastmod: 2026-08-19 +og_description: Erstellen Sie Databar‑PNG-Dateien in C# mit Aspose.BarCode. Dieses + Tutorial führt Sie Schritt für Schritt durch die Generierung von Databar‑Bildern, + die Konfiguration von Databar‑Parametern wie X‑Dimension und Seitenverhältnis und + das Speichern von hochwertigen PNG‑Dateien für den Druck oder die Web‑Nutzung. +og_image_alt: create databar PNG example +og_title: Erstellen von Databar‑PNG‑Bildern in C# – Schritt‑für‑Schritt‑Anleitung +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Wie man Databar‑PNG‑Bilder mit C# und Aspose.BarCode erstellt +url: /de/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Wie man Databar‑PNG‑Bilder mit C# und Aspose.BarCode erstellt + +Wenn Sie **Databar PNG**‑Dateien in einer .NET‑Anwendung erstellen müssen, zeigt Ihnen dieses Handbuch genau, wie es geht. Sie sehen ein vollständiges, ausführbares Beispiel, das gestapelte omnidirektionale DataBar‑Codes erzeugt, wichtige Parameter konfiguriert und zwei PNG‑Dateien mit unterschiedlichen Seitenverhältnissen speichert. + +Das Erzeugen eines DataBar‑Bildes besteht nicht nur darin, eine einzelne Methode aufzurufen. Sie müssen außerdem **Databar‑Parameter** wie die X‑Dimension (Modulbreite) und das Seitenverhältnis konfigurieren, um Druck‑ oder Scan‑Spezifikationen zu erfüllen. Am Ende dieses Tutorials verstehen Sie **wie man Databar**‑Grafiken erzeugt, die in realen Szenarien zuverlässig funktionieren. + +## Voraussetzungen + +- .NET 6.0 oder höher (der Code funktioniert auch mit .NET Framework 4.7+) +- Visual Studio 2022 oder jede C#‑kompatible IDE +- Eine gültige Lizenz für **Aspose.BarCode for .NET** (die kostenlose Evaluation funktioniert zum Testen) +- Grundlegende Kenntnisse der C#‑Syntax + +> **Pro‑Tipp:** Wenn Sie noch keine Lizenz haben, können Sie über das Aspose‑Portal einen temporären Evaluierungsschlüssel anfordern. Die API funktioniert identisch; nur das Wasserzeichen ändert sich. + +## Schritt 1: Das Aspose.BarCode‑NuGet‑Paket installieren + +Öffnen Sie Ihr Projekt in Visual Studio, klicken Sie mit der rechten Maustaste auf die Lösung und wählen Sie **Manage NuGet Packages**. Suchen Sie nach `Aspose.BarCode` und installieren Sie die neueste stabile Version. + +```bash +dotnet add package Aspose.BarCode +``` + +Dieser Befehl fügt Ihrem Projekt die `Aspose.BarCode`‑Assembly hinzu und macht die Klasse `BarcodeGenerator` verfügbar. + +## Schritt 2: Den Barcode‑Generator für einen gestapelten omnidirektionalen DataBar initialisieren + +Der Konstruktor von `BarcodeGenerator` erhält zwei Argumente: den Barcode‑Typ und den Rohdaten‑String. Für einen gestapelten omnidirektionalen DataBar verwenden Sie `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Warum das wichtig ist:** Die Konstante `EncodeTypes.DatabarStackedOmniDirectional` weist die Bibliothek an, einen Barcode zu erzeugen, der aus jeder Orientierung gelesen werden kann – ideal für Regaletiketten im Einzelhandel. + +## Schritt 3: Die X‑Dimension (Modulbreite) in Pixeln konfigurieren + +Die X‑Dimension steuert die Größe des kleinsten Balkenelements. Die Angabe in Pixeln gibt Ihnen präzise Kontrolle über die endgültige Bildgröße. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Ein Wert von **2 Pixel** ist für die meisten Etikettendrucker ein guter Kompromiss zwischen Lesbarkeit und Kompaktheit. Passen Sie diesen Wert an, wenn Sie größere oder kleinere Module benötigen. + +## Schritt 4: Das erste Seitenverhältnis festlegen und das PNG speichern + +Das Seitenverhältnis beeinflusst die Höhe des gestapelten DataBar. Ein Seitenverhältnis von **15** erzeugt einen relativ kurzen Barcode, während **30** ihn höher macht. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Die Methode `Save` schreibt den erzeugten Barcode in eine PNG‑Datei. PNG ist verlustfrei und bewahrt die scharfen Kanten, die für Barcode‑Scanner erforderlich sind. + +## Schritt 5: Das Seitenverhältnis ändern und ein zweites PNG speichern + +Sie können dieselbe `BarcodeGenerator`‑Instanz wiederverwenden, um Varianten zu erzeugen, indem Sie einfach das Seitenverhältnis ändern. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Jetzt haben Sie zwei PNG‑Dateien – `DatabarAspectRatio15.png` und `DatabarAspectRatio30.png` – jeweils mit unterschiedlicher visueller Dichte. + +## Schritt 6: Die Ausgabe überprüfen + +Öffnen Sie die erzeugten PNG‑Dateien in einem beliebigen Bildbetrachter. Sie sollten einen sauberen, hochkontrastierten DataBar‑Barcode sehen. Das Scannen der Bilder mit einer Smartphone‑Barcode‑App bestätigt, dass beide Seitenverhältnisse den ursprünglichen GTIN‑Wert `12345678901231` korrekt dekodieren. + +![Databar PNG Beispiel erstellen](databar_example.png) + +*Das obige Bild zeigt die beiden PNG‑Dateien nebeneinander. Das linke Bild verwendet das Seitenverhältnis 15, das rechte das Seitenverhältnis 30.* + +## Häufige Varianten und Randfälle + +| Szenario | Was zu ändern ist | Grund | +|----------|-------------------|-------| +| **Andere Daten** | Ersetzen Sie den String `(01)12345678901231` durch einen beliebigen gültigen GS1‑Anwendungsidentifikator und Daten | Ermöglicht das Codieren von Produkt‑IDs, Seriennummern usw. | +| **Höhere Auflösung** | Erhöhen Sie `XDimension.Pixels` auf 3 oder 4 | Notwendig, wenn der Barcode in großen Größen gedruckt oder aus größerer Entfernung gescannt wird. | +| **Andere DataBar‑Typen** | Verwenden Sie `EncodeTypes.DatabarStacked` oder `EncodeTypes.DatabarExpanded` | Wählen Sie den Typ, der am besten zu Ihrem Etikettenlayout passt. | +| **Transparenter Hintergrund** | Übergeben Sie `BarCodeImageFormat.Png` mit `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Praktisch, um den Barcode auf farbigen Etiketten zu überlagern. | + +> **Achten Sie darauf:** Eine zu kleine X‑Dimension (< 1 Pixel) kann zu einem unscharfen Barcode führen, der nach dem + +## Was sollten Sie als Nächstes lernen? + +Die folgenden Tutorials behandeln eng verwandte Themen, die auf den in diesem Handbuch 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 Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/german/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..9cc2293e8 --- /dev/null +++ b/barcode/german/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,214 @@ +--- +category: general +date: 2026-08-19 +description: Erfahren Sie, wie Sie Post‑Barcode in C# mit Aspere.BarCode erzeugen. + Diese Schritt‑für‑Schritt‑Anleitung zeigt, wie man Barcodes für die Formate Planet + und RM4SCC generiert. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: de +lastmod: 2026-08-19 +og_description: Erzeugen Sie Post-Barcode in C# mit Aspose.BarCode. Folgen Sie dieser + Anleitung, um zu lernen, wie man Barcodes für Planet und RM4SCC mit benutzerdefinierten + Abmessungen erzeugt. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Post‑Barcode in C# generieren – vollständiger Aspose.BarCode‑Leitfaden +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Wie man einen Post‑Barcode in C# mit Aspose.BarCode generiert +url: /de/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# So generieren Sie Post‑Barcode in C# mit Aspose.BarCode + +Wenn Sie **Post‑Barcode** für Versand‑Anwendungen erzeugen müssen, zeigt Ihnen diese Anleitung genau, wie Sie Barcodes mit der Aspose.BarCode‑Bibliothek generieren. Sie sehen ein komplettes, ausführbares Beispiel, das sowohl einen Planet‑Barcode (Höhe automatisch berechnet) als auch einen RM4SCC‑Barcode mit expliziter Balkenhöhe erstellt. + +Die Erzeugung von Post‑Barcodes ist ein gängiges Bedürfnis für Logistik‑Software, automatisierte Etikettendrucker und Massensendungs‑Systeme. Am Ende dieses Tutorials können Sie die Barcode‑Erzeugung in jedes .NET‑Projekt integrieren, die X‑Dimension anpassen und die Balkenhöhe steuern, sofern das Standardformat dies zulässt. + +**Was Sie lernen werden** + +* Wie Sie Aspose.BarCode in einem C#‑Projekt einrichten. +* Wie Sie Planet‑ und RM4SCC‑Post‑Barcodes erzeugen. +* Wie Sie die X‑Dimension (Modulbreite) und die Balkenhöhe anpassen. +* Wie Sie das Ergebnis als PNG‑Bild speichern. + +Es werden keine externen Dienste benötigt – alles läuft lokal, nachdem Sie das Aspose.BarCode‑NuGet‑Paket referenziert haben. + +## Voraussetzungen + +* .NET 6.0 SDK oder höher (der Code funktioniert auch mit .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code oder eine beliebige C#‑IDE Ihrer Wahl. +* Aspose.BarCode for .NET‑Paket – installieren Sie es via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Post‑Barcode mit Aspose.BarCode erzeugen + +Die folgenden Abschnitte führen Sie Schritt für Schritt durch den Prozess, von der Erstellung der Generator‑Objekte bis zum Speichern der finalen PNG‑Dateien. + +### Schritt 1: Planet‑Barcode erstellen (automatische Höhe) + +Planet ist ein Post‑Barcode, der in vielen Ländern für die Postsortierung verwendet wird. Beim Erzeugen eines Planet‑Barcodes bestimmt die Bibliothek automatisch die optimale Balkenhöhe basierend auf den codierten Daten. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Warum das funktioniert** – `EncodeTypes.Planet` weist Aspose.BarCode an, die Planet‑Symbologie zu verwenden. Die Eigenschaft `XDimension` steuert die Breite des kleinsten Balkens (des Moduls). Da Planet keine feste Balkenhöhe erfordert, berechnet die Bibliothek automatisch eine geeignete Höhe, was den Code vereinfacht. + +### Schritt 2: RM4SCC‑Barcode mit expliziter Höhe erstellen + +RM4SCC ist eine weitere Post‑Symbologie, die häufig eine bestimmte Balkenhöhe für die Scanner‑Kompatibilität verlangt. Der folgende Code zeigt, wie Sie diese Höhe manuell festlegen. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Warum Sie die Höhe setzen** – Einige Post‑Scanner erwarten eine Mindestbalkenhöhe. Durch das Setzen von `BarHeight.Pixels = 100` stellen Sie sicher, dass das erzeugte Bild diese Anforderung erfüllt. Die X‑Dimension bleibt konsistent zum Planet‑Barcode, sodass beide Bilder dieselbe visuelle Dichte besitzen. + +### Schritt 3: Ausgabe überprüfen + +Nach dem Ausführen des Programms öffnen Sie die beiden PNG‑Dateien im Verzeichnis `YOUR_DIRECTORY`. Sie sollten zwei unterschiedliche Barcodes sehen: + +* `PostalPlanetBarHeightNone.png` – ein Planet‑Barcode mit automatisch berechneter Höhe. +* `PostalRM4SCCBarHeight100Pixels.png` – ein RM4SCC‑Barcode mit einer Balkenhöhe von 100 Pixel. + +Beide Bilder können direkt an Etikettendrucker übergeben oder in einer Web‑Anwendung angezeigt werden. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Bild‑Alt‑Text:* **Generiertes Post‑Barcode**‑Bild mit Aspose.BarCode (zeigt, wie ein Post‑Barcode erzeugt wird). + +## Wie man Barcodes mit benutzerdefinierten Abmessungen erzeugt (fortgeschritten) + +Falls Sie weitere Parameter feinjustieren müssen – etwa Ränder, Textposition oder Farbe – stellt Aspose.BarCode ein umfangreiches `Parameters`‑Objekt bereit. Nachfolgend ein kurzes Beispiel, das einen weißen Hintergrund hinzufügt und den lesbaren Text deaktiviert. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Wann das sinnvoll ist** – Das Deaktivieren des lesbaren Textes ist üblich bei automatischer Sortierung, bei der nur das maschinenlesbare Muster zählt. Das Setzen einer Hintergrundfarbe sorgt dafür, dass der Barcode korrekt auf transparentem Material gedruckt wird. + +## Häufige Stolperfallen und Profi‑Tipps + +| Problem | Warum es passiert | Lösung | +|---------|-------------------|--------| +| Barcode wirkt gestreckt | X‑Dimension ist zu groß im Verhältnis zur Bildgröße | Halten Sie `XDimension.Pixels` zwischen 2 und 5 für die meisten Post‑Barcodes | +| Scanner verwirft das Bild | Balkenhöhe liegt unter dem Mindestwert des Postdienstes | Verwenden Sie `BarHeight.Pixels` ≥ 80 für RM4SCC, sofern die Spezifikation nichts anderes verlangt | +| PNG‑Dateigröße ist groß | Bildauflösung ist höher als nötig | Speichern Sie als PNG‑8 (`BarCodeImageFormat.Png8`) oder reduzieren Sie die Pixel‑Abmessungen | + +**Profi‑Tipp:** Testen Sie den erzeugten Barcode immer mit einem echten Scanner, bevor Sie ihn produktiv einsetzen. Kleine visuelle Unterschiede können die Lesbarkeit beeinträchtigen. + +## Vollständiger Quellcode + +Kopieren Sie den gesamten Block unten in eine neue Konsolenanwendung (`Program.cs`). Passen Sie die Ausgabepfade an einen Ordner an, in den Ihr Prozess schreiben darf. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Beim Ausführen des Programms wird *„Barcodes generated successfully.“* ausgegeben und die beiden PNG‑Dateien im Arbeitsverzeichnis der ausführbaren Datei erstellt. + +## Fazit + +Sie wissen jetzt, wie Sie **Post‑Barcode** in C# mit Aspose.BarCode erzeugen, sowohl für Planet‑Barcodes mit automatischer Höhe als auch für RM4SCC‑Barcodes mit fester Höhe. Die Anleitung zeigte zudem, **wie man Barcodes** mit benutzerdefinierter X‑Dimension, Balkenhöhe und visuellen Optionen erzeugt – eine solide Grundlage für jedes Versand‑Automatisierungsprojekt. + +Mögliche nächste Schritte: + +* Integrieren Sie die erzeugten PNGs in eine PDF‑Rechnung mit Aspose.PDF. +* Wechseln Sie zum Ausgabeformat SVG für skalierbare Vektorgrafiken. +* Verwenden Sie die Klasse `BarcodeReader`, um die codierten Daten programmgesteuert zu prüfen. + +Experimentieren Sie gern mit anderen Symbologien (z. B. `EncodeTypes.Postnet`) und teilen Sie Ihre Ergebnisse mit der Community. Viel Spaß beim Coden! + + +## 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. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/greek/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..fbe977197 --- /dev/null +++ b/barcode/greek/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,251 @@ +--- +category: general +date: 2026-08-19 +description: Το σεμινάριο δημιουργίας barcode με C# δείχνει πώς να δημιουργήσετε κωδικούς + DataBar Expanded Stacked, να προσαρμόσετε το μέγεθος του barcode και να ρυθμίσετε + γραμμές και στήλες. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: el +lastmod: 2026-08-19 +og_description: Το σεμινάριο δημιουργίας barcode με C# σας διδάσκει πώς να δημιουργείτε + κωδικούς DataBar, να προσαρμόζετε το μέγεθος και να ρυθμίζετε γραμμές και στήλες + για ακριβή έξοδο. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Γεννήτρια barcode C# – βήμα‑βήμα οδηγός για προσαρμοσμένα DataBar barcode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Γεννήτρια barcode C#: δημιουργία προσαρμοσμένων κωδίκων DataBar' +url: /el/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# barcode generator: δημιουργία προσαρμοσμένων DataBar barcode + +Αν χρειάζεστε μια **c# barcode generator** που μπορεί να παράγει σύμβολα DataBar Expanded Stacked, αυτός ο οδηγός σας δείχνει ακριβώς πώς να δημιουργήσετε εικόνες barcode με προσαρμοσμένες γραμμές και στήλες. Θα μάθετε να διαμορφώνετε τις παραμέτρους databar, να προσαρμόζετε το μέγεθος του barcode και να αποθηκεύετε το αποτέλεσμα ως αρχεία PNG. + +Η προγραμματιστική δημιουργία barcode αφαιρεί τα χειροκίνητα βήματα σχεδίασης και εγγυάται συνεπή έξοδο σε όλες τις πλατφόρμες. Σε αυτό το tutorial θα: + +* Εγκαταστήστε και αναφέρετε τη βιβλιοθήκη Aspose.BarCode for .NET (ή οποιοδήποτε συμβατό πακέτο). +* Δημιουργήστε μια barcode generator για τη συμβολική DataBar Expanded Stacked. +* **Πώς να δημιουργήσετε barcode** εικόνες με συγκεκριμένες ρυθμίσεις στήλης και γραμμής. +* **Προσαρμόστε το μέγεθος του barcode** ελέγχοντας τις γραμμές και στήλες του DataBar. +* **Διαμορφώστε τις παραμέτρους databar** όπως κείμενο, μορφή και ποιότητα εικόνας. + +## Προαπαιτούμενα + +* .NET 6.0 SDK ή νεότερη έκδοση εγκατεστημένη. +* Ένα περιβάλλον ανάπτυξης C# (Visual Studio, VS Code, Rider κ.λπ.). +* Πακέτο NuGet `Aspose.BarCode` (ή μια ισοδύναμη βιβλιοθήκη που παρέχει `BarcodeGenerator`, `EncodeTypes` και `BarCodeImageFormat`). + +Προσθέστε το πακέτο με το .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Χρήση της C# barcode generator για δημιουργία DataBar barcode + +Οι παρακάτω ενότητες σας καθοδηγούν βήμα-βήμα. Η κύρια εστίαση είναι στο API της **c# barcode generator**, αλλά το ίδιο μοτίβο ισχύει για άλλες βιβλιοθήκες barcode που εκθέτουν παρόμοιες ιδιότητες. + +### Βήμα 1: Αρχικοποίηση της barcode generator με δείγμα κειμένου + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Γιατί αυτό το βήμα;* +`BarcodeGenerator` είναι το σημείο εισόδου για όλες τις εργασίες δημιουργίας barcode. Η παροχή του enum `EncodeTypes.DatabarExpandedStacked` λέει στη βιβλιοθήκη ποια συμβολική να χρησιμοποιήσει, ενώ το όρισμα κειμένου γίνεται η αναγνώσιμη τιμή που κωδικοποιείται στο σύμβολο. + +### Βήμα 2: Ορισμός του αριθμού των στηλών (χρησιμοποιούνται οι προεπιλεγμένες γραμμές) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Γιατί αυτό το βήμα;* +Τα σύμβολα DataBar Expanded Stacked αποτελούνται από στοιβαγμένα γραμμικά στοιχεία. Η ρύθμιση της ιδιότητας `Columns` αλλάζει την οριζόντια πυκνότητα, επιτρέποντάς σας να χωρέσετε μεγαλύτερες αλφαριθμητικές ακολουθίες χωρίς να αυξήσετε το συνολικό ύψος. Αυτό προσαρμόζει άμεσα **το μέγεθος του barcode**. + +### Βήμα 3: Αποθήκευση της εικόνας barcode που χρησιμοποιεί τέσσερις στήλες + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Τι βλέπετε:* +Η αποθηκευμένη εικόνα `DatabarCols4.png` εμφανίζει ένα DataBar barcode που είναι πιο πλατύ από το προεπιλεγμένο επειδή περιέχει τέσσερις στήλες. Μπορείτε να ανοίξετε το αρχείο σε οποιονδήποτε προβολέα εικόνων για να επαληθεύσετε το αποτέλεσμα. + +### Βήμα 4: Επανα-αρχικοποίηση του generator για νέα διαμόρφωση + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Γιατί επανα-αρχικοποίηση;* +Η αλλαγή της ιδιότητας `Rows` ενώ διατηρείται η προηγούμενη ρύθμιση στήλης μπορεί να δημιουργήσει έναν απρόσμενο συνδυασμό. Ξεκινώντας με μια νέα παρουσία εξασφαλίζει ότι μόνο η επιθυμητή παράμετρος (`Rows`) επηρεάζει την επόμενη εικόνα. + +### Βήμα 5: Ορισμός του αριθμού των γραμμών (χρησιμοποιούνται οι προεπιλεγμένες στήλες) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Γιατί αυτό το βήμα;* +Η ιδιότητα `Rows` ελέγχει την κάθετη στοιβάξη. Η αύξηση των γραμμών κάνει το barcode πιο ψηλό, κάτι που μπορεί να είναι χρήσιμο όταν ο οριζόντιος χώρος είναι περιορισμένος αλλά ο κάθετος άφθονος. Αυτός είναι ένας άλλος τρόπος για **προσαρμογή του μεγέθους του barcode**. + +### Βήμα 6: Αποθήκευση της εικόνας barcode που χρησιμοποιεί τρεις γραμμές + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Αποτέλεσμα:* +Το `DatabarRows3.png` εμφανίζει ένα πιο ψηλό barcode με τρεις στοιβαγμένες γραμμές, δείχνοντας πώς η **διαμόρφωση των παραμέτρων databar** επηρεάζει την οπτική εμφάνιση. + +## Πλήρες εκτελέσιμο παράδειγμα + +Παρακάτω υπάρχει ένα πλήρες πρόγραμμα που μπορείτε να αντιγράψετε, επικολλήσετε και εκτελέσετε. Περιλαμβάνει όλες τις εισαγωγές, τη διαχείριση σφαλμάτων και σχόλια για σαφήνεια. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Αναμενόμενο αποτέλεσμα** + +Η εκτέλεση του προγράμματος παράγει δύο αρχεία PNG: + +* `DatabarCols4.png` – ένα πλατύ DataBar barcode με τέσσερις στήλες. +* `DatabarRows3.png` – ένα ψηλό DataBar barcode με τρεις γραμμές. + +Ανοίξτε τις εικόνες για να επιβεβαιώσετε ότι οι διαστάσεις του barcode ταιριάζουν με τις ρυθμισμένες παραμέτρους. + +## Συχνές ερωτήσεις και διαχείριση ειδικών περιπτώσεων + +| Question | Answer | +|----------|--------| +| *Τι γίνεται αν χρειάζομαι και προσαρμοσμένες γραμμές **και** στήλες;* | Ορίστε `Rows` **και** `Columns` στην ίδια παρουσία `BarcodeGenerator` πριν καλέσετε `Save`. Η βιβλιοθήκη συνδυάζει και τις δύο τιμές για να δημιουργήσει ένα πλέγμα του ζητούμενου μεγέθους. | +| *Μπορώ να αλλάξω τη μορφή της εικόνας;* | Ναι. Αντικαταστήστε το `BarCodeImageFormat.Png` με `Jpeg`, `Bmp` ή `Gif` ώστε να ταιριάζει στη ροή εργασίας σας. | +| *Τι συμβαίνει όταν το κείμενο είναι μεγαλύτερο από ό,τι μπορεί να χωρέσει το σύμβολο;* | Ο generator ρίχνει ένα `ArgumentException`. Συντομεύστε το κείμενο ή αυξήστε τις `Columns`/`Rows` για να παρέχετε περισσότερη χωρητικότητα. | +| *Υπάρχει τρόπος να ορίσω DPI ή ανάλυση εικόνας;* | Χρησιμοποιήστε το `generator.Parameters.ImageResolution` για να ορίσετε το επιθυμητό DPI πριν την αποθήκευση. Αυτό προσαρμόζει περαιτέρω **το μέγεθος του barcode** για εκτύπωση υψηλής ανάλυσης. | +| *Η βιβλιοθήκη υποστηρίζει άλλες παραλλαγές DataBar;* | Ναι. Αντικαταστήστε το `EncodeTypes.DatabarExpandedStacked` με `DatabarExpanded`, `DatabarLimited` κ.λπ., διατηρώντας την ίδια δομή παραμέτρων. | + +## Συμβουλές για αξιόπιστη δημιουργία barcode + +* **Pro tip:** Πάντα επαληθεύετε την παραγόμενη εικόνα με έναν σαρωτή ή μια εφαρμογή κινητού πριν την αναπτύξετε στην παραγωγή. +* **Watch out for:** Null ή κενά καταλόγους εξόδου—`Save` θα ρίξει εξαίρεση αν η διαδρομή δεν υπάρχει. Δημιουργήστε το φάκελο προγραμματιστικά αν χρειάζεται. +* **Performance note:** Η επαναχρησιμοποίηση μιας μόνο παρουσίασης `BarcodeGenerator` και η αλλαγή μόνο των `Rows` ή `Columns` μπορεί να μειώσει το κόστος δημιουργίας αντικειμένων όταν δημιουργείτε πολλά barcode σε βρόχο. + +## Συμπέρασμα + +Τώρα ξέρετε πώς να χρησιμοποιήσετε μια **c# barcode generator** για **δημιουργία εικόνων databar barcode**, **προσαρμογή του μεγέθους του barcode**, και **διαμόρφωση των παραμέτρων databar** όπως γραμμές και στήλες. Με την προσαρμογή αυτών των ρυθμίσεων μπορείτε να ενσωματώσετε barcode σε οποιαδήποτε απαίτηση διάταξης διατηρώντας την αξιοπιστία σάρωσης. + +Στη συνέχεια, εξερευνήστε σχετικές θεματικές όπως **πώς να δημιουργήσετε barcode** PDF, ενσωμάτωση barcode σε αναφορές, ή μετάβαση σε άλλες συμβολικές (QR, Code‑128 κ.λπ.). Πειραματιστείτε με διαφορετικές `Rows`, `Columns` και αναλύσεις εικόνας για να βρείτε τη βέλτιστη διαμόρφωση για τη συγκεκριμένη σας περίπτωση χρήσης. + +--- + +## Τι πρέπει να μάθετε στη συνέχεια; + +Τα παρακάτω tutorials καλύπτουν στενά σχετικές θεματικές που βασίζονται στις τεχνικές που παρουσιάζονται σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη παραδείγματα κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσουν να κατακτήσετε πρόσθετα χαρακτηριστικά του API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε και να προσαρμόσετε το ύψος του Barcode για One-Dimensional Databar χρησιμοποιώντας Aspose.BarCode για .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Δημιουργία One-Dimensional Databar 2D Barcode χρησιμοποιώντας Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Δημιουργία Aspose.BarCode Databar barcode χρησιμοποιώντας .NET API – Διαμόρφωση Γραμμής & Στήλης](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/greek/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..9abc623ee --- /dev/null +++ b/barcode/greek/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,221 @@ +--- +category: general +date: 2026-08-19 +description: Μάθετε πώς να δημιουργήσετε ένα αρχείο PNG barcode σε C# και να προσαρμόσετε + το ύψος του, καλύπτοντας πώς να δημιουργείτε εικόνες barcode και να αλλάζετε εύκολα + το ύψος του barcode. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: el +lastmod: 2026-08-19 +og_description: Δημιουργήστε ένα αρχείο PNG barcode σε C# και μάθετε πώς να δημιουργείτε + εικόνες barcode, να ρυθμίζετε το ύψος του barcode και να αλλάζετε το ύψος του barcode + για βέλτιστη σάρωση. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Δημιουργήστε ένα αρχείο PNG barcode σε C# – οδηγός βήμα‑βήμα +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Πώς να δημιουργήσετε ένα αρχείο PNG barcode με ρυθμιζόμενο ύψος σε C# +url: /el/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Πώς να δημιουργήσετε ένα αρχείο PNG barcode με ρυθμιζόμενο ύψος σε C# + +Αν χρειάζεται να δημιουργήσετε ένα **αρχείο PNG barcode** σε C#, αυτός ο οδηγός σας δείχνει ακριβώς πώς. Θα δείτε ένα πλήρες, εκτελέσιμο παράδειγμα που επιδεικνύει **πώς να δημιουργήσετε εικόνες barcode** και πώς να **ρυθμίσετε το ύψος του barcode** για διαφορετικές περιπτώσεις χρήσης. + +Η δημιουργία ενός αρχείου PNG barcode είναι συχνή απαίτηση για συστήματα αποθεμάτων, τερματικά σημείου πώλησης και οποιαδήποτε εφαρμογή που πρέπει να εκτυπώνει ή να εμφανίζει μηχανικά αναγνώσιμα δεδομένα. Στο τέλος αυτού του σεμιναρίου θα μπορείτε να αλλάζετε το ύψος του barcode, να αποθηκεύετε πολλαπλά αρχεία PNG και να κατανοείτε την επίδραση του ύψους στην αξιοπιστία σάρωσης. + +## Προαπαιτούμενα + +Πριν ξεκινήσετε, βεβαιωθείτε ότι έχετε: + +* .NET 6.0 SDK ή νεότερη έκδοση εγκατεστημένη +* Visual Studio 2022 (ή οποιοδήποτε IDE που υποστηρίζει .NET) +* Το **Aspose.BarCode for .NET** πακέτο NuGet (το δείγμα κώδικα χρησιμοποιεί αυτή τη βιβλιοθήκη) + +Μπορείτε να προσθέσετε το πακέτο από τη γραμμή εντολών: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Η δωρεάν έκδοση αξιολόγησης του Aspose.BarCode λειτουργεί για ανάπτυξη και δοκιμές. Για παραγωγική χρήση, αποκτήστε κλειδί άδειας. + +## Εγκατάσταση της βιβλιοθήκης barcode + +Το πρώτο βήμα είναι να αναφέρετε τη βιβλιοθήκη στο έργο σας. Προσθέστε τις ακόλουθες οδηγίες `using` στην κορυφή του αρχείου C#: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Αυτοί οι χώροι ονομάτων σας δίνουν πρόσβαση στα `BarcodeGenerator`, `EncodeTypes` και `BarCodeImageFormat`. + +## Δημιουργία του αρχείου PNG barcode + +Τώρα δημιουργούμε ένα αντικείμενο `BarcodeGenerator` που θα παράγει ένα **αρχείο PNG barcode**. Το παράδειγμα χρησιμοποιεί τη συμβολική μορφή Databar OmniDirectional, αλλά μπορείτε να αντικαταστήσετε το `EncodeTypes.DatabarOmniDirectional` με οποιονδήποτε υποστηριζόμενο τύπο. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Η συμβολοσειρά `"(01)12345678901231"` ακολουθεί τη μορφή GS1 Application Identifier για ένα 14‑ψήφιο GTIN. Προσαρμόστε τα δεδομένα ώστε να ταιριάζουν με τους δικούς σας αναγνωριστικούς κωδικούς προϊόντων. + +## Ορισμός της διάστασης X (προαιρετικό) + +Η διάσταση X ορίζει το πλάτος ενός μονής μονάδας του barcode. Μια τιμή βασισμένη σε pixel σας δίνει ακριβή έλεγχο του μεγέθους της εικόνας. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Μια τιμή `2` pixel λειτουργεί καλά για τις περισσότερες οθόνες. Αυξήστε την εάν χρειάζεστε μεγαλύτερο barcode κατά την εκτύπωση. + +## Ρύθμιση του ύψους του barcode και αποθήκευση του αρχείου PNG barcode + +Η ιδιότητα **BarHeight** ελέγχει το κάθετο μέγεθος των γραμμών. Η αλλαγή αυτής της τιμής σας επιτρέπει να **ρυθμίσετε το ύψος του barcode** χωρίς να επηρεάσετε τα κωδικοποιημένα δεδομένα. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Το αρχείο `DatabarBarHeight30Pixels.png` είναι πλέον ένα **αρχείο PNG barcode** με ύψος 30 pixel. + +Για να **αλλάξετε το ύψος του barcode** και να δημιουργήσετε μια δεύτερη εικόνα, απλώς ορίστε μια νέα τιμή και καλέστε ξανά το `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Τώρα έχετε δύο αρχεία PNG — ένα στα 30 px και ένα στα 60 px — που δείχνουν πώς να **ρυθμίσετε το ύψος του barcode** εν κινήσει. + +### Γιατί το ύψος των γραμμών είναι σημαντικό + +* **Αναγνωσιμότητα:** Οι σαρωτές απαιτούν ελάχιστο ύψος για αξιόπιστη ανίχνευση. Ένα πολύ κοντό barcode μπορεί να παραβλεφθεί, ειδικά σε κάμερες χαμηλής ανάλυσης. +* **Αισθητική:** Η αντιστοίχηση του ύψους του barcode με τα γύρω στοιχεία σχεδίασης δημιουργεί πιο καθαρό UI. +* **Περιορισμοί εκτύπωσης:** Ορισμένοι εκτυπωτές ετικετών έχουν σταθερά υποδοχέα ύψους· η ρύθμιση του ύψους του barcode εξασφαλίζει ότι ταιριάζει. + +**Best practice:** Κρατήστε το ύψος πολλαπλάσιο της διάστασης X (π.χ., 30 px όταν η διάσταση X είναι 2 px) για να διατηρείται η αναλογία και να αποφεύγεται παραμόρφωση. + +## Πλήρες παράδειγμα + +Παρακάτω βρίσκεται το πλήρες, αυτόνομο πρόγραμμα που μπορείτε να επικολλήσετε σε μια εφαρμογή κονσόλας και να τρέξετε αμέσως. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Αναμενόμενο αποτέλεσμα** + +Η εκτέλεση του προγράμματος δημιουργεί δύο αρχεία στον φάκελο εργασίας του εκτελέσιμου: + +* `DatabarBarHeight30Pixels.png` – αρχείο PNG barcode ύψους 30 pixel +* `DatabarBarHeight60Pixels.png` – αρχείο PNG barcode ύψους 60 pixel + +Ανοίξτε οποιοδήποτε από τα PNG με οποιονδήποτε προβολέα εικόνων· θα δείτε ένα καθαρό barcode Databar OmniDirectional έτοιμο για σάρωση. + +## Ακραίες περιπτώσεις και αντιμετώπιση προβλημάτων + +| Κατάσταση | Τι να ελέγξετε | Προτεινόμενη διόρθωση | +|-----------|----------------|-----------------------| +| Το barcode εμφανίζεται θολό | Η διάσταση X είναι πολύ χαμηλή για το επιλεγμένο ύψος | Αυξήστε το `XDimension.Pixels` (π.χ., από 2 σε 3) | +| Ο σαρωτής αποτυγχάνει σε barcode χαμηλού ύψους | Το ύψος είναι κάτω από το ελάχιστο του σαρωτή | Ορίστε `BarHeight.Pixels` τουλάχιστον στα 30 px (ή σύμφωνα με τις προδιαγραφές του σαρωτή) | +| Το αρχείο PNG είναι κενό ή κατεστραμμένο | Μη έγκυρη διαδρομή εξόδου ή άρνηση δικαιώματος εγγραφής | Χρησιμοποιήστε απόλυτη διαδρομή ή βεβαιωθείτε ότι η εφαρμογή έχει δικαιώματα εγγραφής | +| Χρειάζεστε διαφορετική συμβολική μορφή | Το τρέχον `EncodeTypes` δεν είναι κατάλληλο | Αντικαταστήστε το `EncodeTypes.DatabarOmniDirectional` με άλλη τιμή enum (π.χ., `EncodeTypes.Code128`) | + +## Συχνές ερωτήσεις + +**Ε: Μπορώ να δημιουργήσω άλλες μορφές εικόνας (JPEG, BMP);** +Α: Ναι. Αντικαταστήστε το `BarCodeImageFormat.Png` με `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, κ.λπ. + +**Ε: Πώς ενσωματώνω το PNG σε μια ιστοσελίδα;** +Α: Σερβίρετε το παραγόμενο PNG μέσω ενός HTTP endpoint ή μετατρέψτε το σε συμβολοσειρά Base64 και τοποθετήστε το στην ιδιότητα `src` μιας ετικέτας ``. + +**Ε: Υπάρχει τρόπος να ορίσω το χρώμα φόντου;** +Α: Χρησιμοποιήστε `generator.Parameters.Image.BackgroundColor = Color.White;` (ή οποιοδήποτε `System.Drawing.Color`). + +## Συμπέρασμα + +Τώρα ξέρετε πώς να **δημιουργήσετε ένα αρχείο PNG barcode** σε C# και να **ρυθμίσετε με ακρίβεια το ύψος του barcode** ώστε να καλύπτετε απαιτήσεις σάρωσης ή σχεδίασης. Αλλάζοντας την ιδιότητα `BarHeight.Pixels` μπορείτε να **αλλάξετε το ύψος του barcode** εν κινήσει και να παράγετε πολλαπλά PNG assets από μια μόνο βάση κώδικα. + +Στη συνέχεια, εξερευνήστε άλλες επιλογές προσαρμογής όπως χρώμα γραμμής, περιθώρια και προσθήκη κειμένου αναγνώσιμου από άνθρωπο. Μπορείτε επίσης να πειραματιστείτε με διαφορετικές συμβολικές μορφές (`EncodeTypes.Code128`, `EncodeTypes.QR`) για να επεκτείνετε το φάσμα των δεδομένων που μπορείτε να κωδικοποιήσετε. + +Καλή προγραμματιστική δουλειά και εύχομαι τα barcodes σας να σαρώνουν πάντα με την πρώτη προσπάθεια! + +## Τι πρέπει να μάθετε στη συνέχεια; + +Οι παρακάτω εκπαιδευτικοί οδηγίες καλύπτουν στενά συναφή θέματα που επεκτείνουν τις τεχνικές που παρουσιάστηκαν σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικό κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσει να κυριαρχήσετε επιπλέον δυνατότητες API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε και να ρυθμίσετε το ύψος του Barcode για One-Dimensional Databar χρησιμοποιώντας το Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Πώς να δημιουργήσετε Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [Πώς να δημιουργήσετε Aztec barcode με προσαρμοσμένη αναλογία διαστάσεων χρησιμοποιώντας το 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/greek/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/greek/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..dd2d08421 --- /dev/null +++ b/barcode/greek/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,158 @@ +--- +category: general +date: 2026-08-19 +description: Δημιουργήστε αρχεία PNG τύπου databar σε C# με το Aspose.BarCode. Μάθετε + πώς να δημιουργείτε εικόνες databar, να ρυθμίζετε τις παραμέτρους databar και να + αποθηκεύετε την έξοδο PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: el +lastmod: 2026-08-19 +og_description: Δημιουργήστε αρχεία PNG τύπου databar σε C# χρησιμοποιώντας το Aspose.BarCode. + Αυτό το σεμινάριο σας καθοδηγεί στη δημιουργία εικόνων databar, στη ρύθμιση παραμέτρων + databar όπως η διάσταση X και η αναλογία διαστάσεων, και στην αποθήκευση αρχείων + PNG υψηλής ποιότητας για εκτύπωση ή χρήση στο web. +og_image_alt: create databar PNG example +og_title: Δημιουργία εικόνων databar PNG σε C# – οδηγός βήμα‑βήμα +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Πώς να δημιουργήσετε εικόνες PNG τύπου databar με C# και Aspose.BarCode +url: /el/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Πώς να δημιουργήσετε εικόνες PNG τύπου databar με C# και Aspose.BarCode + +Αν χρειάζεστε **να δημιουργήσετε αρχεία databar PNG** σε μια εφαρμογή .NET, αυτός ο οδηγός σας δείχνει ακριβώς πώς. Θα δείτε ένα πλήρες, εκτελέσιμο παράδειγμα που δημιουργεί στοίβαξη (stacked) omnidirectional DataBar κώδικες, ρυθμίζει βασικές παραμέτρους και αποθηκεύει δύο αρχεία PNG με διαφορετικές αναλογίες διαστάσεων. + +Η δημιουργία μιας εικόνας DataBar δεν περιορίζεται μόνο στην κλήση μιας μεθόδου. Πρέπει επίσης να **ρυθμίσετε τις παραμέτρους databar** όπως η διάσταση X (πλάτος μονάδας) και η αναλογία διαστάσεων ώστε να πληρούν τις προδιαγραφές εκτύπωσης ή σάρωσης. Στο τέλος αυτού του tutorial θα κατανοήσετε **πώς να παράγετε γραφικά databar** που λειτουργούν αξιόπιστα σε πραγματικές συνθήκες. + +## Προαπαιτούμενα + +- .NET 6.0 ή νεότερο (ο κώδικας λειτουργεί επίσης με .NET Framework 4.7+) +- Visual Studio 2022 ή οποιοδήποτε IDE συμβατό με C# +- Έγκυρη άδεια για **Aspose.BarCode for .NET** (η δωρεάν αξιολόγηση λειτουργεί για δοκιμές) +- Βασική εξοικείωση με τη σύνταξη της C# + +> **Συμβουλή επαγγελματία:** Αν δεν έχετε ακόμη άδεια, μπορείτε να ζητήσετε ένα προσωρινό κλειδί αξιολόγησης από το portal της Aspose. Το API συμπεριφέρεται το ίδιο· μόνο το υδατογράφημα αλλάζει. + +## Βήμα 1: Εγκατάσταση του πακέτου NuGet Aspose.BarCode + +Ανοίξτε το έργο σας στο Visual Studio, κάντε δεξί‑κλικ στη λύση και επιλέξτε **Manage NuGet Packages**. Αναζητήστε `Aspose.BarCode` και εγκαταστήστε την πιο πρόσφατη σταθερή έκδοση. + +```bash +dotnet add package Aspose.BarCode +``` + +Αυτή η εντολή προσθέτει το assembly `Aspose.BarCode` στο έργο σας και καθιστά διαθέσιμη την κλάση `BarcodeGenerator`. + +## Βήμα 2: Αρχικοποίηση του δημιουργού barcode για στοίβαξη (stacked) omnidirectional DataBar + +Ο κατασκευαστής `BarcodeGenerator` δέχεται δύο ορίσματα: τον τύπο του barcode και τη σειρά των ακατέργαστων δεδομένων. Για ένα stacked omnidirectional DataBar χρησιμοποιείτε `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Γιατί είναι σημαντικό:** Η σταθερά `EncodeTypes.DatabarStackedOmniDirectional` λέει στη βιβλιοθήκη να παράγει ένα barcode που μπορεί να διαβαστεί από οποιονδήποτε προσανατολισμό, κάτι ιδανικό για ετικέτες ραφιών λιανικής. + +## Βήμα 3: Ρύθμιση της διάστασης X (πλάτος μονάδας) σε εικονοστοιχεία + +Η διάσταση X ελέγχει το μέγεθος του μικρότερου στοιχείου μπάρας. Ορίζοντάς την σε εικονοστοιχεία έχετε ακριβή έλεγχο του τελικού μεγέθους της εικόνας. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Μια τιμή **2 εικονοστοιχεία** είναι καλή ισορροπία μεταξύ αναγνωσιμότητας και συμπαγούς μεγέθους για τις περισσότερες εκτυπωτές ετικετών. Προσαρμόστε αυτήν την τιμή αν χρειάζεστε μεγαλύτερες ή μικρότερες μονάδες. + +## Βήμα 4: Ορισμός της πρώτης αναλογίας διαστάσεων και αποθήκευση του PNG + +Η αναλογία διαστάσεων επηρεάζει το ύψος του stacked DataBar. Μια αναλογία **15** παράγει ένα σχετικά κοντό barcode, ενώ η **30** το κάνει πιο ψηλό. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Η μέθοδος `Save` γράφει το παραγόμενο barcode σε αρχείο PNG. Το PNG είναι lossless, διατηρώντας τις καθαρές άκρες που απαιτούνται για τους σαρωτές barcode. + +## Βήμα 5: Αλλαγή της αναλογίας διαστάσεων και αποθήκευση δεύτερου PNG + +Μπορείτε να επαναχρησιμοποιήσετε το ίδιο αντικείμενο `BarcodeGenerator` για να δημιουργήσετε παραλλαγές απλώς αλλάζοντας την αναλογία διαστάσεων. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Τώρα έχετε δύο αρχεία PNG—`DatabarAspectRatio15.png` και `DatabarAspectRatio30.png`—κάθε ένα με διαφορετική οπτική πυκνότητα. + +## Βήμα 6: Επαλήθευση του αποτελέσματος + +Ανοίξτε τα παραγόμενα αρχεία PNG σε οποιονδήποτε προβολέα εικόνων. Θα πρέπει να δείτε ένα καθαρό, υψηλής αντίθεσης DataBar barcode. Η σάρωση των εικόνων με έναν σαρωτή barcode σε smartphone επιβεβαιώνει ότι και οι δύο αναλογίες διαστάσεων αποκωδικοποιούν την αρχική τιμή GTIN `12345678901231`. + +![create databar PNG example](databar_example.png) + +*Η παραπάνω εικόνα δείχνει τα δύο αρχεία PNG δίπλα‑δίπλα. Η αριστερή εικόνα χρησιμοποιεί αναλογία 15, η δεξιά αναλογία 30.* + +## Συνηθισμένες παραλλαγές και περιπτώσεις άκρων + +| Σενάριο | Τι να αλλάξετε | Αιτία | +|----------|----------------|--------| +| **Διαφορετικά δεδομένα** | Αντικαταστήστε τη συμβολοσειρά `(01)12345678901231` με οποιονδήποτε έγκυρο Αναγνωριστικό Εφαρμογής GS1 και δεδομένα | Σας επιτρέπει να κωδικοποιήσετε αναγνωριστικά προϊόντων, σειριακούς αριθμούς κ.λπ. | +| **Υψηλότερη ανάλυση** | Αυξήστε το `XDimension.Pixels` σε 3 ή 4 | Απαιτείται όταν το barcode θα εκτυπωθεί σε μεγάλες διαστάσεις ή θα σαρωθεί από απόσταση. | +| **Άλλοι τύποι DataBar** | Χρησιμοποιήστε `EncodeTypes.DatabarStacked` ή `EncodeTypes.DatabarExpanded` | Επιλέξτε τον τύπο που ταιριάζει καλύτερα στη διάταξη της ετικέτας σας. | +| **Διαφανές φόντο** | Pass `BarCodeImageFormat.Png` with `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Χρήσιμο για επικάλυψη του barcode σε χρωματιστές ετικέτες. | + +> **Προσοχή:** Ο ορισμός μιας διάστασης X που είναι πολύ μικρή (< 1 pixel) μπορεί να δημιουργήσει ένα barcode που φαίνεται θολό μετά από + +## Τι θα πρέπει να μάθετε στη συνέχεια; + +Τα παρακάτω tutorials καλύπτουν στενά συναφή θέματα που επεκτείνουν τις τεχνικές που παρουσιάζονται σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικό κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσει να κυριαρχήσετε πρόσθετες δυνατότητες του API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε και να προσαρμόσετε το ύψος του Barcode για One‑Dimensional Databar χρησιμοποιώντας Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Δημιουργία One‑Dimensional Databar κωδικοποίησης GS1 με Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Δημιουργία Databar barcode με Aspose.BarCode χρησιμοποιώντας .NET API – Ρύθμιση γραμμής & στήλης](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/greek/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..40b4b564b --- /dev/null +++ b/barcode/greek/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Μάθετε πώς να δημιουργείτε ταχυδρομικό barcode σε C# χρησιμοποιώντας + το Aspere.BarCode. Αυτός ο οδηγός βήμα‑βήμα δείχνει πώς να δημιουργήσετε barcode + για τις μορφές Planet και RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: el +lastmod: 2026-08-19 +og_description: Δημιουργήστε ταχυδρομικό barcode σε C# με το Aspose.BarCode. Ακολουθήστε + αυτόν τον οδηγό για να μάθετε πώς να δημιουργήσετε barcode για Planet και RM4SCC + με προσαρμοσμένες διαστάσεις. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Δημιουργία ταχυδρομικού barcode σε C# – πλήρης οδηγός Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Πώς να δημιουργήσετε ταχυδρομικό γραμμωτό κώδικα σε C# με το Aspose.BarCode +url: /el/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Πώς να δημιουργήσετε ταχυδρομικό barcode σε C# με Aspose.BarCode + +Αν χρειάζεστε **δημιουργία ταχυδρομικού barcode** για εφαρμογές αποστολής, αυτός ο οδηγός σας δείχνει ακριβώς πώς να δημιουργήσετε barcode χρησιμοποιώντας τη βιβλιοθήκη Aspose.BarCode. Θα δείτε ένα πλήρες, εκτελέσιμο παράδειγμα που δημιουργεί τόσο ένα Planet barcode (ύψος υπολογιζόμενο αυτόματα) όσο και ένα RM4SCC barcode με ρητό ύψος γραμμής. + +Η δημιουργία ταχυδρομικού barcode είναι κοινή απαίτηση για λογισμικό logistics, αυτοματοποιημένους εκτυπωτές ετικετών και συστήματα μαζικής αποστολής. Στο τέλος αυτού του tutorial θα μπορείτε να ενσωματώσετε τη δημιουργία barcode σε οποιοδήποτε .NET project, να προσαρμόσετε τη διάσταση X και να ελέγξετε το ύψος της γραμμής όταν το πρότυπο το επιτρέπει. + +**Τι θα μάθετε** + +* Πώς να ρυθμίσετε το Aspose.BarCode σε ένα έργο C#. +* Πώς να δημιουργήσετε Planet και RM4SCC ταχυδρομικά barcodes. +* Πώς να ρυθμίσετε τη διάσταση X (πλάτος μονάδας) και το ύψος της γραμμής. +* Πώς να αποθηκεύσετε το αποτέλεσμα ως εικόνα PNG. + +Δεν απαιτούνται εξωτερικές υπηρεσίες — όλα εκτελούνται τοπικά αφού αναφέρετε το πακέτο Aspose.BarCode NuGet. + +## Προαπαιτούμενα + +* .NET 6.0 SDK ή νεότερο (ο κώδικας λειτουργεί επίσης με .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code ή οποιοδήποτε IDE C# προτιμάτε. +* Πακέτο Aspose.BarCode for .NET – εγκαταστήστε το μέσω NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Δημιουργία ταχυδρομικού barcode με Aspose.BarCode + +Οι παρακάτω ενότητες σας οδηγούν βήμα‑βήμα, από τη δημιουργία των αντικειμένων γεννήτριας μέχρι την αποθήκευση των τελικών αρχείων PNG. + +### Βήμα 1: Δημιουργία Planet barcode (αυτόματο ύψος) + +Το Planet είναι ένα ταχυδρομικό barcode που χρησιμοποιείται σε πολλές χώρες για ταξινόμηση αλληλογραφίας. Όταν δημιουργείτε ένα Planet barcode, η βιβλιοθήκη καθορίζει αυτόματα το βέλτιστο ύψος της γραμμής βάσει των κωδικοποιημένων δεδομένων. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Γιατί λειτουργεί** – `EncodeTypes.Planet` λέει στο Aspose.BarCode να χρησιμοποιήσει τη συμβολική γραφή Planet. Η ιδιότητα `XDimension` ελέγχει το πλάτος της μικρότερης γραμμής (της μονάδας). Επειδή το Planet δεν απαιτεί σταθερό ύψος γραμμής, η βιβλιοθήκη υπολογίζει αυτόματα ένα κατάλληλο ύψος, απλοποιώντας τον κώδικα. + +### Βήμα 2: Δημιουργία RM4SCC barcode με ρητό ύψος + +Το RM4SCC είναι άλλη ταχυδρομική συμβολική γραφή που συχνά απαιτεί συγκεκριμένο ύψος γραμμής για συμβατότητα με σαρωτές. Ο παρακάτω κώδικας δείχνει πώς να ορίσετε αυτό το ύψος χειροκίνητα. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Γιατί ορίζετε το ύψος** – Κάποιοι ταχυδρομικοί σαρωτές απαιτούν ελάχιστο ύψος γραμμής. Αναθέτοντας `BarHeight.Pixels = 100`, εξασφαλίζετε ότι η παραγόμενη εικόνα πληροί αυτές τις απαιτήσεις. Η διάσταση X παραμένει συνεπής με το Planet barcode ώστε και οι δύο εικόνες να έχουν την ίδια οπτική πυκνότητα. + +### Βήμα 3: Επαλήθευση του αποτελέσματος + +Αφού εκτελέσετε το πρόγραμμα, ανοίξτε τα δύο αρχεία PNG που βρίσκονται στο `YOUR_DIRECTORY`. Θα πρέπει να δείτε δύο διαφορετικά barcodes: + +* `PostalPlanetBarHeightNone.png` – ένα Planet barcode με αυτόματα υπολογισμένο ύψος. +* `PostalRM4SCCBarHeight100Pixels.png` – ένα RM4SCC barcode με ύψος 100 pixel. + +Και οι δύο εικόνες μπορούν να τροφοδοτηθούν απευθείας σε εκτυπωτές ετικετών ή να εμφανιστούν σε web εφαρμογή. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Image alt text:* **Δημιουργημένη ταχυδρομική barcode** εικόνα χρησιμοποιώντας Aspose.BarCode (δείχνει πώς να δημιουργήσετε ταχυδρομικό barcode). + +## Πώς να δημιουργήσετε barcode με προσαρμοσμένες διαστάσεις (προχωρημένο) + +Αν χρειάζεστε λεπτομερή ρύθμιση άλλων παραμέτρων — όπως περιθώρια, τοποθέτηση κειμένου ή χρώμα — το Aspose.BarCode παρέχει ένα πλούσιο αντικείμενο `Parameters`. Παρακάτω υπάρχει ένα γρήγορο παράδειγμα που προσθέτει λευκό φόντο και απενεργοποιεί το κείμενο αναγνώσιμου από άνθρωπο. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Πότε να το χρησιμοποιήσετε** – Η απενεργοποίηση του κειμένου αναγνώσιμου από άνθρωπο είναι κοινή για αυτοματοποιημένη ταξινόμηση όπου μόνο το μηχανικά αναγνώσιμο μοτίβο έχει σημασία. Ο καθορισμός χρώματος φόντου εξασφαλίζει ότι το barcode εκτυπώνεται σωστά σε διαφανές μέσο. + +## Συνηθισμένα προβλήματα και συμβουλές επαγγελματία + +| Πρόβλημα | Γιατί συμβαίνει | Διόρθωση | +|----------|----------------|----------| +| Το barcode εμφανίζεται τεντωμένο | Η διάσταση X είναι πολύ μεγάλη σε σχέση με το μέγεθος της εικόνας | Διατηρήστε `XDimension.Pixels` μεταξύ 2 και 5 για τα περισσότερα ταχυδρομικά barcodes | +| Ο σαρωτής απορρίπτει την εικόνα | Το ύψος γραμμής είναι κάτω από το ελάχιστο που απαιτεί η ταχυδρομική υπηρεσία | Χρησιμοποιήστε `BarHeight.Pixels` ≥ 80 για RM4SCC εκτός αν η προδιαγραφή λέει κάτι διαφορετικό | +| Το μέγεθος του αρχείου PNG είναι μεγάλο | Η ανάλυση της εικόνας είναι υψηλότερη από το απαιτούμενο | Αποθηκεύστε ως PNG‑8 (`BarCodeImageFormat.Png8`) ή μειώστε τις διαστάσεις σε pixel | + +**Συμβουλή επαγγελματία:** Πάντα δοκιμάζετε το παραγόμενο barcode με πραγματικό σαρωτή πριν το αναπτύξετε σε παραγωγή. Μικρές οπτικές διαφορές μπορούν να επηρεάσουν την αναγνωσιμότητα. + +## Πλήρης κώδικας + +Αντιγράψτε ολόκληρο το παρακάτω τμήμα σε μια νέα εφαρμογή κονσόλας (`Program.cs`). Προσαρμόστε τις διαδρομές εξόδου σε έναν φάκελο όπου η διαδικασία σας μπορεί να γράψει. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Η εκτέλεση του προγράμματος εμφανίζει *«Barcodes generated successfully.»* και δημιουργεί τα δύο αρχεία PNG στον τρέχοντα φάκελο εργασίας του εκτελέσιμου. + +## Συμπέρασμα + +Τώρα ξέρετε πώς να **δημιουργήσετε ταχυδρομικό barcode** σε C# με Aspose.BarCode, καλύπτοντας τόσο τα Planet barcodes αυτόματου ύψους όσο και τα RM4SCC barcodes σταθερού ύψους. Ο οδηγός έδειξε επίσης **πώς να δημιουργήσετε barcode** με προσαρμοσμένη διάσταση X, ύψος γραμμής και οπτικές επιλογές, παρέχοντας μια ισχυρή βάση για οποιοδήποτε έργο αυτοματοποίησης αποστολών. + +Επόμενα βήματα που μπορείτε να εξερευνήσετε: + +* Ενσωματώστε τα παραγόμενα PNG σε τιμολόγιο PDF χρησιμοποιώντας Aspose.PDF. +* Αλλάξτε τη μορφή εξόδου σε SVG για κλιμακώσιμα διανυσματικά γραφικά. +* Χρησιμοποιήστε την κλάση `BarcodeReader` για να επαληθεύσετε τα κωδικοποιημένα δεδομένα προγραμματιστικά. + +Μη διστάσετε να πειραματιστείτε με διαφορετικές συμβολικές γραφές (π.χ., `EncodeTypes.Postnet`) και να μοιραστείτε τα αποτελέσματά σας με την κοινότητα. Καλή προγραμματιστική διασκέδαση! + +## Τι πρέπει να μάθετε στη συνέχεια; + +Οι παρακάτω οδηγίες καλύπτουν στενά σχετιζόμενα θέματα που επεκτείνουν τις τεχνικές που παρουσιάστηκαν σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικό κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσει να κυριαρχήσετε επιπλέον δυνατότητες API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε εικόνα Barcode με προσαρμογή συμπληρωματικού χώρου χρησιμοποιώντας Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Πώς να δημιουργήσετε Barcode – Διαμόρφωση Code 39 με Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Πώς να δημιουργήσετε DataMatrix Barcodes (ECC 200) με Aspose.BarCode για .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/hindi/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..0f110529f --- /dev/null +++ b/barcode/hindi/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,251 @@ +--- +category: general +date: 2026-08-19 +description: C# बारकोड जेनरेटर ट्यूटोरियल दिखाता है कि कैसे DataBar Expanded Stacked + बारकोड बनाएं, बारकोड का आकार कस्टमाइज़ करें, और पंक्तियों और स्तंभों को कॉन्फ़िगर + करें। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: hi +lastmod: 2026-08-19 +og_description: C# बारकोड जेनरेटर ट्यूटोरियल आपको DataBar बारकोड बनाने, आकार को कस्टमाइज़ + करने और सटीक आउटपुट के लिए पंक्तियों और स्तंभों को कॉन्फ़िगर करने का तरीका सिखाता + है। +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# बारकोड जेनरेटर – कस्टम DataBar बारकोड के लिए चरण-दर-चरण गाइड +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C# बारकोड जेनरेटर: कस्टम DataBar बारकोड बनाएं' +url: /hi/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# बारकोड जेनरेटर: कस्टम DataBar बारकोड बनाएं + +यदि आपको एक **c# barcode generator** चाहिए जो DataBar Expanded Stacked प्रतीक उत्पन्न कर सके, तो यह गाइड आपको बिल्कुल दिखाएगा कि कैसे कस्टम पंक्तियों और कॉलमों के साथ बारकोड छवियां उत्पन्न करें। आप databar पैरामीटर कॉन्फ़िगर करना, बारकोड आकार समायोजित करना, और परिणाम को PNG फ़ाइलों के रूप में सहेजना सीखेंगे। + +बारकोड को प्रोग्रामेटिकली जेनरेट करने से मैन्युअल डिज़ाइन चरण हटते हैं और विभिन्न प्लेटफ़ॉर्म पर सुसंगत आउटपुट सुनिश्चित होता है। इस ट्यूटोरियल में आप करेंगे: + +* Aspose.BarCode for .NET लाइब्रेरी (या कोई संगत पैकेज) को इंस्टॉल और रेफ़रेंस करें। +* DataBar Expanded Stacked सिम्बोलॉजी के लिए एक बारकोड जेनरेटर बनाएं। +* **How to generate barcode** छवियों को विशिष्ट कॉलम और पंक्ति सेटिंग्स के साथ बनाएं। +* **Customize barcode size** DataBar पंक्तियों और कॉलमों को नियंत्रित करके। +* **Configure databar parameters** जैसे टेक्स्ट, फ़ॉर्मेट, और इमेज क्वालिटी। + +## आवश्यकताएँ + +* .NET 6.0 SDK या बाद का संस्करण स्थापित हो। +* एक C# विकास वातावरण (Visual Studio, VS Code, Rider, आदि)। +* `Aspose.BarCode` NuGet पैकेज (या कोई समकक्ष लाइब्रेरी जो `BarcodeGenerator`, `EncodeTypes`, और `BarCodeImageFormat` प्रदान करती है)। + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## C# बारकोड जेनरेटर का उपयोग करके DataBar बारकोड बनाना + +निम्नलिखित अनुभाग आपको प्रत्येक चरण के माध्यम से ले जाएंगे। मुख्य फोकस **c# barcode generator** API पर है, लेकिन यह पैटर्न अन्य बारकोड लाइब्रेरीज़ पर भी लागू होता है जो समान प्रॉपर्टीज़ प्रदान करती हैं। + +### चरण 1: सैंपल टेक्स्ट के साथ बारकोड जेनरेटर को इनिशियलाइज़ करें + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*इस चरण का उद्देश्य क्या है?* +`BarcodeGenerator` सभी बारकोड निर्माण कार्यों के लिए एंट्री पॉइंट है। `EncodeTypes.DatabarExpandedStacked` एन्‍युम प्रदान करने से लाइब्रेरी को पता चलता है कि कौन सी सिम्बोलॉजी उपयोग करनी है, जबकि टेक्स्ट आर्ग्यूमेंट प्रतीक में एन्कोड किया गया मानव‑पठनीय मान बन जाता है। + +### चरण 2: कॉलमों की संख्या सेट करें (डिफ़ॉल्ट पंक्तियों का उपयोग किया जाता है) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*इस चरण का उद्देश्य क्या है?* +DataBar Expanded Stacked प्रतीक स्टैक्ड लीनियर एलिमेंट्स से बनते हैं। `Columns` प्रॉपर्टी को समायोजित करने से क्षैतिज घनत्व बदलता है, जिससे आप लंबी डेटा स्ट्रिंग्स को कुल ऊँचाई बढ़ाए बिना फिट कर सकते हैं। यह सीधे **barcode आकार को कस्टमाइज़** करता है। + +### चरण 3: चार कॉलमों का उपयोग करने वाली बारकोड इमेज सहेजें + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*आप क्या देखते हैं:* +सहेजी गई `DatabarCols4.png` इमेज एक DataBar बारकोड दिखाती है जो डिफ़ॉल्ट से अधिक चौड़ी है क्योंकि इसमें चार कॉलम हैं। आप आउटपुट को सत्यापित करने के लिए फ़ाइल को किसी भी इमेज व्यूअर में खोल सकते हैं। + +### चरण 4: नई कॉन्फ़िगरेशन के लिए जेनरेटर को पुनः‑इनिशियलाइज़ करें + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*पुनः‑इनिशियलाइज़ क्यों?* +पिछले कॉलम सेटिंग को रखते हुए `Rows` प्रॉपर्टी बदलने से अप्रत्याशित संयोजन बन सकता है। एक नई इंस्टेंस से शुरू करने से यह सुनिश्चित होता है कि केवल इच्छित पैरामीटर (`Rows`) अगली इमेज को प्रभावित करे। + +### चरण 5: पंक्तियों की संख्या सेट करें (डिफ़ॉल्ट कॉलमों का उपयोग किया जाता है) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*इस चरण का उद्देश्य क्या है?* +`Rows` प्रॉपर्टी वर्टिकल स्टैकिंग को नियंत्रित करती है। पंक्तियों को बढ़ाने से बारकोड लंबा हो जाता है, जो तब उपयोगी होता है जब क्षैतिज स्थान सीमित हो लेकिन ऊर्ध्वाधर स्थान प्रचुर हो। यह **barcode आकार को कस्टमाइज़** करने का एक और तरीका है। + +### चरण 6: तीन पंक्तियों का उपयोग करने वाली बारकोड इमेज सहेजें + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*परिणाम:* +`DatabarRows3.png` तीन स्टैक्ड पंक्तियों के साथ एक लंबा बारकोड दिखाता है, जो दर्शाता है कि **databar पैरामीटर कॉन्फ़िगर** करने से दृश्य रूप पर कैसे प्रभाव पड़ता है। + +## पूर्ण चलाने योग्य उदाहरण + +नीचे एक पूर्ण प्रोग्राम दिया गया है जिसे आप कॉपी, पेस्ट और चलाकर उपयोग कर सकते हैं। इसमें सभी इम्पोर्ट्स, एरर हैंडलिंग, और स्पष्टता के लिए टिप्पणियां शामिल हैं। + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**अपेक्षित आउटपुट** + +प्रोग्राम चलाने से दो PNG फ़ाइलें बनती हैं: + +* `DatabarCols4.png` – चार कॉलमों वाला विस्तृत DataBar बारकोड। +* `DatabarRows3.png` – तीन पंक्तियों वाला लंबा DataBar बारकोड। + +इमेजेज़ को खोलें ताकि यह पुष्टि हो सके कि बारकोड आयाम कॉन्फ़िगर किए गए पैरामीटर से मेल खाते हैं। + +## सामान्य प्रश्न और एज‑केस हैंडलिंग + +| प्रश्न | उत्तर | +|----------|--------| +| *यदि मुझे कस्टम पंक्तियों **और** कॉलम दोनों चाहिए तो क्या करें?* | `Save` कॉल करने से पहले एक ही `BarcodeGenerator` इंस्टेंस पर `Rows` **और** `Columns` सेट करें। लाइब्रेरी दोनों मानों को मिलाकर अनुरोधित आकार का ग्रिड बनाती है। | +| *क्या मैं इमेज फ़ॉर्मेट बदल सकता हूँ?* | हां। अपने वर्कफ़्लो के अनुसार `BarCodeImageFormat.Png` को `Jpeg`, `Bmp`, या `Gif` से बदलें। | +| *यदि टेक्स्ट प्रतीक की क्षमता से अधिक लंबा हो तो क्या होता है?* | जेनरेटर `ArgumentException` थ्रो करता है। टेक्स्ट को छोटा करें या अधिक क्षमता के लिए `Columns`/`Rows` बढ़ाएँ। | +| *क्या DPI या इमेज रिज़ॉल्यूशन सेट करने का कोई तरीका है?* | सेव करने से पहले इच्छित DPI निर्दिष्ट करने के लिए `generator.Parameters.ImageResolution` का उपयोग करें। यह हाई‑रेज़ॉल्यूशन प्रिंटिंग के लिए **barcode आकार को और कस्टमाइज़** करता है। | +| *क्या लाइब्रेरी अन्य DataBar वैरिएंट्स को सपोर्ट करती है?* | हां। वही पैरामीटर स्ट्रक्चर रखकर `EncodeTypes.DatabarExpandedStacked` को `DatabarExpanded`, `DatabarLimited`, आदि से बदलें। | + +## विश्वसनीय बारकोड जेनरेशन के लिए टिप्स + +* **Pro tip:** प्रोडक्शन में डिप्लॉय करने से पहले हमेशा स्कैनर या मोबाइल ऐप से जेनरेटेड इमेज को वेरिफ़ाई करें। +* **Watch out for:** नल या खाली आउटपुट डायरेक्टरी—यदि पाथ मौजूद नहीं है तो `Save` एक्सेप्शन थ्रो करेगा। आवश्यक होने पर प्रोग्रामेटिकली फ़ोल्डर बनाएं। +* **Performance note:** लूप में कई बारकोड जेनरेट करते समय एक ही `BarcodeGenerator` इंस्टेंस को पुनः‑उपयोग करना और केवल `Rows` या `Columns` बदलना ऑब्जेक्ट‑क्रिएशन ओवरहेड को कम कर सकता है। + +## निष्कर्ष + +अब आप जानते हैं कि **c# barcode generator** का उपयोग करके **databar बारकोड** इमेजेज़ कैसे बनाएं, **barcode आकार को कस्टमाइज़** करें, और **databar पैरामीटर** जैसे पंक्तियों और कॉलमों को **कॉन्फ़िगर** करें। इन सेटिंग्स को समायोजित करके आप किसी भी लेआउट आवश्यकता में बारकोड फिट कर सकते हैं जबकि स्कैन विश्वसनीयता बनी रहती है। + +अगला, संबंधित विषयों का अन्वेषण करें जैसे **how to generate barcode** PDFs, रिपोर्ट में बारकोड एम्बेड करना, या अन्य सिम्बोलॉजीज़ (QR, Code‑128, आदि) पर स्विच करना। अपने विशिष्ट उपयोग केस के लिए इष्टतम कॉन्फ़िगरेशन खोजने हेतु विभिन्न `Rows`, `Columns`, और इमेज रिज़ॉल्यूशन के साथ प्रयोग करें। + +--- + +## आगे आप क्या सीखें? + +निम्नलिखित ट्यूटोरियल्स उन विषयों को कवर करते हैं जो इस गाइड में दिखाए गए तकनीकों पर आधारित हैं। प्रत्येक संसाधन में पूर्ण कार्यशील कोड उदाहरण और चरण‑दर‑चरण व्याख्याएँ शामिल हैं जो आपको अतिरिक्त API फीचर्स में महारत हासिल करने और अपने प्रोजेक्ट्स में वैकल्पिक इम्प्लीमेंटेशन अप्रोचेज़ को एक्सप्लोर करने में मदद करेंगे। + +- [Aspose.BarCode for .NET का उपयोग करके वन‑डायमेंशनल Databar के लिए बारकोड ऊँचाई कैसे जेनरेट और एडजस्ट करें](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Aspose.BarCode .NET API का उपयोग करके वन‑डायमेंशनल Databar 2D बारकोड जेनरेट करें](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [.NET API का उपयोग करके Aspose.BarCode Databar बारकोड जेनरेट करें – पंक्ति और कॉलम कॉन्फ़िगरेशन](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/hindi/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..27cb0648d --- /dev/null +++ b/barcode/hindi/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,220 @@ +--- +category: general +date: 2026-08-19 +description: C# में बारकोड PNG फ़ाइल कैसे बनाएं और उसकी ऊँचाई कैसे समायोजित करें, + सीखें; इसमें बारकोड इमेज बनाना और बारकोड की ऊँचाई आसानी से बदलना शामिल है। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: hi +lastmod: 2026-08-19 +og_description: C# में एक बारकोड PNG फ़ाइल बनाएं और सीखें कि बारकोड छवियां कैसे जनरेट + करें, बारकोड की ऊँचाई को समायोजित करें, और इष्टतम स्कैनिंग के लिए बारकोड की ऊँचाई + बदलें। +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: C# में बारकोड PNG फ़ाइल बनाएं – चरण‑दर‑चरण गाइड +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: C# में समायोज्य ऊँचाई के साथ बारकोड PNG फ़ाइल कैसे बनाएं +url: /hi/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# में समायोज्य ऊँचाई के साथ बारकोड PNG फ़ाइल कैसे बनाएं + +यदि आपको C# में **बारकोड PNG फ़ाइल** बनानी है, तो यह गाइड आपको ठीक‑ठीक दिखाएगा। आप एक पूर्ण, चलाने योग्य उदाहरण देखेंगे जो **बारकोड** छवियों को उत्पन्न करने और विभिन्न उपयोग‑केसों के लिए **बारकोड ऊँचाई** समायोजित करने का प्रदर्शन करता है। + +बारकोड PNG फ़ाइल बनाना इन्वेंटरी सिस्टम, पॉइंट‑ऑफ़‑सेल टर्मिनल और किसी भी एप्लिकेशन के लिए सामान्य आवश्यकता है जिसे मशीन‑रीडेबल डेटा को प्रिंट या प्रदर्शित करना होता है। इस ट्यूटोरियल के अंत तक आप बारकोड ऊँचाई बदल सकेंगे, कई PNG फ़ाइलें सहेज सकेंगे, और स्कैन विश्वसनीयता पर ऊँचाई के प्रभाव को समझ सकेंगे। + +## Prerequisites + +शुरू करने से पहले सुनिश्चित करें कि आपके पास है: + +* .NET 6.0 SDK या बाद का संस्करण स्थापित +* Visual Studio 2022 (या कोई भी IDE जो .NET को सपोर्ट करता हो) +* **Aspose.BarCode for .NET** NuGet पैकेज (कोड नमूना इस लाइब्रेरी का उपयोग करता है) + +आप कमांड लाइन से पैकेज जोड़ सकते हैं: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Aspose.BarCode का फ्री इवैल्यूएशन संस्करण विकास और परीक्षण के लिए काम करता है। प्रोडक्शन के लिए, लाइसेंस की प्राप्त करें। + +## Install the barcode library + +पहला कदम है अपने प्रोजेक्ट में लाइब्रेरी को रेफ़रेंस करना। अपनी C# फ़ाइल के शीर्ष पर निम्न `using` निर्देश जोड़ें: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +ये नेमस्पेस आपको `BarcodeGenerator`, `EncodeTypes`, और `BarCodeImageFormat` तक पहुँच प्रदान करते हैं। + +## Create the barcode PNG file + +अब हम एक `BarcodeGenerator` इंस्टेंस बनाते हैं जो **बारकोड PNG फ़ाइल** आउटपुट करेगा। उदाहरण Databar OmniDirectional सिंबोलॉजी का उपयोग करता है, लेकिन आप `EncodeTypes.DatabarOmniDirectional` को किसी भी समर्थित प्रकार से बदल सकते हैं। + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +स्ट्रिंग `"(01)12345678901231"` GS1 एप्लीकेशन आइडेंटिफ़ायर फ़ॉर्मेट के अनुसार 14‑अंकीय GTIN दर्शाती है। अपने उत्पाद पहचानकर्ताओं के अनुसार डेटा समायोजित करें। + +## Set the X‑dimension (optional) + +X‑dimension एकल बारकोड मॉड्यूल की चौड़ाई को परिभाषित करता है। पिक्सेल‑आधारित मान आपको इमेज आकार पर सटीक नियंत्रण देता है। + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +`2` पिक्सेल का मान अधिकांश स्क्रीन डिस्प्ले के लिए उपयुक्त है। यदि प्रिंट करते समय बड़ा बारकोड चाहिए तो इसे बढ़ाएँ। + +## Adjust barcode height and save the barcode PNG file + +**BarHeight** प्रॉपर्टी बारों की ऊर्ध्वाधर आकार को नियंत्रित करती है। इस मान को बदलने से आप **बारकोड ऊँचाई** को समायोजित कर सकते हैं बिना एन्कोडेड डेटा को बदले। + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +फ़ाइल `DatabarBarHeight30Pixels.png` अब एक **बारकोड PNG फ़ाइल** है जिसकी ऊँचाई 30 पिक्सेल है। + +**बारकोड ऊँचाई** बदलने और दूसरी इमेज बनाने के लिए, बस नया मान असाइन करें और फिर `Save` कॉल करें: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +अब आपके पास दो PNG फ़ाइलें हैं—एक 30 px की और दूसरी 60 px की—जो दिखाती हैं कि **बारकोड ऊँचाई** को रन‑टाइम पर कैसे समायोजित किया जाता है। + +### Why bar height matters + +* **Readability:** स्कैनर विश्वसनीय डिटेक्शन के लिए न्यूनतम ऊँचाई की अपेक्षा करते हैं। बहुत छोटा बारकोड, विशेषकर लो‑रेज़ोल्यूशन कैमरों पर, मिस हो सकता है। +* **Aesthetics:** बारकोड की ऊँचाई को आसपास के डिज़ाइन तत्वों के साथ मिलाने से UI साफ़ दिखता है। +* **Print constraints:** कुछ लेबल प्रिंटर में निश्चित ऊँचाई स्लॉट होते हैं; बारकोड ऊँचाई को समायोजित करने से यह फिट हो जाता है। + +**Best practice:** X‑dimension का गुणज (जैसे, X‑dimension 2 px हो तो ऊँचाई 30 px) रखें ताकि अनुपात बना रहे और विकृति न आए। + +## Complete example + +नीचे पूरा, स्व-समाहित प्रोग्राम दिया गया है जिसे आप कंसोल एप्लिकेशन में पेस्ट करके तुरंत चला सकते हैं। + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Expected output** + +प्रोग्राम चलाने से निष्पादन योग्य की कार्य निर्देशिका में दो फ़ाइलें बनेंगी: + +* `DatabarBarHeight30Pixels.png` – 30‑पिक्सेल‑ऊँचा बारकोड PNG फ़ाइल +* `DatabarBarHeight60Pixels.png` – 60‑पिक्सेल‑ऊँचा बारकोड PNG फ़ाइल + +किसी भी इमेज व्यूअर से इन PNG को खोलें; आपको एक स्पष्ट Databar OmniDirectional बारकोड स्कैन के लिए तैयार दिखेगा। + +## Edge cases and troubleshooting + +| Situation | What to check | Recommended fix | +|-----------|---------------|-----------------| +| Barcode appears blurry | X‑dimension too low for chosen height | Increase `XDimension.Pixels` (e.g., from 2 to 3) | +| Scanner fails on low‑height barcode | Height below scanner’s minimum | Set `BarHeight.Pixels` to at least 30 px (or per scanner specs) | +| PNG file is empty or corrupted | Output path invalid or write permission denied | Use an absolute path or ensure the app has write access | +| Need a different symbology | Current `EncodeTypes` not suitable | Replace `EncodeTypes.DatabarOmniDirectional` with another enum value (e.g., `EncodeTypes.Code128`) | + +## Frequently asked questions + +**Q: Can I generate other image formats (JPEG, BMP)?** +A: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, etc. + +**Q: How do I embed the PNG in a web page?** +A: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 string and place it in an `` tag’s `src` attribute. + +**Q: Is there a way to set the background color?** +A: Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any `System.Drawing.Color`). + +## Conclusion + +आप अब जानते हैं कि C# में **बारकोड PNG फ़ाइल** कैसे **जनरेट** करें और स्कैनिंग या डिज़ाइन आवश्यकताओं को पूरा करने के लिए **बारकोड ऊँचाई** को सटीक रूप से **समायोजित** करें। `BarHeight.Pixels` प्रॉपर्टी को बदलकर आप रन‑टाइम पर **बारकोड ऊँचाई** बदल सकते हैं और एक ही कोड बेस से कई PNG एसेट बना सकते हैं। + +अब आगे, फ़ोरग्राउंड रंग, मार्जिन, और ह्यूमन‑रीडेबल टेक्स्ट जोड़ने जैसी अन्य कस्टमाइज़ेशन विकल्पों को एक्सप्लोर करें। आप विभिन्न सिंबोलॉजीज़ (`EncodeTypes.Code128`, `EncodeTypes.QR`) के साथ प्रयोग करके एन्कोड करने योग्य डेटा की रेंज भी बढ़ा सकते हैं। + +Happy coding, and may your barcodes always scan on the first try! + +## 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 and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/hindi/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/hindi/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..83289f4ec --- /dev/null +++ b/barcode/hindi/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Aspose.BarCode के साथ C# में डेटाबार PNG फ़ाइलें बनाएं। जानें कि डेटाबार + इमेजेज़ कैसे जेनरेट करें, डेटाबार पैरामीटर कॉन्फ़िगर करें, और PNG आउटपुट सहेजें। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: hi +lastmod: 2026-08-19 +og_description: C# में Aspose.BarCode का उपयोग करके डेटाबार PNG फ़ाइलें बनाएं। यह + ट्यूटोरियल आपको डेटाबार इमेजेज़ जनरेट करने, X‑डायमेंशन और एस्पेक्ट रेशियो जैसे डेटाबार + पैरामीटर कॉन्फ़िगर करने, और प्रिंटिंग या वेब उपयोग के लिए उच्च‑गुणवत्ता वाली PNG + फ़ाइलें सहेजने के चरणों से परिचित कराता है। +og_image_alt: create databar PNG example +og_title: C# में डेटाबार PNG इमेज बनाएं – चरण‑दर‑चरण गाइड +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: C# और Aspose.BarCode के साथ डेटाबार PNG इमेज कैसे बनाएं +url: /hi/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# How to create databar PNG images with C# and Aspose.BarCode + +यदि आपको .NET एप्लिकेशन में **databar PNG** फ़ाइलें बनानी हैं, तो यह गाइड आपको ठीक‑ठीक दिखाएगा कि कैसे करना है। आप एक पूर्ण, चलाने योग्य उदाहरण देखेंगे जो स्टैक्ड ओम्निडायरेक्शनल DataBar कोड बनाता है, प्रमुख पैरामीटर कॉन्फ़िगर करता है, और दो अलग‑अलग आस्पेक्ट रेशियो वाली PNG फ़ाइलें सहेजता है। + +DataBar इमेज बनाना सिर्फ एक मेथड कॉल करने से नहीं होता। आपको **databar पैरामीटर** जैसे X‑डायमेंशन (मॉड्यूल चौड़ाई) और आस्पेक्ट रेशियो को प्रिंटिंग या स्कैनिंग स्पेसिफिकेशन के अनुसार कॉन्फ़िगर भी करना पड़ता है। इस ट्यूटोरियल के अंत तक आप समझ जाएंगे **कैसे databar** ग्राफ़िक्स जनरेट करें जो वास्तविक‑दुनिया के परिदृश्यों में भरोसेमंद रूप से काम करें। + +## Prerequisites + +- .NET 6.0 या बाद का संस्करण (कोड .NET Framework 4.7+ के साथ भी काम करता है) +- Visual Studio 2022 या कोई भी C#‑संगत IDE +- **Aspose.BarCode for .NET** का वैध लाइसेंस (फ़्री इवैल्यूएशन टेस्टिंग के लिए काम करता है) +- C# सिंटैक्स की बुनियादी समझ + +> **Pro tip:** यदि आपके पास अभी लाइसेंस नहीं है, तो आप Aspose पोर्टल से एक टेम्पररी इवैल्यूएशन की माँग सकते हैं। API वही रहता है; केवल वॉटरमार्क बदलता है। + +## Step 1: Install the Aspose.BarCode NuGet package + +Visual Studio में अपना प्रोजेक्ट खोलें, सॉल्यूशन पर राइट‑क्लिक करें, और **Manage NuGet Packages** चुनें। `Aspose.BarCode` खोजें और नवीनतम स्थिर संस्करण इंस्टॉल करें। + +```bash +dotnet add package Aspose.BarCode +``` + +यह कमांड `Aspose.BarCode` असेंबली को आपके प्रोजेक्ट में जोड़ता है और `BarcodeGenerator` क्लास को उपलब्ध कराता है। + +## Step 2: Initialize the barcode generator for a stacked omnidirectional DataBar + +`BarcodeGenerator` कन्स्ट्रक्टर दो आर्ग्यूमेंट लेता है: बारकोड प्रकार और रॉ डेटा स्ट्रिंग। स्टैक्ड ओम्निडायरेक्शनल DataBar के लिए आप `EncodeTypes.DatabarStackedOmniDirectional` उपयोग करेंगे। + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Why this matters:** `EncodeTypes.DatabarStackedOmniDirectional` कॉन्स्टेंट लाइब्रेरी को बताता है कि वह ऐसा बारकोड बनाए जो किसी भी ओरिएंटेशन से पढ़ा जा सके, जो रिटेल शेल्फ लेबल्स के लिए आदर्श है। + +## Step 3: Configure the X‑dimension (module width) in pixels + +X‑डायमेंशन सबसे छोटे बार एलिमेंट का आकार नियंत्रित करता है। पिक्सेल में सेट करने से आपको अंतिम इमेज साइज पर सटीक नियंत्रण मिलता है। + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +**2 पिक्सेल** का मान अधिकांश लेबल प्रिंटरों के लिए पढ़ने योग्य और कॉम्पैक्ट दोनों का अच्छा संतुलन है। यदि आपको बड़े या छोटे मॉड्यूल चाहिए तो इस मान को समायोजित करें। + +## Step 4: Set the first aspect ratio and save the PNG + +आस्पेक्ट रेशियो स्टैक्ड DataBar की ऊँचाई को प्रभावित करता है। **15** का आस्पेक्ट रेशियो अपेक्षाकृत छोटा बारकोड बनाता है, जबकि **30** इसे लंबा बनाता है। + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +`Save` मेथड जनरेटेड बारकोड को PNG फ़ाइल में लिखता है। PNG लॉसलेस है, जिससे बारकोड स्कैनर के लिए आवश्यक तेज किनारे बरकरार रहते हैं। + +## Step 5: Change the aspect ratio and save a second PNG + +आप वही `BarcodeGenerator` इंस्टेंस पुनः उपयोग करके बस आस्पेक्ट रेशियो बदल कर विभिन्न संस्करण बना सकते हैं। + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +अब आपके पास दो PNG फ़ाइलें हैं—`DatabarAspectRatio15.png` और `DatabarAspectRatio30.png`—प्रत्येक का विज़ुअल डेंसिटी अलग है। + +## Step 6: Verify the output + +किसी भी इमेज व्यूअर में जनरेटेड PNG फ़ाइलें खोलें। आपको एक साफ़, हाई‑कॉन्ट्रास्ट DataBar बारकोड दिखना चाहिए। स्मार्टफ़ोन बारकोड स्कैनर से इमेज स्कैन करने पर दोनों आस्पेक्ट रेशियो मूल GTIN वैल्यू `12345678901231` को डिकोड करेंगे। + +![create databar PNG example](databar_example.png) + +*ऊपर की इमेज दो PNG फ़ाइलों को साइड‑बाय‑साइड दिखाती है। बाईं इमेज में आस्पेक्ट रेशियो 15 है, दाईं में आस्पेक्ट रेशियो 30।* + +## Common variations and edge cases + +| परिदृश्य | क्या बदलें | कारण | +|----------|------------|------| +| **विभिन्न डेटा** | स्ट्रिंग `(01)12345678901231` को किसी भी वैध GS1 एप्लिकेशन आइडेंटिफ़ायर और डेटा से बदलें | प्रोडक्ट आईडी, सीरियल नंबर आदि को एन्कोड करने की सुविधा देता है | +| **उच्च रिज़ॉल्यूशन** | `XDimension.Pixels` को 3 या 4 तक बढ़ाएँ | जब बारकोड बड़े आकार में प्रिंट या दूरी से स्कैन किया जाना हो, तब आवश्यक | +| **अन्य DataBar प्रकार** | `EncodeTypes.DatabarStacked` या `EncodeTypes.DatabarExpanded` उपयोग करें | आपके लेबल लेआउट के अनुसार सबसे उपयुक्त प्रकार चुनें | +| **ट्रांसपेरेंट बैकग्राउंड** | `BarCodeImageFormat.Png` के साथ `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` पास करें | रंगीन लेबल्स पर बारकोड ओवरले करने में उपयोगी | + +> **Watch out for:** बहुत छोटा X‑डायमेंशन (< 1 पिक्सेल) सेट करने से बारकोड धुंधला दिख सकता है और स्कैनिंग में समस्या उत्पन्न हो सकती है। + +## What Should You Learn Next? + +नीचे दिए गए ट्यूटोरियल्स उन विषयों को कवर करते हैं जो इस गाइड में दिखाए गए तकनीकों पर आधारित हैं। प्रत्येक संसाधन में पूर्ण कार्यशील कोड उदाहरण और चरण‑दर‑चरण व्याख्याएँ शामिल हैं, जिससे आप अतिरिक्त API फीचर्स में महारत हासिल कर सकें और अपने प्रोजेक्ट्स में वैकल्पिक इम्प्लीमेंटेशन एप्रोच को एक्सप्लोर कर सकें। + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/hindi/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..06d53c099 --- /dev/null +++ b/barcode/hindi/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: C# में Aspere.BarCode का उपयोग करके पोस्टल बारकोड कैसे बनाएं, सीखें। + यह चरण‑दर‑चरण गाइड Planet और RM4SCC फ़ॉर्मेट के लिए बारकोड बनाने का तरीका दिखाता + है। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: hi +lastmod: 2026-08-19 +og_description: Aspose.BarCode के साथ C# में पोस्टल बारकोड जेनरेट करें। इस गाइड का + पालन करके जानें कि कैसे कस्टम आयामों के साथ Planet और RM4SCC के लिए बारकोड जेनरेट + किया जाए। +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: C# में पोस्टल बारकोड जेनरेट करें – पूर्ण Aspose.BarCode गाइड +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: C# में Aspose.BarCode के साथ पोस्टल बारकोड कैसे बनाएं +url: /hi/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# में Aspose.BarCode के साथ पोस्टल बारकोड कैसे जेनरेट करें + +यदि आपको मेलिंग एप्लिकेशन के लिए **पोस्टल बारकोड जेनरेट** करने की आवश्यकता है, तो यह गाइड आपको Aspose.BarCode लाइब्रेरी का उपयोग करके बारकोड कैसे जेनरेट करें, यह बिल्कुल दिखाता है। आप एक पूर्ण, चलाने योग्य उदाहरण देखेंगे जो एक Planet बारकोड (ऊँचाई स्वतः गणना) और एक RM4SCC बारकोड को स्पष्ट बार ऊँचाई के साथ बनाता है। + +पोस्टल बारकोड जेनरेट करना लॉजिस्टिक्स सॉफ़्टवेयर, ऑटोमेटेड लेबल प्रिंटर और बल्क मेलिंग सिस्टम्स के लिए एक सामान्य आवश्यकता है। इस ट्यूटोरियल के अंत तक आप किसी भी .NET प्रोजेक्ट में बारकोड जेनरेशन को इंटीग्रेट कर पाएँगे, X‑डायमेंशन को कस्टमाइज़ कर पाएँगे, और जब मानक फ़ॉर्मेट अनुमति देता है तो बार की ऊँचाई को नियंत्रित कर पाएँगे। + +**What you’ll learn** + +* C# प्रोजेक्ट में Aspose.BarCode को सेटअप करना। +* Planet और RM4SCC पोस्टल बारकोड जेनरेट करना। +* X‑डायमेंशन (मॉड्यूल चौड़ाई) और बार ऊँचाई को समायोजित करना। +* परिणाम को PNG इमेज के रूप में सहेजना। + +कोई बाहरी सर्विस आवश्यक नहीं है—Aspose.BarCode NuGet पैकेज को रेफ़रेंस करने के बाद सब कुछ लोकली चलता है। + +## Prerequisites + +* .NET 6.0 SDK या बाद का संस्करण (कोड .NET Framework 4.7+ के साथ भी काम करता है)। +* Visual Studio 2022, Visual Studio Code, या आपका पसंदीदा कोई भी C# IDE। +* Aspose.BarCode for .NET पैकेज – इसे NuGet के माध्यम से इंस्टॉल करें: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generate postal barcode with Aspose.BarCode + +निम्नलिखित सेक्शन आपको प्रत्येक चरण के माध्यम से ले जाएगा, जेनरेटर ऑब्जेक्ट बनाने से लेकर अंतिम PNG फ़ाइलों को सहेजने तक। + +### Step 1: Create a Planet barcode (automatic height) + +Planet एक पोस्टल बारकोड है जो कई देशों में मेल सॉर्टिंग के लिए उपयोग किया जाता है। जब आप Planet बारकोड बनाते हैं, तो लाइब्रेरी एन्कोडेड डेटा के आधार पर स्वचालित रूप से इष्टतम बार ऊँचाई निर्धारित करती है। + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Why this works** – `EncodeTypes.Planet` Aspose.BarCode को Planet सिम्बोलॉजी उपयोग करने के लिए बताता है। `XDimension` प्रॉपर्टी सबसे छोटे बार (मॉड्यूल) की चौड़ाई को नियंत्रित करती है। चूँकि Planet को फिक्स्ड बार ऊँचाई की आवश्यकता नहीं होती, लाइब्रेरी स्वचालित रूप से उपयुक्त ऊँचाई की गणना करती है, जिससे कोड सरल हो जाता है। + +### Step 2: Create an RM4SCC barcode with explicit height + +RM4SCC एक अन्य पोस्टल सिम्बोलॉजी है जिसे अक्सर स्कैनर संगतता के लिए विशिष्ट बार ऊँचाई की आवश्यकता होती है। नीचे दिया गया कोड दिखाता है कि आप वह ऊँचाई मैन्युअली कैसे सेट कर सकते हैं। + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Why you set the height** – कुछ पोस्टल स्कैनर न्यूनतम बार ऊँचाई की अपेक्षा करते हैं। `BarHeight.Pixels = 100` असाइन करके आप सुनिश्चित करते हैं कि जेनरेटेड इमेज इन आवश्यकताओं को पूरा करती है। X‑डायमेंशन Planet बारकोड के समान रहता है ताकि दोनों इमेज समान विज़ुअल डेंसिटी साझा करें। + +### Step 3: Verify the output + +प्रोग्राम चलाने के बाद, `YOUR_DIRECTORY` में स्थित दो PNG फ़ाइलें खोलें। आपको दो अलग-अलग बारकोड दिखने चाहिए: + +* `PostalPlanetBarHeightNone.png` – स्वचालित रूप से गणना की गई ऊँचाई वाला Planet बारकोड। +* `PostalRM4SCCBarHeight100Pixels.png` – 100‑पिक्सेल बार ऊँचाई वाला RM4SCC बारकोड। + +दोनों इमेज को सीधे लेबल प्रिंटर में फीड किया जा सकता है या वेब एप्लिकेशन में प्रदर्शित किया जा सकता है। + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Image alt text:* **Generated postal barcode** इमेज Aspose.BarCode का उपयोग करके (पोस्टल बारकोड जेनरेट करने का प्रदर्शन)। + +## How to generate barcode with custom dimensions (advanced) + +यदि आपको अन्य पैरामीटर—जैसे मार्जिन, टेक्स्ट प्लेसमेंट, या रंग—को फाइन‑ट्यून करने की आवश्यकता है, तो Aspose.BarCode एक समृद्ध `Parameters` ऑब्जेक्ट प्रदान करता है। नीचे एक त्वरित उदाहरण है जो सफ़ेद बैकग्राउंड जोड़ता है और ह्यूमन‑रीडेबल टेक्स्ट को डिसेबल करता है। + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**When to use this** – ह्यूमन‑रीडेबल टेक्स्ट को डिसेबल करना ऑटोमेटेड सॉर्टिंग में सामान्य है जहाँ केवल मशीन‑रीडेबल पैटर्न मायने रखता है। बैकग्राउंड कलर सेट करने से यह सुनिश्चित होता है कि बारकोड ट्रांसपेरेंट मीडिया पर सही ढंग से प्रिंट हो। + +## Common pitfalls and pro tips + +| Issue | Why it happens | Fix | +|-------|----------------|-----| +| बारकोड खिंचा हुआ दिखता है | X‑डायमेंशन इमेज साइज के मुकाबले बहुत बड़ा है | अधिकांश पोस्टल बारकोड के लिए `XDimension.Pixels` को 2 से 5 के बीच रखें | +| स्कैनर इमेज को रिजेक्ट करता है | बार ऊँचाई पोस्टल सर्विस द्वारा निर्धारित न्यूनतम से कम है | RM4SCC के लिए `BarHeight.Pixels` ≥ 80 उपयोग करें, जब तक स्पेसिफ़िकेशन अन्यथा न कहे | +| PNG फ़ाइल साइज बड़ी है | इमेज रेज़ोल्यूशन आवश्यक से अधिक है | PNG‑8 (`BarCodeImageFormat.Png8`) के रूप में सहेजें या पिक्सेल डाइमेंशन कम करें | + +**Pro tip:** प्रोडक्शन में डिप्लॉय करने से पहले हमेशा वास्तविक स्कैनर से जेनरेटेड बारकोड का परीक्षण करें। छोटे विज़ुअल अंतर भी रीडेबिलिटी को प्रभावित कर सकते हैं। + +## Full source code + +नीचे दिया गया पूरा ब्लॉक एक नए कंसोल एप्लिकेशन (`Program.cs`) में कॉपी करें। आउटपुट पाथ को उस फ़ोल्डर में बदलें जहाँ आपका प्रोसेस लिख सकता है। + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +प्रोग्राम चलाने पर *“Barcodes generated successfully.”* प्रदर्शित होगा और दो PNG फ़ाइलें एक्सीक्यूटेबल की वर्किंग डायरेक्टरी में बनेंगी। + +## Conclusion + +अब आप **C# में Aspose.BarCode के साथ पोस्टल बारकोड जेनरेट** करना जानते हैं, जिसमें स्वचालित‑ऊँचाई वाले Planet बारकोड और फिक्स्ड‑ऊँचाई वाले RM4SCC बारकोड दोनों शामिल हैं। गाइड ने **कस्टम X‑डायमेंशन, बार ऊँचाई, और विज़ुअल विकल्पों** के साथ बारकोड जेनरेट करने का तरीका भी दिखाया, जो किसी भी मेल‑ऑटोमेशन प्रोजेक्ट के लिए ठोस आधार प्रदान करता है। + +अगले चरण जिन्हें आप एक्सप्लोर कर सकते हैं: + +* जेनरेटेड PNG को Aspose.PDF का उपयोग करके PDF इनवॉइस में इंटीग्रेट करें। +* आउटपुट फ़ॉर्मेट को SVG में बदलें ताकि स्केलेबल वेक्टर ग्राफ़िक्स मिलें। +* `BarcodeReader` क्लास का उपयोग करके एन्कोडेड डेटा को प्रोग्रामेटिकली वेरिफ़ाई करें। + +विभिन्न सिम्बोलॉजी (जैसे `EncodeTypes.Postnet`) के साथ प्रयोग करें और अपने परिणाम समुदाय के साथ शेयर करें। हैप्पी कोडिंग! + +## What Should You Learn Next? + +यहाँ कुछ ट्यूटोरियल्स हैं जो इस गाइड में दिखाए गए तकनीकों पर आधारित हैं और अतिरिक्त API फीचर्स को मास्टर करने में मदद करेंगे: + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/hongkong/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..43c96bdb8 --- /dev/null +++ b/barcode/hongkong/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,247 @@ +--- +category: general +date: 2026-08-19 +description: C# 條碼產生器教學示範如何產生 DataBar Expanded Stacked 條碼、客製化條碼大小,以及設定列與欄。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: zh-hant +lastmod: 2026-08-19 +og_description: C# 條碼產生器教學教您如何產生 DataBar 條碼、客製化尺寸,並設定列與欄以獲得精確輸出。 +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# 條碼產生器 – 客製化 DataBar 條碼逐步指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: C# 條碼產生器:建立自訂 DataBar 條碼 +url: /zh-hant/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# 條碼產生器:建立自訂 DataBar 條碼 + +如果您需要一個 **c# barcode generator** 能產生 DataBar Expanded Stacked 符號,本指南將完整說明如何使用自訂列與欄產生條碼影像。您將學會設定 databar 參數、調整條碼尺寸,並將結果儲存為 PNG 檔案。 + +以程式方式產生條碼可省去手動設計步驟,並確保跨平台輸出一致。在本教學中您將: + +* 安裝並參考 Aspose.BarCode for .NET 函式庫(或任何相容套件)。 +* 建立 DataBar Expanded Stacked 符號的條碼產生器。 +* **如何產生條碼** 影像,使用特定的欄與列設定。 +* **自訂條碼尺寸**,透過控制 DataBar 的列與欄。 +* **設定 databar 參數**,例如文字、格式與影像品質。 + +## 前置條件 + +* .NET 6.0 SDK 或更新版本已安裝。 +* C# 開發環境(Visual Studio、VS Code、Rider 等)。 +* NuGet 套件 `Aspose.BarCode`(或提供 `BarcodeGenerator`、`EncodeTypes`、`BarCodeImageFormat` 的等效函式庫)。 + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## 使用 C# 條碼產生器建立 DataBar 條碼 + +以下各節將逐步說明每個步驟。主要聚焦於 **c# barcode generator** API,但相同的模式亦適用於其他提供類似屬性的條碼函式庫。 + +### 步驟 1:使用範例文字初始化條碼產生器 + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*為何需要此步驟?* +`BarcodeGenerator` 是所有條碼產生工作的入口點。提供 `EncodeTypes.DatabarExpandedStacked` 列舉可告訴函式庫使用哪種符號,而文字參數則成為符號中編碼的可讀值。 + +### 步驟 2:設定欄數(使用預設列) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*為何需要此步驟?* +DataBar Expanded Stacked 符號由堆疊的線性元素組成。調整 `Columns` 屬性會改變水平密度,讓您在不增加整體高度的情況下容納較長的資料字串。這直接 **自訂條碼尺寸**。 + +### 步驟 3:儲存使用四欄的條碼影像 + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*您看到的:* +儲存的 `DatabarCols4.png` 影像顯示一個比預設更寬的 DataBar 條碼,因為它包含四個欄位。您可以使用任何影像檢視器開啟檔案以驗證輸出。 + +### 步驟 4:重新初始化產生器以設定新組態 + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*為何重新初始化?* +在保留先前欄設定的同時變更 `Rows` 屬性可能會產生意外的組合。從全新實例開始可確保只有預期的參數(`Rows`)會影響下一張影像。 + +### 步驟 5:設定列數(使用預設欄) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*為何需要此步驟?* +`Rows` 屬性控制垂直堆疊。增加列數會使條碼變高,當水平空間受限而垂直空間充裕時此方式相當有用。這是另一種 **自訂條碼尺寸** 的方法。 + +### 步驟 6:儲存使用三列的條碼影像 + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*結果:* +`DatabarRows3.png` 顯示一個有三個堆疊列的較高條碼,示範 **設定 databar 參數** 如何影響視覺外觀。 + +## 完整可執行範例 + +以下是一個完整的程式,您可以直接複製、貼上並執行。它包含所有引用、錯誤處理與說明註解,以便於閱讀。 + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**預期輸出** + +執行程式會產生兩個 PNG 檔案: + +* `DatabarCols4.png` – 具有四個欄位的寬闊 DataBar 條碼。 +* `DatabarRows3.png` – 具有三列的高大 DataBar 條碼。 + +開啟影像以確認條碼尺寸符合設定的參數。 + +## 常見問題與邊緣案例處理 + +| 問題 | 答案 | +|----------|--------| +| *如果我同時需要自訂列 **以及** 欄該怎麼辦?* | 在呼叫 `Save` 之前,於同一個 `BarcodeGenerator` 實例上同時設定 `Rows` **以及** `Columns`。函式庫會結合兩個值,產生所需大小的格子。 | +| *我可以更改影像格式嗎?* | 可以。將 `BarCodeImageFormat.Png` 替換為 `Jpeg`、`Bmp` 或 `Gif`,以符合您的工作流程。 | +| *當文字長度超過符號可容納的範圍時會發生什麼?* | 產生器會拋出 `ArgumentException`。請縮短文字或增加 `Columns`/`Rows` 以提供更大的容量。 | +| *有沒有方法設定 DPI 或影像解析度?* | 在儲存之前使用 `generator.Parameters.ImageResolution` 來指定所需的 DPI。這可進一步 **自訂條碼尺寸**,以符合高解析度列印需求。 | +| *函式庫是否支援其他 DataBar 變體?* | 支援。將 `EncodeTypes.DatabarExpandedStacked` 替換為 `DatabarExpanded`、`DatabarLimited` 等,同時保留相同的參數結構。 | + +## 可靠條碼產生的技巧 + +* **專業提示:** 在將產生的影像部署至正式環境前,務必使用掃描器或行動應用程式驗證。 +* **注意:** 空的或不存在的輸出目錄——若路徑不存在,`Save` 會拋出例外。必要時可程式化建立資料夾。 +* **效能說明:** 在迴圈中產生大量條碼時,重複使用同一個 `BarcodeGenerator` 實例,僅變更 `Rows` 或 `Columns`,可減少物件建立的開銷。 + +## 結論 + +您現在已了解如何使用 **c# barcode generator** 來 **建立 databar 條碼** 影像、**自訂條碼尺寸**,以及 **設定 databar 參數**(如列與欄)。透過調整這些設定,您可以將條碼符合任何版面需求,同時保持掃描可靠性。 + +接下來,您可以探索相關主題,如 **如何產生條碼** PDF、在報表中嵌入條碼,或切換至其他符號(QR、Code‑128 等)。嘗試不同的 `Rows`、`Columns` 與影像解析度,以找出最適合您使用情境的組態。 + +--- + +## 接下來該學什麼? + +以下教學涵蓋與本指南緊密相關的主題,並以此為基礎。每個資源皆提供完整可執行的程式碼範例與逐步說明,協助您精通更多 API 功能,並在專案中探索替代實作方式。 + +- [如何產生與調整單維 DataBar 條碼高度(使用 Aspose.BarCode for .NET)](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [使用 Aspose.BarCode .NET API 產生單維 DataBar 2D 條碼](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [使用 .NET API 產生 Aspose.BarCode DataBar 條碼 – 列與欄設定](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/hongkong/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..274e466d4 --- /dev/null +++ b/barcode/hongkong/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,215 @@ +--- +category: general +date: 2026-08-19 +description: 學習如何在 C# 中產生條碼 PNG 檔案並調整其高度,涵蓋如何輕鬆產生條碼圖像及變更條碼高度。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: zh-hant +lastmod: 2026-08-19 +og_description: 在 C# 中建立條碼 PNG 檔案,學習如何產生條碼圖像、調整條碼高度,以及更改條碼高度以獲得最佳掃描效果。 +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: 在 C# 中建立條碼 PNG 檔案 – 步驟說明指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: 如何在 C# 中建立可調整高度的條碼 PNG 檔案 +url: /zh-hant/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何在 C# 中建立可調整高度的條碼 PNG 檔案 + +如果你需要在 C# 中建立 **barcode PNG file**,本指南將一步步說明。你將看到完整、可執行的範例,示範 **how to generate barcode** 圖片以及如何 **adjust barcode height** 以因應不同使用情境。 + +產生 barcode PNG file 是庫存系統、銷售點終端機以及任何需要列印或顯示機器可讀資料的應用程式的常見需求。完成本教學後,你將能夠變更條碼高度、儲存多個 PNG 檔案,並了解高度對掃描可靠性的影響。 + +## 前置條件 + +* 已安裝 .NET 6.0 SDK 或更新版本 +* Visual Studio 2022(或任何支援 .NET 的 IDE) +* **Aspose.BarCode for .NET** NuGet 套件(範例程式碼使用此函式庫) + +你可以從指令列加入此套件: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Aspose.BarCode 的免費評估版可用於開發與測試。正式環境請取得授權金鑰。 + +## 安裝條碼函式庫 + +第一步是在專案中參考此函式庫。於 C# 檔案的最上方加入以下 `using` 指令: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +這些命名空間讓你可以使用 `BarcodeGenerator`、`EncodeTypes` 與 `BarCodeImageFormat`。 + +## 建立 barcode PNG 檔案 + +現在我們建立一個 `BarcodeGenerator` 實例,以產生 **barcode PNG file**。範例使用 Databar OmniDirectional 符號,但你可以將 `EncodeTypes.DatabarOmniDirectional` 替換為任何支援的類型。 + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +字串 `"(01)12345678901231"` 符合 GS1 應用程式識別碼的 14 位 GTIN 格式。請依你的產品識別碼調整此資料。 + +## 設定 X‑dimension(可選) + +X‑dimension 定義單一條碼模組的寬度。以像素為單位的數值可讓你精確控制影像大小。 + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +`2` 像素的數值在大多數螢幕顯示上表現良好。若列印時需要較大的條碼,請將其調高。 + +## 調整條碼高度並儲存 barcode PNG 檔案 + +**BarHeight** 屬性控制條紋的垂直尺寸。變更此數值即可 **adjust barcode height**,且不會影響編碼資料。 + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +檔案 `DatabarBarHeight30Pixels.png` 現在是一個高 30 像素的 **barcode PNG file**。 + +若要 **change barcode height** 並建立第二張影像,只需指定新數值再呼叫 `Save` 即可: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +現在你擁有兩個 PNG 檔案——一個 30 px,另一個 60 px——示範如何即時 **adjust barcode height**。 + +### 為何條碼高度重要 + +* **Readability:** 掃描器需要最低高度才能可靠偵測。條碼過短可能被忽略,特別是在低解析度相機下。 +* **Aesthetics:** 將條碼高度與周圍設計元素匹配,可打造更整潔的 UI。 +* **Print constraints:** 某些標籤印表機的高度槽位固定,調整條碼高度可確保能夠放入。 + +**Best practice:** 保持高度為 X‑dimension 的倍數(例如 X‑dimension 為 2 px 時,高度為 30 px),以維持比例並避免失真。 + +## 完整範例 + +以下是完整、獨立的程式碼,你可以直接貼到主控台應用程式中,即刻執行。 + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**預期輸出** + +執行程式會在可執行檔的工作目錄中產生兩個檔案: + +* `DatabarBarHeight30Pixels.png` – 高 30 像素的 barcode PNG file +* `DatabarBarHeight60Pixels.png` – 高 60 像素的 barcode PNG file + +使用任何影像檢視器開啟任一 PNG,你會看到清晰的 Databar OmniDirectional 條碼,已可供掃描。 + +## 邊緣情況與故障排除 + +| 情況 | 檢查項目 | 建議修正 | +|-----------|---------------|-----------------| +| 條碼模糊不清 | X‑dimension 對所選高度過低 | 將 `XDimension.Pixels` 提升(例如從 2 增至 3) | +| 掃描器在低高度條碼上失敗 | 高度低於掃描器的最小要求 | 將 `BarHeight.Pixels` 設為至少 30 px(或依掃描器規格) | +| PNG 檔案為空或損毀 | 輸出路徑無效或寫入權限被拒 | 使用絕對路徑或確保應用程式具有寫入權限 | +| 需要不同的符號系統 | 目前的 `EncodeTypes` 不適用 | 將 `EncodeTypes.DatabarOmniDirectional` 替換為其他列舉值(例如 `EncodeTypes.Code128`) | + +## 常見問題 + +**Q: 我可以產生其他影像格式(JPEG、BMP)嗎?** +A: 可以。將 `BarCodeImageFormat.Png` 替換為 `BarCodeImageFormat.Jpeg`、`BarCodeImageFormat.Bmp` 等。 + +**Q: 如何在網頁中嵌入 PNG?** +A: 透過 HTTP 端點提供產生的 PNG,或將其轉換為 Base64 字串,放入 `` 標籤的 `src` 屬性中。 + +**Q: 有辦法設定背景顏色嗎?** +A: 使用 `generator.Parameters.Image.BackgroundColor = Color.White;`(或任意 `System.Drawing.Color`)。 + +## 結論 + +現在你已了解如何在 C# 中 **generate a barcode PNG file**,並精確 **adjust barcode height** 以符合掃描或設計需求。透過變更 `BarHeight.Pixels` 屬性,你可以即時 **change barcode height**,並從同一段程式碼產生多個 PNG 資產。 + +接下來,可探索其他自訂選項,如前景色、邊距,以及加入可讀文字。你也可以嘗試不同的符號系統(`EncodeTypes.Code128`、`EncodeTypes.QR`),以擴展可編碼的資料類型。 + +祝程式開發順利,願你的條碼一次即能成功掃描! + +## 接下來該學什麼? + +以下教學涵蓋與本指南緊密相關的主題,並在此基礎上進一步說明。每個資源皆提供完整可執行的程式碼範例與逐步說明,協助你精通其他 API 功能,並在自己的專案中探索替代實作方式。 + +- [如何使用 Aspose.BarCode for .NET 產生與調整一維 Databar 條碼高度](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [如何產生條碼 - 一維條碼類型](/barcode/english/net/one-dimensional-barcode-types/) +- [如何使用 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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/hongkong/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..578e34257 --- /dev/null +++ b/barcode/hongkong/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,155 @@ +--- +category: general +date: 2026-08-19 +description: 使用 Aspose.BarCode 在 C# 中建立 databar PNG 檔案。了解如何產生 databar 圖像、設定 databar + 參數,並儲存 PNG 輸出。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: zh-hant +lastmod: 2026-08-19 +og_description: 使用 Aspose.BarCode 在 C# 中建立 DataBar PNG 檔案。本教學將逐步說明如何產生 DataBar 圖像、設定 + DataBar 參數(如 X 尺寸與長寬比),以及將高品質 PNG 檔案儲存供列印或網頁使用。 +og_image_alt: create databar PNG example +og_title: 在 C# 中建立 DataBar PNG 圖像 – 逐步指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: 如何使用 C# 與 Aspose.BarCode 建立 DataBar PNG 圖像 +url: /zh-hant/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何使用 C# 與 Aspose.BarCode 建立 databar PNG 圖片 + +如果您需要在 .NET 應用程式中 **建立 databar PNG** 檔案,本指南將逐步說明。您將看到一個完整、可執行的範例,產生堆疊全方向 DataBar 條碼、設定關鍵參數,並以不同長寬比儲存兩個 PNG 檔案。 + +產生 DataBar 圖片不只是呼叫單一方法。您還必須 **設定 databar 參數**,例如 X‑dimension(模組寬度)與長寬比,以符合列印或掃描規格。完成本教學後,您將了解 **如何產生 databar** 圖形,並能在實務情境中可靠運作。 + +## 前置條件 + +- .NET 6.0 或更新版本(此程式碼亦可於 .NET Framework 4.7+ 執行) +- Visual Studio 2022 或任何相容 C# 的 IDE +- 有效的 **Aspose.BarCode for .NET** 授權(免費評估版可用於測試) +- 基本的 C# 語法熟悉度 + +> **專業提示:** 若您尚未取得授權,可從 Aspose 入口網站申請暫時的評估金鑰。API 行為相同,僅會顯示浮水印。 + +## 步驟 1:安裝 Aspose.BarCode NuGet 套件 + +在 Visual Studio 中開啟您的專案,於解決方案上點右鍵,選取 **Manage NuGet Packages**。搜尋 `Aspose.BarCode` 並安裝最新的穩定版。 + +```bash +dotnet add package Aspose.BarCode +``` + +此指令會將 `Aspose.BarCode` 程式集加入您的專案,並使 `BarcodeGenerator` 類別可用。 + +## 步驟 2:為堆疊全方向 DataBar 初始化條碼產生器 + +`BarcodeGenerator` 建構子接受兩個參數:條碼類型與原始資料字串。若要產生堆疊全方向 DataBar,請使用 `EncodeTypes.DatabarStackedOmniDirectional`。 + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**為何重要:** `EncodeTypes.DatabarStackedOmniDirectional` 常數告訴函式庫產生可從任何方向讀取的條碼,這對零售貨架標籤而言相當理想。 + +## 步驟 3:以像素設定 X‑dimension(模組寬度) + +X‑dimension 控制最小條紋元素的大小。以像素設定可讓您精確掌握最終影像尺寸。 + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +**2 像素**的數值在大多數標籤印表機上兼具可讀性與緊湊性。如需較大或較小的模組,可自行調整此數值。 + +## 步驟 4:設定第一個長寬比並儲存 PNG + +長寬比會影響堆疊 DataBar 的高度。長寬比為 **15** 時會產生相對較短的條碼,而 **30** 則會使其較高。 + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +`Save` 方法會將產生的條碼寫入 PNG 檔案。PNG 為無損格式,可保留條碼掃描器所需的清晰邊緣。 + +## 步驟 5:變更長寬比並儲存第二個 PNG + +您只需變更長寬比,即可重複使用相同的 `BarcodeGenerator` 實例產生不同變化。 + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +現在您擁有兩個 PNG 檔案 — `DatabarAspectRatio15.png` 與 `DatabarAspectRatio30.png`,它們的視覺密度各不相同。 + +## 步驟 6:驗證輸出結果 + +在任何影像檢視器中開啟產生的 PNG 檔案。您應該會看到清晰、高對比度的 DataBar 條碼。使用智慧手機條碼掃描器掃描圖像,可確認兩種長寬比皆能正確解碼為原始 GTIN 值 `12345678901231`。 + +![create databar PNG example](databar_example.png) + +*上圖顯示兩個 PNG 檔案並排比較。左側圖像使用長寬比 15,右側使用長寬比 30。* + +## 常見變形與邊緣情況 + +| Scenario | What to change | Reason | +|----------|----------------|--------| +| **不同資料** | Replace the string `(01)12345678901231` with any valid GS1 Application Identifier and data | 允許您編碼產品編號、序號等 | +| **更高解析度** | Increase `XDimension.Pixels` to 3 or 4 | 當條碼需以較大尺寸列印或遠距離掃描時需要 | +| **其他 DataBar 類型** | Use `EncodeTypes.DatabarStacked` or `EncodeTypes.DatabarExpanded` | 選擇最適合您標籤版面的類型 | +| **透明背景** | Pass `BarCodeImageFormat.Png` with `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | 適用於將條碼覆蓋於彩色標籤上 | + +> **注意:** 設定過小的 X‑dimension(< 1 像素)可能會產生模糊的條碼,導致 + +## 接下來您應該學習什麼? + +以下教學涵蓋與本指南密切相關的主題,並在此基礎上進一步說明。每個資源皆提供完整可執行的程式碼範例與逐步說明,協助您精通其他 API 功能,並在專案中探索替代實作方式。 + +- [如何使用 Aspose.BarCode for .NET 產生與調整一維 Databar 條碼高度](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [使用 Aspose.BarCode 建立一維 Databar GS1 編碼](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [使用 .NET API 產生 Aspose.BarCode Databar 條碼 – 行與列配置](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/hongkong/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..d64fd3db2 --- /dev/null +++ b/barcode/hongkong/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,210 @@ +--- +category: general +date: 2026-08-19 +description: 學習如何使用 Aspere.BarCode 在 C# 中產生郵政條碼。本分步指南說明如何產生 Planet 與 RM4SCC 格式的條碼。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: zh-hant +lastmod: 2026-08-19 +og_description: 使用 Aspose.BarCode 在 C# 中生成郵政條碼。請參考本指南,了解如何以自訂尺寸生成 Planet 與 RM4SCC + 條碼。 +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: 在 C# 中生成郵政條碼 – 完整的 Aspose.BarCode 指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: 如何在 C# 中使用 Aspose.BarCode 產生郵政條碼 +url: /zh-hant/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何在 C# 中使用 Aspose.BarCode 產生郵政條碼 + +如果您需要 **產生郵政條碼** 以供郵寄應用程式使用,本指南將一步步示範如何使用 Aspose.BarCode 函式庫產生條碼。您將看到完整、可執行的範例,建立自動計算高度的 Planet 條碼以及具有明確條碼高度的 RM4SCC 條碼。 + +產生郵政條碼是物流軟體、自動標籤印表機與大量郵寄系統的常見需求。完成本教學後,您將能在任何 .NET 專案中整合條碼產生、調整 X‑dimension(模組寬度),以及在標準格式允許的情況下控制條碼高度。 + +**您將學到的內容** + +* 如何在 C# 專案中設定 Aspose.BarCode。 +* 如何產生 Planet 與 RM4SCC 郵政條碼。 +* 如何調整 X‑dimension(模組寬度)與條碼高度。 +* 如何將結果儲存為 PNG 圖片。 + +不需要任何外部服務——只要引用 Aspose.BarCode NuGet 套件,即可在本機執行。 + +## 前置條件 + +* .NET 6.0 SDK 或更新版本(此程式碼亦支援 .NET Framework 4.7+)。 +* Visual Studio 2022、Visual Studio Code,或您慣用的任何 C# IDE。 +* Aspose.BarCode for .NET 套件 – 透過 NuGet 安裝: + +```bash +dotnet add package Aspose.BarCode +``` + +## 使用 Aspose.BarCode 產生郵政條碼 + +以下各節將逐步說明,從建立產生器物件到儲存最終 PNG 檔案。 + +### 步驟 1:建立 Planet 條碼(自動高度) + +Planet 是許多國家用於郵件分揀的郵政條碼。建立 Planet 條碼時,函式庫會自動根據編碼資料決定最佳條碼高度。 + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**為什麼這樣寫** – `EncodeTypes.Planet` 告訴 Aspose.BarCode 使用 Planet 符號。`XDimension` 屬性控制最小條的寬度(模組寬度)。因為 Planet 不需要固定條碼高度,函式庫會自動計算合適的高度,讓程式碼更簡潔。 + +### 步驟 2:建立具有明確高度的 RM4SCC 條碼 + +RM4SCC 是另一種郵政符號,通常需要特定的條碼高度以符合掃描器規格。以下程式碼示範如何手動設定該高度。 + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**為什麼要設定高度** – 某些郵政掃描器要求最小條碼高度。將 `BarHeight.Pixels = 100` 後,即可保證產生的圖像符合此需求。X‑dimension 與 Planet 條碼保持一致,讓兩張圖的視覺密度相同。 + +### 步驟 3:驗證輸出 + +執行程式後,開啟 `YOUR_DIRECTORY` 中的兩個 PNG 檔案。您應該會看到兩個不同的條碼: + +* `PostalPlanetBarHeightNone.png` – 以自動計算高度的 Planet 條碼。 +* `PostalRM4SCCBarHeight100Pixels.png` – 條碼高度為 100 像素的 RM4SCC 條碼。 + +兩張圖皆可直接送入標籤印表機或在 Web 應用程式中顯示。 + +![使用 Aspose.BarCode 產生的郵政條碼圖像](generated-postal-barcode.png) + +*圖片說明:* **產生的郵政條碼** 圖像,使用 Aspose.BarCode(示範如何產生郵政條碼)。 + +## 如何使用自訂尺寸產生條碼(進階) + +若您需要微調其他參數——例如邊距、文字位置或顏色——Aspose.BarCode 提供功能豐富的 `Parameters` 物件。以下範例示範如何加入白色背景並停用可讀文字。 + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**何時使用** – 在自動分揀只需機器可讀圖樣時,常會停用可讀文字。設定背景顏色可確保條碼在透明介質上正確列印。 + +## 常見問題與專業技巧 + +| 問題 | 為什麼會發生 | 解決方式 | +|------|--------------|----------| +| 條碼看起來被拉伸 | X‑dimension 相對於圖像尺寸過大 | 大多數郵政條碼將 `XDimension.Pixels` 保持在 2 到 5 之間 | +| 掃描器拒絕圖像 | 條碼高度低於郵政服務規定的最小值 | 對 RM4SCC 使用 `BarHeight.Pixels` ≥ 80,除非規範另有說明 | +| PNG 檔案太大 | 圖像解析度高於需求 | 使用 PNG‑8 (`BarCodeImageFormat.Png8`) 或降低像素尺寸 | + +**專業技巧:** 在投入正式環境前,務必使用實體掃描器測試產生的條碼。細微的視覺差異可能影響可讀性。 + +## 完整原始碼 + +將下列程式碼完整複製到新的主控台應用程式 (`Program.cs`) 中。請將輸出路徑調整為您的程式可寫入的資料夾。 + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +執行程式後會在執行目錄印出 *“Barcodes generated successfully.”*,並產生兩個 PNG 檔案。 + +## 結論 + +您現在已掌握如何在 C# 中使用 Aspose.BarCode **產生郵政條碼**,包括自動高度的 Planet 條碼與固定高度的 RM4SCC 條碼。本指南亦示範了如何以自訂 X‑dimension、條碼高度與視覺選項產生條碼,為任何郵寄自動化專案奠定堅實基礎。 + +接下來可以探索的方向: + +* 使用 Aspose.PDF 將產生的 PNG 嵌入 PDF 發票。 +* 將輸出格式切換為 SVG,以取得可縮放向量圖形。 +* 使用 `BarcodeReader` 類別以程式方式驗證編碼資料。 + +歡迎嘗試不同的符號(例如 `EncodeTypes.Postnet`),並將您的成果分享給社群。祝開發順利! + + +## 接下來該學什麼? + +以下教學與本指南緊密相關,能進一步深化您所學的技巧。每個資源皆提供完整可執行的程式碼範例與逐步說明,協助您掌握更多 API 功能,並在自己的專案中探索替代實作方式。 + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/hungarian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..5ebbc4585 --- /dev/null +++ b/barcode/hungarian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,252 @@ +--- +category: general +date: 2026-08-19 +description: A C# vonalkód-generátor oktatóanyag bemutatja, hogyan lehet DataBar Expanded + Stacked vonalkódokat generálni, a vonalkód méretét testreszabni, valamint a sorokat + és oszlopokat beállítani. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: hu +lastmod: 2026-08-19 +og_description: A C# vonalkód-generátor oktatóanyaga megtanítja, hogyan generálj DataBar + vonalkódokat, testre szabhatod a méretet, és beállíthatod a sorokat és oszlopokat + a pontos kimenet érdekében. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# vonalkód generátor – lépésről‑lépésre útmutató egyedi DataBar vonalkódokhoz +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C# vonalkód-generátor: egyedi DataBar vonalkódok létrehozása' +url: /hu/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# vonalkód generátor: egyedi DataBar vonalkódok létrehozása + +Ha **c# barcode generator**-ra van szükséged, amely DataBar Expanded Stacked szimbólumokat tud előállítani, ez az útmutató pontosan megmutatja, hogyan generálj vonalkód képeket egyedi sorokkal és oszlopokkal. Megtanulod, hogyan konfiguráld a databar paramétereket, állítsd be a vonalkód méretét, és mentsd el az eredményt PNG fájlokként. + +A vonalkódok programozott generálása eltávolítja a manuális tervezési lépéseket, és biztosítja a konzisztens kimenetet a különböző platformokon. Ebben az útmutatóban a következőket fogod megtanulni: + +* Telepítsd és hivatkozz az Aspose.BarCode for .NET könyvtárra (vagy bármely kompatibilis csomagra). +* Hozz létre egy vonalkód generátort a DataBar Expanded Stacked szimbólumhoz. +* **How to generate barcode** képek specifikus oszlop- és sorbeállításokkal. +* **Customize barcode size** a DataBar sorok és oszlopok vezérlésével. +* **Configure databar parameters** például szöveg, formátum és képminőség. + +## Előfeltételek + +* .NET 6.0 SDK vagy újabb telepítve. +* C# fejlesztői környezet (Visual Studio, VS Code, Rider, stb.). +* NuGet csomag `Aspose.BarCode` (vagy egy ekvivalens könyvtár, amely biztosítja a `BarcodeGenerator`, `EncodeTypes` és `BarCodeImageFormat` osztályokat). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## A C# vonalkód generátor használata DataBar vonalkódok létrehozásához + +Az alábbi szakaszok lépésről lépésre végigvezetnek. Az elsődleges fókusz a **c# barcode generator** API, de ugyanaz a minta más vonalkód könyvtárakra is alkalmazható, amelyek hasonló tulajdonságokat biztosítanak. + +### 1. lépés: A vonalkód generátor inicializálása minta szöveggel + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Miért ez a lépés?* +A `BarcodeGenerator` a belépési pont minden vonalkód létrehozási feladathoz. Az `EncodeTypes.DatabarExpandedStacked` enum megadása azt jelzi a könyvtárnak, melyik szimbólumot kell használni, míg a szöveg argumentum a szimbólumban kódolt emberi olvasható értékké válik. + +### 2. lépés: Az oszlopok számának beállítása (alapértelmezett sorok használva) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Miért ez a lépés?* +A DataBar Expanded Stacked szimbólumok egymásra rakott lineáris elemekből állnak. A `Columns` tulajdonság módosítása a vízszintes sűrűséget változtatja, lehetővé téve hosszabb adatkarakterláncok elhelyezését a magasság növelése nélkül. Ez közvetlenül **customizes barcode size**. + +### 3. lépés: A négy oszlopot használó vonalkód kép mentése + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Mit látsz:* +A mentett `DatabarCols4.png` kép egy DataBar vonalkódot mutat, amely szélesebb az alapértelmezettnél, mivel négy oszlopot tartalmaz. A fájlt bármely képmegjelenítőben megnyithatod a kimenet ellenőrzéséhez. + +### 4. lépés: Új konfigurációhoz a generátor újrainicializálása + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Miért újrainicializálunk?* +A `Rows` tulajdonság módosítása a korábbi oszlopbeállítás megtartása mellett váratlan kombinációt eredményezhet. Egy friss példány használata biztosítja, hogy csak a kívánt paraméter (`Rows`) befolyásolja a következő képet. + +### 5. lépés: A sorok számának beállítása (alapértelmezett oszlopok használva) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Miért ez a lépés?* +A `Rows` tulajdonság a függőleges halmozást szabályozza. A sorok növelése magasabb vonalkódot eredményez, ami akkor hasznos, ha a hely vízszintesen korlátozott, de függőlegesen bőven rendelkezésre áll. Ez egy másik módja a **customize barcode size**-nak. + +### 6. lépés: A három sort használó vonalkód kép mentése + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Eredmény:* +A `DatabarRows3.png` egy magasabb vonalkódot mutat három egymásra rakott sorral, bemutatva, hogy a **configure databar parameters** hogyan befolyásolja a vizuális megjelenést. + +## Teljes futtatható példa + +Az alábbi teljes programot másolhatod, beillesztheted és futtathatod. Tartalmazza az összes importot, hibakezelést és a tisztaság kedvéért megjegyzéseket. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Várható kimenet** + +A program futtatása két PNG fájlt hoz létre: + +* `DatabarCols4.png` – egy széles DataBar vonalkód négy oszloppal. +* `DatabarRows3.png` – egy magas DataBar vonalkód három sorral. + +Nyisd meg a képeket, hogy megerősítsd, a vonalkód méretei megegyeznek a konfigurált paraméterekkel. + +## Gyakori kérdések és szélsőséges esetek kezelése + +| Kérdés | Válasz | +|----------|--------| +| *Mi van, ha egyszerre kell egyedi sorok **és** oszlopok?* | Állítsd be a `Rows` **és** a `Columns` értékeket ugyanazon `BarcodeGenerator` példányon a `Save` hívása előtt. A könyvtár a két értéket kombinálva állítja elő a kért méretű rácsot. | +| *Megváltoztatható a képformátum?* | Igen. Cseréld le a `BarCodeImageFormat.Png`-t `Jpeg`, `Bmp` vagy `Gif` értékre a munkafolyamatodnak megfelelően. | +| *Mi történik, ha a szöveg hosszabb, mint a szimbólum befogad?* | A generátor `ArgumentException`-t dob. Rövidítsd a szöveget vagy növeld a `Columns`/`Rows` értékeket a nagyobb kapacitás érdekében. | +| *Lehet DPI-t vagy képfelbontást beállítani?* | Használd a `generator.Parameters.ImageResolution`-t a kívánt DPI megadásához a mentés előtt. Ez tovább **customizes barcode size** a nagy felbontású nyomtatáshoz. | +| *Támogatja a könyvtár a DataBar egyéb változatait?* | Igen. Cseréld le a `EncodeTypes.DatabarExpandedStacked`-t `DatabarExpanded`, `DatabarLimited` stb.-re, miközben a paraméterstruktúra változatlan marad. | + +## Tippek a megbízható vonalkód generáláshoz + +* **Pro tipp:** Mindig ellenőrizd a generált képet egy szkennerrel vagy mobilalkalmazással, mielőtt éles környezetbe helyeznéd. +* **Vigyázz:** Null vagy üres kimeneti könyvtárak – a `Save` kivételt dob, ha az útvonal nem létezik. Szükség esetén programból hozd létre a mappát. +* **Teljesítmény:** Egyetlen `BarcodeGenerator` példány újrafelhasználása és csak a `Rows` vagy `Columns` módosítása csökkentheti az objektum‑létrehozási terhelést, ha sok vonalkódot generálsz egy ciklusban. + +## Következtetés + +Most már tudod, hogyan használj egy **c# barcode generator**-t **databar vonalkód** képek **létrehozásához**, **a vonalkód méretének testreszabásához**, és **databar paraméterek** (sorok, oszlopok) konfigurálásához. Ezeknek a beállításoknak a módosításával bármilyen elrendezési követelménynek megfelelhetsz, miközben megőrzöd a beolvasási megbízhatóságot. + +Ezután fedezd fel a kapcsolódó témákat, például **hogyan generálj vonalkód PDF‑eket**, vonalkódok beágyazása jelentésekbe, vagy más szimbólumkészletek (QR, Code‑128 stb.) használata. Kísérletezz különböző `Rows`, `Columns` és képfelbontásokkal, hogy megtaláld a legoptimálisabb konfigurációt a saját felhasználási esetedhez. + +--- + + +## Mit érdemes még megtanulni? + +Az alábbi oktatóanyagok szorosan kapcsolódnak a bemutatott technikákhoz, és további API‑funkciók elsajátítását, valamint alternatív megvalósítási megközelítéseket segítik elő a saját projektjeidben. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/hungarian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..e8cc98086 --- /dev/null +++ b/barcode/hungarian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: Tanulja meg, hogyan generáljon vonalkód PNG fájlt C#-ban, és állítsa + be a magasságát, bemutatva, hogyan hozhat létre vonalkód képeket, és hogyan változtathatja + meg a vonalkód magasságát egyszerűen. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: hu +lastmod: 2026-08-19 +og_description: Készítsen vonalkód PNG fájlt C#-ban, és tanulja meg, hogyan generáljon + vonalkód képeket, állítsa be a vonalkód magasságát, és módosítsa a vonalkód magasságát + az optimális beolvasáshoz. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Barcode PNG fájl létrehozása C#‑ban – lépésről lépésre útmutató +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Hogyan készítsünk állítható magasságú vonalkód PNG fájlt C#-ban +url: /hu/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hogyan hozzunk létre egy barcode PNG fájlt állítható magassággal C#-ban + +Ha C#-ban **barcode PNG fájlt** kell létrehoznod, ez az útmutató pontosan megmutatja, hogyan. Egy teljes, futtatható példát láthatsz, amely bemutatja, **hogyan generáljunk barcode** képeket, és hogyan **állítható a barcode magassága** különböző felhasználási esetekhez. + +A barcode PNG fájl generálása gyakori igény készletkezelő rendszerekben, értékesítési termináloknál és bármely olyan alkalmazásban, amelynek géppel olvasható adatot kell nyomtatnia vagy megjelenítenie. A tutorial végére képes leszel módosítani a barcode magasságát, több PNG fájlt menteni, és megérteni a magasság hatását a beolvasás megbízhatóságára. + +## Előfeltételek + +* .NET 6.0 SDK vagy újabb telepítve +* Visual Studio 2022 (vagy bármely IDE, amely támogatja a .NET-et) +* Az **Aspose.BarCode for .NET** NuGet csomag (a kódminta ezt a könyvtárat használja) + +A csomagot a parancssorból adhatod hozzá: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Az Aspose.BarCode ingyenes értékelő verziója fejlesztéshez és teszteléshez használható. Termeléshez szerezz licenc kulcsot. + +## A barcode könyvtár telepítése + +Az első lépés a könyvtár hivatkozása a projektben. Add hozzá a következő `using` direktívákat a C# fájlod tetejéhez: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Ezek a névterek hozzáférést biztosítanak a `BarcodeGenerator`, `EncodeTypes` és `BarCodeImageFormat` osztályokhoz. + +## Hozd létre a barcode PNG fájlt + +Most egy `BarcodeGenerator` példányt hozunk létre, amely **barcode PNG fájlt** fog kiadni. A példa a Databar OmniDirectional szimbólumot használja, de a `EncodeTypes.DatabarOmniDirectional` értéket bármely támogatott típussal helyettesítheted. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +A `"(01)12345678901231"` karakterlánc a GS1 Alkalmazási Azonosító formátumot követi egy 14 számjegyű GTIN-hez. Igazítsd az adatot a saját termékazonosítóidhoz. + +## Állítsd be az X‑dimenziót (opcionális) + +Az X‑dimenzió meghatározza egyetlen barcode modul szélességét. A pixel‑alapú érték pontos kontrollt ad a kép mérete felett. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +A `2` pixel érték a legtöbb képernyőn jól működik. Növeld, ha nyomtatáskor nagyobb barcode-ra van szükséged. + +## Állítsd be a barcode magasságát és mentsd el a barcode PNG fájlt + +A **BarHeight** tulajdonság szabályozza a vonalak függőleges méretét. Ennek az értéknek a módosításával **állítható a barcode magassága** anélkül, hogy a kódolt adatot befolyásolná. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +A `DatabarBarHeight30Pixels.png` fájl most egy **barcode PNG fájl**, amely 30 pixel magas. + +A **barcode magasságának megváltoztatásához** és egy második kép létrehozásához egyszerűen rendelj új értéket, majd hívd újra a `Save` metódust: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Most már két PNG fájlod van – egy 30 px, a másik 60 px magasságú – ami bemutatja, hogyan **állítható a barcode magassága** valós időben. + +### Miért fontos a vonalmagasság + +* **Olvashatóság:** A szkennerek megbízható detektáláshoz minimális magasságot várnak. Túl alacsony barcode esetén a szkenner kihagyhatja, különösen alacsony felbontású kamerák esetén. +* **Esztétika:** A barcode magasságának a környező tervezési elemekhez igazítása tisztább felhasználói felületet eredményez. +* **Nyomtatási korlátok:** Egyes címkényomtatóknak rögzített magasságú nyílásai vannak; a barcode magasságának beállítása biztosítja, hogy beleférjen. + +**Legjobb gyakorlat:** Tartsd a magasságot az X‑dimenzió többszörösében (pl. 30 px, ha az X‑dimenzió 2 px), hogy megőrizd az arányt és elkerüld a torzulást. + +## Teljes példa + +Az alábbi teljes, önálló programot beillesztheted egy konzolalkalmazásba, és azonnal futtathatod. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Várható kimenet** + +A program futtatása két fájlt hoz létre a végrehajtható munkakönyvtárában: + +* `DatabarBarHeight30Pixels.png` – egy 30 pixel magas barcode PNG fájl +* `DatabarBarHeight60Pixels.png` – egy 60 pixel magas barcode PNG fájl + +Nyisd meg bármelyik PNG-t egy képmegjelenítővel; egy tiszta Databar OmniDirectional barcode-ot látsz, amely készen áll a beolvasásra. + +## Szélsőséges esetek és hibaelhárítás + +| Helyzet | Mit ellenőrizzen | Javasolt megoldás | +|-----------|---------------|-----------------| +| A barcode elmosódott | Az X‑dimension túl alacsony a választott magassághoz | Növeld az `XDimension.Pixels` értékét (pl. 2‑ről 3‑ra) | +| A szkenner nem működik alacsony magasságú barcode esetén | A magasság a szkenner minimuma alatt | Állítsd be a `BarHeight.Pixels` értékét legalább 30 px-re (vagy a szkenner specifikációja szerint) | +| A PNG fájl üres vagy sérült | Érvénytelen kimeneti útvonal vagy írási jogosultság megtagadva | Használj abszolút útvonalat vagy biztosítsd, hogy az alkalmazásnak írási jogosultsága legyen | +| Más szimbólumra van szükség | A jelenlegi `EncodeTypes` nem megfelelő | Cseréld le a `EncodeTypes.DatabarOmniDirectional`-t egy másik enum értékre (pl. `EncodeTypes.Code128`) | + +## Gyakran feltett kérdések + +**Q: Generálhatok más képformátumokat (JPEG, BMP)?** +A: Igen. Cseréld le a `BarCodeImageFormat.Png` értéket `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` stb.-re. + +**Q: Hogyan ágyazhatom be a PNG-t egy weboldalba?** +A: Szolgáld ki a generált PNG-t egy HTTP végponton keresztül, vagy konvertáld Base64 stringgé, és helyezd az `` tag `src` attribútumába. + +**Q: Van lehetőség a háttérszín beállítására?** +A: Használd a `generator.Parameters.Image.BackgroundColor = Color.White;` kódot (vagy bármely `System.Drawing.Color` értéket). + +## Következtetés + +Most már tudod, hogyan **generálj barcode PNG fájlt** C#-ban, és hogyan **állítsd be pontosan a barcode magasságát** a beolvasási vagy tervezési követelményeknek megfelelően. A `BarHeight.Pixels` tulajdonság módosításával **valós időben változtathatod a barcode magasságát**, és egyetlen kódbázisból több PNG eszközt hozhatsz létre. + +Ezután fedezd fel a további testreszabási lehetőségeket, például az előtérszínt, margókat és a humán‑olvasható szöveg hozzáadását. Kísérletezhetsz különböző szimbólumokkal (`EncodeTypes.Code128`, `EncodeTypes.QR`) is, hogy bővítsd a kódolható adatok körét. + +Boldog kódolást, és legyenek a barcode-jaid mindig első próbálásra beolvasva! + +## Mit érdemes még tanulni? + +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ódpéldákat lépésről‑lépésre magyarázatokkal, hogy segítsenek elsajátítani további API funkciókat és alternatív megvalósítási megközelítéseket a saját projektjeidben. + +- [Hogyan generáljunk és állítsunk be barcode magasságot egy dimenziós Databar használatával az Aspose.BarCode for .NET-hez](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Hogyan generáljunk barcode - Egy dimenziós barcode típusok](/barcode/english/net/one-dimensional-barcode-types/) +- [Hogyan generáljunk Aztec barcode-ot egyedi képaránnyal az Aspose.BarCode for .NET használatával](/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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/hungarian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..c0d597557 --- /dev/null +++ b/barcode/hungarian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,159 @@ +--- +category: general +date: 2026-08-19 +description: Készítsen databar PNG fájlokat C#-ban az Aspose.BarCode segítségével. + Tanulja meg, hogyan generáljon databar képeket, állítsa be a databar paramétereket, + és mentse el a PNG kimenetet. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: hu +lastmod: 2026-08-19 +og_description: Hozzon létre Databar PNG fájlokat C#-ban az Aspose.BarCode használatával. + Ez az útmutató végigvezet a Databar képek generálásán, a Databar paraméterek, például + az X‑dimenzió és a képarány beállításán, valamint a nyomtatáshoz vagy webes használatra + alkalmas magas minőségű PNG fájlok mentésén. +og_image_alt: create databar PNG example +og_title: Databar PNG képek létrehozása C#‑ban – lépésről‑lépésre útmutató +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Hogyan készítsünk databar PNG képeket C#-ban és az Aspose.BarCode segítségével +url: /hu/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hogyan hozzunk létre databar PNG képeket C#-val és az Aspose.BarCode segítségével + +Ha **databar PNG** fájlokat kell létrehoznod egy .NET alkalmazásban, ez az útmutató pontosan megmutatja, hogyan. Egy teljes, futtatható példát láthatsz, amely halmozott omnidirekcionális DataBar kódokat generál, kulcsfontosságú paramétereket konfigurál, és két PNG fájlt ment különböző képarányokkal. + +A DataBar kép generálása nem csak egyetlen metódus meghívásából áll. **Databar paramétereket** is konfigurálnod kell, például az X‑dimenziót (modul szélességét) és a képarányt, hogy megfeleljenek a nyomtatási vagy szkennelési specifikációknak. A tutorial végére megérted, **hogyan generálj databar** grafikákat, amelyek megbízhatóan működnek a valós környezetben. + +## Előfeltételek + +- .NET 6.0 vagy újabb (a kód .NET Framework 4.7+‑vel is működik) +- Visual Studio 2022 vagy bármely C#‑kompatibilis IDE +- Érvényes licenc az **Aspose.BarCode for .NET**‑hez (az ingyenes értékelés teszteléshez elegendő) +- Alapvető C# szintaxis ismeret + +> **Pro tip:** Ha még nincs licenced, kérhetsz ideiglenes értékelő kulcsot az Aspose portálról. Az API viselkedése ugyanaz; csak a vízjel változik. + +## 1. lépés: Telepítsd az Aspose.BarCode NuGet csomagot + +Nyisd meg a projektet a Visual Studio-ban, kattints jobb gombbal a megoldásra, és válaszd a **Manage NuGet Packages** lehetőséget. Keresd meg a `Aspose.BarCode`‑t, és telepítsd a legújabb stabil verziót. + +```bash +dotnet add package Aspose.BarCode +``` + +Ez a parancs hozzáadja az `Aspose.BarCode` assembly‑t a projektedhez, és elérhetővé teszi a `BarcodeGenerator` osztályt. + +## 2. lépés: Inicializáld a vonalkódgenerátort egy halmozott omnidirekcionális DataBar-hoz + +A `BarcodeGenerator` konstruktor két argumentumot kap: a vonalkódtípust és a nyers adatkarakterláncot. Halmozott omnidirekcionális DataBar esetén a `EncodeTypes.DatabarStackedOmniDirectional`‑t használod. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Miért fontos:** A `EncodeTypes.DatabarStackedOmniDirectional` állandó azt mondja a könyvtárnak, hogy olyan vonalkódot állítson elő, amely bármely orientációból olvasható, ami ideális a kiskereskedelmi polc címkékhez. + +## 3. lépés: Állítsd be az X‑dimenziót (modul szélesség) pixelekben + +Az X‑dimenzió szabályozza a legkisebb vonal elem méretét. Pixelekben megadva pontos kontrollt biztosít a végső kép mérete felett. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +A **2 pixel** érték jó egyensúlyt jelent az olvashatóság és a kompakt méret között a legtöbb címkenyomtató esetén. Módosítsd ezt az értéket, ha nagyobb vagy kisebb modulokra van szükséged. + +## 4. lépés: Állítsd be az első képarányt, és mentsd el a PNG‑t + +A képarány befolyásolja a halmozott DataBar magasságát. A **15** képarány viszonylag rövid vonalkódot eredményez, míg a **30** magasabbat. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +A `Save` metódus a generált vonalkódot PNG fájlba írja. A PNG veszteségmentes, ami megőrzi a vonalkód szkennerekhez szükséges éles éleket. + +## 5. lépés: Változtasd meg a képarányt, és ments egy második PNG‑t + +Ugyanazt a `BarcodeGenerator` példányt újra felhasználhatod a variációk előállításához, egyszerűen a képarány módosításával. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Most már két PNG fájlod van – `DatabarAspectRatio15.png` és `DatabarAspectRatio30.png` – mindegyik más vizuális sűrűséggel. + +## 6. lépés: Ellenőrizd a kimenetet + +Nyisd meg a generált PNG fájlokat bármely képnézőben. Egy tiszta, nagy kontrasztú DataBar vonalkódot kell látnod. A képek okostelefonos vonalkódszkennerrel történő beolvasása megerősíti, hogy mindkét képarány a `12345678901231` eredeti GTIN értéket dekódolja. + +![databar PNG példa létrehozása](databar_example.png) + +*Az előző kép a két PNG fájlt mutatja egymás mellett. A bal oldali kép 15‑ös képarányt, a jobb oldali pedig 30‑as képarányt használ.* + +## Gyakori variációk és szélsőséges esetek + +| Szenárió | Mit kell módosítani | Ok | +|----------|---------------------|----| +| **Eltérő adat** | Cseréld le a `(01)12345678901231` karakterláncot bármely érvényes GS1 Alkalmazási Azonosítóra és adatra | Lehetővé teszi termékazonosítók, sorozatszámok stb. kódolását | +| **Magasabb felbontás** | Növeld az `XDimension.Pixels` értékét 3‑ra vagy 4‑re | Szükséges, ha a vonalkód nagy méretben lesz nyomtatva vagy nagy távolságból lesz szkennelve | +| **Egyéb DataBar típusok** | Használd a `EncodeTypes.DatabarStacked` vagy `EncodeTypes.DatabarExpanded` értékeket | Válaszd ki a címkelayoutodhoz legjobban illeszkedő típust | +| **Átlátszó háttér** | Add meg a `BarCodeImageFormat.Png`‑t a `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` paraméterrel | Hasznos, ha a vonalkódot színes címkére szeretnéd átfedni | + +> **Figyelj:** Ha túl kicsi X‑dimenziót állítasz be (< 1 pixel), a vonalkód elmosódottnak tűnhet a nyomtatás után + + +## Mit érdemes még tanulni? + +A következő 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 segítsenek 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 Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/hungarian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..2200fa9aa --- /dev/null +++ b/barcode/hungarian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Tanulja meg, hogyan generáljon postai vonalkódot C#‑ban az Aspere.BarCode + használatával. Ez a lépésről‑lépésre útmutató bemutatja, hogyan lehet vonalkódot + létrehozni a Planet és az RM4SCC formátumokhoz. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: hu +lastmod: 2026-08-19 +og_description: Postai vonalkód generálása C#-ban az Aspose.BarCode segítségével. + Kövesse ezt az útmutatót, hogy megtanulja, hogyan generáljon vonalkódot a Planet + és az RM4SCC számára egyedi méretekkel. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Postai vonalkód generálása C#‑ban – teljes Aspose.BarCode útmutató +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Hogyan generáljunk postai vonalkódot C#-ban az Aspose.BarCode segítségével +url: /hu/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hogyan generáljunk postai vonalkódot C#-ban az Aspose.BarCode segítségével + +Ha **postai vonalkódot** kell generálnia levelezési alkalmazásokhoz, ez az útmutató pontosan megmutatja, hogyan kell vonalkódot generálni az Aspose.BarCode könyvtár segítségével. Egy teljes, futtatható példát fog látni, amely létrehozza a Planet vonalkódot (magasság automatikusan kiszámítva) és egy RM4SCC vonalkódot kifejezett sávmagassággal. + +Postai vonalkód generálása gyakori követelmény a logisztikai szoftverek, az automata címkenyomtatók és a tömeges levelezési rendszerek számára. A tutorial végére képes lesz a vonalkódgenerálást bármely .NET projektbe integrálni, testre szabni az X‑dimenziót, és szabályozni a sávmagasságot, ha a szabványos formátum ezt megengedi. + +**Amit megtanul** + +* Hogyan állítsuk be az Aspose.BarCode-ot egy C# projektben. +* Hogyan generáljunk Planet és RM4SCC postai vonalkódokat. +* Hogyan állítsuk be az X‑dimenziót (modul szélesség) és a sávmagasságot. +* Hogyan mentsük el az eredményt PNG képként. + +Nem szükséges külső szolgáltatás—minden helyben fut, miután hivatkozik az Aspose.BarCode NuGet csomagra. + +## Előfeltételek + +* .NET 6.0 SDK vagy újabb (a kód .NET Framework 4.7+‑vel is működik). +* Visual Studio 2022, Visual Studio Code, vagy bármelyik kedvenc C# IDE. +* Aspose.BarCode for .NET csomag – telepítse a NuGet-en keresztül: + +```bash +dotnet add package Aspose.BarCode +``` + +## Postai vonalkód generálása az Aspose.BarCode segítségével + +Az alábbi szakaszok lépésről lépésre végigvezetik Önt, a generátor objektumok létrehozásától a végső PNG fájlok mentéséig. + +### 1. lépés: Planet vonalkód létrehozása (automatikus magasság) + +A Planet egy postai vonalkód, amelyet sok országban használnak a levélrendezéshez. Amikor Planet vonalkódot hoz létre, a könyvtár automatikusan meghatározza a kódolt adatok alapján az optimális sávmagasságot. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Miért működik ez** – A `EncodeTypes.Planet` azt mondja az Aspose.BarCode-nak, hogy a Planet szimbólumot használja. Az `XDimension` tulajdonság szabályozza a legkisebb sáv (a modul) szélességét. Mivel a Planet nem igényel rögzített sávmagasságot, a könyvtár automatikusan kiszámít egy megfelelő magasságot, ami egyszerűsíti a kódot. + +### 2. lépés: RM4SCC vonalkód létrehozása kifejezett magassággal + +Az RM4SCC egy másik postai szimbólum, amely gyakran specifikus sávmagasságot igényel a szkenner kompatibilitás érdekében. Az alábbi kód bemutatja, hogyan állítható be ez a magasság manuálisan. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Miért állítja be a magasságot** – Néhány postai szkenner minimális sávmagasságot vár el. A `BarHeight.Pixels = 100` érték hozzárendelésével biztosítja, hogy a generált kép megfeleljen ezeknek a követelményeknek. Az X‑dimenzió a Planet vonalkóddal egységes marad, így mindkét kép ugyanazzal a vizuális sűrűséggel rendelkezik. + +### 3. lépés: Az eredmény ellenőrzése + +A program futtatása után nyissa meg a `YOUR_DIRECTORY` mappában található két PNG fájlt. Két különálló vonalkódot kell látnia: + +* `PostalPlanetBarHeightNone.png` – egy Planet vonalkód automatikusan kiszámított magassággal. +* `PostalRM4SCCBarHeight100Pixels.png` – egy RM4SCC vonalkód 100‑pixeles sávmagassággal. + +Mindkét képet közvetlenül fel lehet használni címkenyomtatókba vagy megjeleníteni egy webalkalmazásban. + +![Generált postai vonalkód kép az Aspose.BarCode használatával](generated-postal-barcode.png) + +*Kép alternatív szöveg:* **Generált postai vonalkód** kép az Aspose.BarCode használatával (bemutatja, hogyan generáljunk postai vonalkódot). + +## Hogyan generáljunk vonalkódot egyedi méretekkel (haladó) + +Ha finomhangolni kell más paramétereket – például margókat, szöveg elhelyezést vagy színt – az Aspose.BarCode egy gazdag `Parameters` objektumot biztosít. Az alábbi gyors példa fehér háttér hozzáadását és az emberi olvasható szöveg letiltását mutatja be. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Mikor használja ezt** – Az emberi olvasható szöveg letiltása gyakori az automatikus rendezésnél, ahol csak a gép által olvasható minta számít. Háttérszín beállítása biztosítja, hogy a vonalkód helyesen nyomtatódjon átlátszó anyagra. + +## Gyakori buktatók és profi tippek + +| Probléma | Miért fordul elő | Megoldás | +|----------|------------------|----------| +| A vonalkód nyújtottnak tűnik | Az X‑dimenzió túl nagy a kép méretéhez képest | Tartsa az `XDimension.Pixels` értékét 2 és 5 között a legtöbb postai vonalkód esetén | +| A szkenner elutasítja a képet | A sávmagasság alacsonyabb, mint a postai szolgáltató által megkövetelt minimum | Használja a `BarHeight.Pixels` ≥ 80 értéket az RM4SCC esetén, hacsak a specifikáció másként nem rendelkezik | +| A PNG fájlméret nagy | A kép felbontása nagyobb, mint amire szükség van | Mentse PNG‑8 formátumban (`BarCodeImageFormat.Png8`) vagy csökkentse a pixelméreteket | + +**Profi tipp:** Mindig tesztelje a generált vonalkódot egy valódi szkennerrel, mielőtt éles környezetbe helyezi. A kis vizuális eltérések befolyásolhatják az olvashatóságot. + +## Teljes forráskód + +Másolja az alábbi teljes blokkot egy új konzolos alkalmazásba (`Program.cs`). Állítsa be a kimeneti útvonalakat egy olyan mappára, amelybe a folyamat írni tud. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +A program futtatása kiírja a *„Barcodes generated successfully.”* üzenetet, és létrehozza a két PNG fájlt a végrehajtható munkakönyvtárában. + +## Következtetés + +Most már tudja, hogyan **generáljon postai vonalkódot** C#-ban az Aspose.BarCode segítségével, lefedve mind az automatikus magasságú Planet vonalkódokat, mind a rögzített magasságú RM4SCC vonalkódokat. Az útmutató bemutatta, hogyan **generáljon vonalkódot** egyedi X‑dimenzióval, sávmagassággal és vizuális beállításokkal, erős alapot nyújtva bármely levelezési automatizálási projekthez. + +A következő lépések, amelyeket érdemes felfedezni: + +* Integrálja a generált PNG-eket egy PDF számlába az Aspose.PDF használatával. +* Váltsa a kimeneti formátumot SVG-re a méretezhető vektorgrafikához. +* Használja a `BarcodeReader` osztályt a kódolt adatok programozott ellenőrzéséhez. + +Nyugodtan kísérletezzen különböző szimbólumokkal (pl. `EncodeTypes.Postnet`), és ossza meg eredményeit a közösséggel. Boldog kódolást! + +## Mit érdemes legközelebb megtanulni? + +Az alábbi oktatóanyagok szorosan kapcsolódó témákat fednek le, amelyek a jelen útmutatóban bemutatott technikákra épülnek. Minden forrás teljes, működő kódpéldákat tartalmaz 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 projektjeiben. + +- [Hogyan generáljunk vonalkód képet kiegészítő térköz testreszabásával az Aspose.BarCode használatával](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Hogyan generáljunk vonalkódot – Code 39 konfiguráció az Aspose.BarCode segítségével](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Hogyan generáljunk DataMatrix vonalkódokat (ECC 200) az Aspose.BarCode for .NET használatával](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/indonesian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..6662b59df --- /dev/null +++ b/barcode/indonesian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,250 @@ +--- +category: general +date: 2026-08-19 +description: Tutorial generator barcode C# menunjukkan cara menghasilkan barcode DataBar + Expanded Stacked, menyesuaikan ukuran barcode, dan mengonfigurasi baris serta kolom. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: id +lastmod: 2026-08-19 +og_description: Tutorial generator barcode C# mengajarkan Anda cara menghasilkan barcode + DataBar, menyesuaikan ukuran, dan mengatur baris serta kolom untuk output yang tepat. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Generator kode batang C# – panduan langkah demi langkah untuk kode batang + DataBar khusus +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Generator barcode C#: buat barcode DataBar khusus' +url: /id/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Generator barcode C#: buat barcode DataBar khusus + +Jika Anda membutuhkan **c# barcode generator** yang dapat menghasilkan simbol DataBar Expanded Stacked, panduan ini menunjukkan secara tepat cara menghasilkan gambar barcode dengan baris dan kolom khusus. Anda akan belajar mengonfigurasi parameter databar, menyesuaikan ukuran barcode, dan menyimpan hasilnya sebagai file PNG. + +Membuat barcode secara programatik menghilangkan langkah desain manual dan menjamin output yang konsisten di semua platform. Dalam tutorial ini Anda akan: + +* Instal dan referensikan pustaka Aspose.BarCode untuk .NET (atau paket kompatibel apa pun). +* Buat generator barcode untuk simbol DataBar Expanded Stacked. +* **Cara menghasilkan barcode** dengan pengaturan kolom dan baris tertentu. +* **Sesuaikan ukuran barcode** dengan mengontrol baris dan kolom DataBar. +* **Konfigurasikan parameter databar** seperti teks, format, dan kualitas gambar. + +## Prasyarat + +* .NET 6.0 SDK atau yang lebih baru terpasang. +* Lingkungan pengembangan C# (Visual Studio, VS Code, Rider, dll.). +* Paket NuGet `Aspose.BarCode` (atau pustaka setara yang menyediakan `BarcodeGenerator`, `EncodeTypes`, dan `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Menggunakan generator barcode C# untuk membuat barcode DataBar + +Bagian-bagian berikut akan memandu Anda melalui setiap langkah. Fokus utama adalah pada API **c# barcode generator**, namun pola yang sama berlaku untuk pustaka barcode lain yang menyediakan properti serupa. + +### Langkah 1: Inisialisasi generator barcode dengan teks contoh + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Mengapa langkah ini?* +`BarcodeGenerator` adalah titik masuk untuk semua tugas pembuatan barcode. Menyediakan enum `EncodeTypes.DatabarExpandedStacked` memberi tahu pustaka simbol apa yang akan digunakan, sementara argumen teks menjadi nilai yang dapat dibaca manusia yang dikodekan dalam simbol. + +### Langkah 2: Atur jumlah kolom (baris default digunakan) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Mengapa langkah ini?* +Simbol DataBar Expanded Stacked terdiri dari elemen linier yang ditumpuk. Menyesuaikan properti `Columns` mengubah kepadatan horizontal, memungkinkan Anda menampung string data yang lebih panjang tanpa menambah tinggi keseluruhan. Ini secara langsung **menyesuaikan ukuran barcode**. + +### Langkah 3: Simpan gambar barcode yang menggunakan empat kolom + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Apa yang Anda lihat:* +Gambar `DatabarCols4.png` yang disimpan menampilkan barcode DataBar yang lebih lebar daripada default karena berisi empat kolom. Anda dapat membuka file tersebut di penampil gambar apa pun untuk memverifikasi hasilnya. + +### Langkah 4: Inisialisasi ulang generator untuk konfigurasi baru + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Mengapa inisialisasi ulang?* +Mengubah properti `Rows` sambil mempertahankan pengaturan kolom sebelumnya dapat menghasilkan kombinasi yang tidak terduga. Memulai dengan instance baru memastikan hanya parameter yang dimaksud (`Rows`) yang memengaruhi gambar berikutnya. + +### Langkah 5: Atur jumlah baris (kolom default digunakan) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Mengapa langkah ini?* +Properti `Rows` mengontrol penumpukan vertikal. Menambah baris membuat barcode lebih tinggi, yang dapat berguna ketika ruang terbatas secara horizontal namun melimpah secara vertikal. Ini adalah cara lain untuk **menyesuaikan ukuran barcode**. + +### Langkah 6: Simpan gambar barcode yang menggunakan tiga baris + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Hasil:* +`DatabarRows3.png` menampilkan barcode yang lebih tinggi dengan tiga baris yang ditumpuk, menunjukkan bagaimana **konfigurasikan parameter databar** memengaruhi tampilan visual. + +## Contoh lengkap yang dapat dijalankan + +Berikut adalah program lengkap yang dapat Anda salin, tempel, dan jalankan. Program ini mencakup semua impor, penanganan error, dan komentar untuk kejelasan. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Output yang diharapkan** + +Menjalankan program menghasilkan dua file PNG: + +* `DatabarCols4.png` – barcode DataBar lebar dengan empat kolom. +* `DatabarRows3.png` – barcode DataBar tinggi dengan tiga baris. + +Buka gambar-gambar tersebut untuk memastikan dimensi barcode sesuai dengan parameter yang dikonfigurasi. + +## Pertanyaan umum dan penanganan kasus tepi + +| Question | Answer | +|----------|--------| +| *Bagaimana jika saya membutuhkan baris khusus **dan** kolom?* | Setel `Rows` **and** `Columns` pada instance `BarcodeGenerator` yang sama sebelum memanggil `Save`. Pustaka akan menggabungkan kedua nilai tersebut untuk menghasilkan grid dengan ukuran yang diminta. | +| *Apakah saya dapat mengubah format gambar?* | Ya. Ganti `BarCodeImageFormat.Png` dengan `Jpeg`, `Bmp`, atau `Gif` sesuai alur kerja Anda. | +| *Apa yang terjadi ketika teks lebih panjang daripada yang dapat ditampung simbol?* | Generator akan melempar `ArgumentException`. Pendekkan teks atau tingkatkan `Columns`/`Rows` untuk menyediakan kapasitas lebih. | +| *Apakah ada cara untuk mengatur DPI atau resolusi gambar?* | Gunakan `generator.Parameters.ImageResolution` untuk menentukan DPI yang diinginkan sebelum menyimpan. Ini lebih lanjut **menyesuaikan ukuran barcode** untuk pencetakan resolusi tinggi. | +| *Apakah pustaka mendukung varian DataBar lainnya?* | Ya. Ganti `EncodeTypes.DatabarExpandedStacked` dengan `DatabarExpanded`, `DatabarLimited`, dll., sambil mempertahankan struktur parameter yang sama. | + +## Tips untuk menghasilkan barcode yang andal + +* **Pro tip:** Selalu verifikasi gambar yang dihasilkan dengan pemindai atau aplikasi seluler sebelum menerapkannya ke produksi. +* **Watch out for:** Direktori output yang null atau kosong—`Save` akan melempar pengecualian jika path tidak ada. Buat folder secara programatik jika diperlukan. +* **Performance note:** Menggunakan kembali satu instance `BarcodeGenerator` dan hanya mengubah `Rows` atau `Columns` dapat mengurangi overhead pembuatan objek saat menghasilkan banyak barcode dalam loop. + +## Kesimpulan + +Anda kini tahu cara menggunakan **c# barcode generator** untuk **membuat gambar barcode databar**, **menyesuaikan ukuran barcode**, dan **mengonfigurasi parameter databar** seperti baris dan kolom. Dengan menyesuaikan pengaturan ini, Anda dapat menempatkan barcode ke dalam kebutuhan tata letak apa pun sambil mempertahankan keandalan pemindaian. + +Selanjutnya, jelajahi topik terkait seperti **cara menghasilkan barcode** PDF, menyematkan barcode dalam laporan, atau beralih ke simbol lain (QR, Code‑128, dll.). Bereksperimenlah dengan `Rows`, `Columns`, dan resolusi gambar yang berbeda untuk menemukan konfigurasi optimal bagi kasus penggunaan spesifik Anda. + +--- + +## Apa yang Harus Anda Pelajari Selanjutnya? + +Tutorial berikut mencakup topik yang sangat 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. + +- [Cara Menghasilkan dan Menyesuaikan Tinggi Barcode untuk One-Dimensional Databar menggunakan Aspose.BarCode untuk .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Hasilkan Barcode 2D One-Dimensional Databar Menggunakan Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Hasilkan barcode Databar Aspose.BarCode menggunakan .NET API – Konfigurasi Baris & Kolom](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/indonesian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..193149da8 --- /dev/null +++ b/barcode/indonesian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,220 @@ +--- +category: general +date: 2026-08-19 +description: Pelajari cara menghasilkan file PNG barcode di C# dan menyesuaikan tingginya, + mencakup cara membuat gambar barcode serta mengubah tinggi barcode dengan mudah. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: id +lastmod: 2026-08-19 +og_description: Buat file PNG barcode di C# dan pelajari cara menghasilkan gambar + barcode, mengatur tinggi barcode, serta mengubah tinggi barcode untuk pemindaian + optimal. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Buat file PNG barcode di C# – panduan langkah demi langkah +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Cara membuat file PNG barcode dengan tinggi yang dapat disesuaikan di C# +url: /id/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cara membuat file barcode PNG dengan tinggi yang dapat disesuaikan di C# + +Jika Anda perlu membuat **file barcode PNG** di C#, panduan ini menunjukkan cara melakukannya secara tepat. Anda akan melihat contoh lengkap yang dapat dijalankan yang mendemonstrasikan **cara menghasilkan gambar barcode** dan **cara menyesuaikan tinggi barcode** untuk berbagai kasus penggunaan. + +Membuat file barcode PNG adalah kebutuhan umum untuk sistem inventaris, terminal point‑of‑sale, dan aplikasi apa pun yang harus mencetak atau menampilkan data yang dapat dibaca mesin. Pada akhir tutorial ini Anda akan dapat mengubah tinggi barcode, menyimpan beberapa file PNG, dan memahami dampak tinggi terhadap keandalan pemindaian. + +## Prasyarat + +Sebelum memulai, pastikan Anda memiliki: + +* .NET 6.0 SDK atau yang lebih baru terpasang +* Visual Studio 2022 (atau IDE apa pun yang mendukung .NET) +* Paket NuGet **Aspose.BarCode for .NET** (contoh kode menggunakan pustaka ini) + +Anda dapat menambahkan paket tersebut dari baris perintah: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Tips:** Versi evaluasi gratis Aspose.BarCode dapat digunakan untuk pengembangan dan pengujian. Untuk produksi, dapatkan kunci lisensi. + +## Instal pustaka barcode + +Langkah pertama adalah mereferensikan pustaka dalam proyek Anda. Tambahkan direktif `using` berikut di bagian atas file C# Anda: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Namespace ini memberi Anda akses ke `BarcodeGenerator`, `EncodeTypes`, dan `BarCodeImageFormat`. + +## Buat file barcode PNG + +Sekarang kita membuat instance `BarcodeGenerator` yang akan menghasilkan **file barcode PNG**. Contoh ini menggunakan simbol Databar OmniDirectional, tetapi Anda dapat mengganti `EncodeTypes.DatabarOmniDirectional` dengan tipe yang didukung apa pun. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +String `"(01)12345678901231"` mengikuti format GS1 Application Identifier untuk GTIN 14‑digit. Sesuaikan data tersebut dengan pengidentifikasi produk Anda sendiri. + +## Atur dimensi X (opsional) + +Dimensi X menentukan lebar satu modul barcode. Nilai berbasis piksel memberi Anda kontrol presisi atas ukuran gambar. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Nilai `2` piksel bekerja baik untuk kebanyakan tampilan layar. Tingkatkan nilai tersebut jika Anda memerlukan barcode yang lebih besar saat dicetak. + +## Sesuaikan tinggi barcode dan simpan file barcode PNG + +Properti **BarHeight** mengontrol ukuran vertikal batang. Mengubah nilai ini memungkinkan Anda **menyesuaikan tinggi barcode** tanpa memengaruhi data yang dikodekan. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +File `DatabarBarHeight30Pixels.png` kini menjadi **file barcode PNG** dengan tinggi 30 piksel. + +Untuk **mengubah tinggi barcode** dan membuat gambar kedua, cukup tetapkan nilai baru dan panggil `Save` lagi: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Sekarang Anda memiliki dua file PNG—satu dengan tinggi 30 px dan satu lagi dengan tinggi 60 px—menunjukkan cara **menyesuaikan tinggi barcode** secara dinamis. + +### Mengapa tinggi batang penting + +* **Keterbacaan:** Scanner mengharapkan tinggi minimum untuk deteksi yang dapat diandalkan. Barcode yang terlalu pendek dapat terlewat, terutama pada kamera beresolusi rendah. +* **Estetika:** Menyesuaikan tinggi barcode dengan elemen desain di sekitarnya menciptakan UI yang lebih bersih. +* **Keterbatasan cetak:** Beberapa printer label memiliki slot tinggi tetap; menyesuaikan tinggi barcode memastikan barcode muat. + +**Praktik terbaik:** Jaga tinggi sebagai kelipatan dimensi X (misalnya, 30 px ketika dimensi X adalah 2 px) untuk mempertahankan proporsi dan menghindari distorsi. + +## Contoh lengkap + +Berikut adalah program lengkap yang dapat Anda tempelkan ke aplikasi konsol dan jalankan langsung. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Output yang diharapkan** + +Menjalankan program akan membuat dua file di direktori kerja executable: + +* `DatabarBarHeight30Pixels.png` – file barcode PNG setinggi 30 piksel +* `DatabarBarHeight60Pixels.png` – file barcode PNG setinggi 60 piksel + +Buka salah satu PNG dengan penampil gambar apa pun; Anda akan melihat barcode Databar OmniDirectional yang jelas dan siap dipindai. + +## Kasus tepi dan pemecahan masalah + +| Situasi | Hal yang harus diperiksa | Perbaikan yang disarankan | +|-----------|---------------|-----------------| +| Barcode tampak buram | Dimensi X terlalu rendah untuk tinggi yang dipilih | Tingkatkan `XDimension.Pixels` (misalnya, dari 2 ke 3) | +| Scanner gagal pada barcode berukuran rendah | Tinggi di bawah minimum scanner | Atur `BarHeight.Pixels` setidaknya 30 px (atau sesuai spesifikasi scanner) | +| File PNG kosong atau rusak | Jalur output tidak valid atau izin menulis ditolak | Gunakan jalur absolut atau pastikan aplikasi memiliki akses menulis | +| Membutuhkan simbol yang berbeda | `EncodeTypes` saat ini tidak cocok | Ganti `EncodeTypes.DatabarOmniDirectional` dengan nilai enum lain (misalnya, `EncodeTypes.Code128`) | + +## Pertanyaan yang sering diajukan + +**T: Bisakah saya menghasilkan format gambar lain (JPEG, BMP)?** +J: Ya. Ganti `BarCodeImageFormat.Png` dengan `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, dll. + +**T: Bagaimana cara menyematkan PNG ke dalam halaman web?** +J: Layani PNG yang dihasilkan melalui endpoint HTTP atau konversi menjadi string Base64 dan letakkan di atribut `src` tag ``. + +**T: Apakah ada cara mengatur warna latar belakang?** +J: Gunakan `generator.Parameters.Image.BackgroundColor = Color.White;` (atau `System.Drawing.Color` apa pun). + +## Kesimpulan + +Anda kini tahu cara **menghasilkan file barcode PNG** di C# dan secara tepat **menyesuaikan tinggi barcode** untuk memenuhi persyaratan pemindaian atau desain. Dengan mengubah properti `BarHeight.Pixels` Anda dapat **mengubah tinggi barcode** secara dinamis dan menghasilkan banyak aset PNG dari satu basis kode. + +Selanjutnya, jelajahi opsi kustomisasi lain seperti warna depan, margin, dan menambahkan teks yang dapat dibaca manusia. Anda juga dapat bereksperimen dengan simbol yang berbeda (`EncodeTypes.Code128`, `EncodeTypes.QR`) untuk memperluas jenis data yang dapat Anda enkode. + +Selamat coding, semoga barcode Anda selalu dapat dipindai pada percobaan pertama! + +## 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/indonesian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..e789adbc1 --- /dev/null +++ b/barcode/indonesian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Buat file PNG databar di C# dengan Aspose.BarCode. Pelajari cara menghasilkan + gambar databar, mengonfigurasi parameter databar, dan menyimpan output PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: id +lastmod: 2026-08-19 +og_description: Buat file PNG databar di C# menggunakan Aspose.BarCode. Tutorial ini + memandu Anda cara menghasilkan gambar databar, mengonfigurasi parameter databar + seperti dimensi X dan rasio aspek, serta menyimpan file PNG berkualitas tinggi untuk + pencetakan atau penggunaan web. +og_image_alt: create databar PNG example +og_title: Buat gambar PNG databar di C# – panduan langkah demi langkah +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Cara membuat gambar PNG databar dengan C# dan Aspose.BarCode +url: /id/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cara membuat gambar PNG databar dengan C# dan Aspose.BarCode + +Jika Anda perlu **membuat PNG databar** dalam aplikasi .NET, panduan ini menunjukkan secara tepat caranya. Anda akan melihat contoh lengkap yang dapat dijalankan yang menghasilkan kode DataBar omnidirectional bertumpuk, mengonfigurasi parameter kunci, dan menyimpan dua file PNG dengan rasio aspek yang berbeda. + +Membuat gambar DataBar bukan hanya sekadar memanggil satu metode. Anda juga harus **mengonfigurasi parameter databar** seperti X‑dimension (lebar modul) dan rasio aspek agar memenuhi spesifikasi pencetakan atau pemindaian. Pada akhir tutorial ini Anda akan memahami **cara menghasilkan grafik databar** yang berfungsi andal dalam skenario dunia nyata. + +## Prasyarat + +- .NET 6.0 atau yang lebih baru (kode ini juga berfungsi dengan .NET Framework 4.7+) +- Visual Studio 2022 atau IDE lain yang kompatibel dengan C# +- Lisensi yang valid untuk **Aspose.BarCode for .NET** (evaluasi gratis dapat digunakan untuk pengujian) +- Pengetahuan dasar tentang sintaks C# + +> **Pro tip:** Jika Anda belum memiliki lisensi, Anda dapat meminta kunci evaluasi sementara dari portal Aspose. API berperilaku sama; hanya watermark yang berubah. + +## Langkah 1: Instal paket NuGet Aspose.BarCode + +Buka proyek Anda di Visual Studio, klik kanan solusi, dan pilih **Manage NuGet Packages**. Cari `Aspose.BarCode` dan instal versi stabil terbaru. + +```bash +dotnet add package Aspose.BarCode +``` + +Perintah ini menambahkan assembly `Aspose.BarCode` ke proyek Anda dan membuat kelas `BarcodeGenerator` tersedia. + +## Langkah 2: Inisialisasi generator barcode untuk DataBar omnidirectional bertumpuk + +Konstruktor `BarcodeGenerator` menerima dua argumen: tipe barcode dan string data mentah. Untuk DataBar omnidirectional bertumpuk Anda menggunakan `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Mengapa ini penting:** Konstanta `EncodeTypes.DatabarStackedOmniDirectional` memberi tahu perpustakaan untuk menghasilkan barcode yang dapat dibaca dari orientasi apa pun, yang ideal untuk label rak ritel. + +## Langkah 3: Konfigurasikan X‑dimension (lebar modul) dalam piksel + +X‑dimension mengontrol ukuran elemen bar terkecil. Menetapkannya dalam piksel memberi Anda kontrol presisi atas ukuran gambar akhir. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Nilai **2 piksel** merupakan keseimbangan yang baik antara keterbacaan dan kepadatan untuk kebanyakan printer label. Sesuaikan nilai ini jika Anda memerlukan modul yang lebih besar atau lebih kecil. + +## Langkah 4: Atur rasio aspek pertama dan simpan PNG + +Rasio aspek memengaruhi tinggi DataBar bertumpuk. Rasio aspek **15** menghasilkan barcode yang relatif pendek, sementara **30** membuatnya lebih tinggi. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Metode `Save` menulis barcode yang dihasilkan ke file PNG. PNG bersifat lossless, sehingga mempertahankan tepi tajam yang dibutuhkan pemindai barcode. + +## Langkah 5: Ubah rasio aspek dan simpan PNG kedua + +Anda dapat menggunakan kembali instance `BarcodeGenerator` yang sama untuk menghasilkan variasi hanya dengan mengubah rasio aspek. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Sekarang Anda memiliki dua file PNG—`DatabarAspectRatio15.png` dan `DatabarAspectRatio30.png`—masing‑masing dengan kepadatan visual yang berbeda. + +## Langkah 6: Verifikasi output + +Buka file PNG yang dihasilkan di penampil gambar apa pun. Anda harus melihat barcode DataBar yang bersih dan kontras tinggi. Memindai gambar dengan pemindai barcode smartphone mengonfirmasi bahwa kedua rasio aspek mendekode nilai GTIN asli `12345678901231`. + +![create databar PNG example](databar_example.png) + +*Gambar di atas menampilkan dua file PNG berdampingan. Gambar kiri menggunakan rasio aspek 15, gambar kanan menggunakan rasio aspek 30.* + +## Variasi umum dan kasus tepi + +| Skenario | Apa yang diubah | Alasan | +|----------|----------------|--------| +| **Data berbeda** | Ganti string `(01)12345678901231` dengan Identifier Aplikasi GS1 yang valid dan data apa pun | Memungkinkan Anda mengkodekan ID produk, nomor seri, dll. | +| **Resolusi lebih tinggi** | Tingkatkan `XDimension.Pixels` menjadi 3 atau 4 | Diperlukan ketika barcode akan dicetak dalam ukuran besar atau dipindai dari jarak jauh. | +| **Tipe DataBar lain** | Gunakan `EncodeTypes.DatabarStacked` atau `EncodeTypes.DatabarExpanded` | Pilih tipe yang paling cocok dengan tata letak label Anda. | +| **Latar belakang transparan** | Pass `BarCodeImageFormat.Png` dengan `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Berguna untuk menempatkan barcode di atas label berwarna. | + +> **Waspadai:** Menetapkan X‑dimension yang terlalu kecil (< 1 piksel) dapat menghasilkan barcode yang tampak buram setelah + +## Apa yang Harus Anda Pelajari Selanjutnya? + +Tutorial berikut mencakup topik yang sangat terkait dan membangun teknik yang ditunjukkan dalam panduan ini. Setiap sumber daya menyertakan 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/indonesian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..ef640b779 --- /dev/null +++ b/barcode/indonesian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Pelajari cara menghasilkan barcode pos di C# menggunakan Aspere.BarCode. + Panduan langkah demi langkah ini menunjukkan cara menghasilkan barcode untuk format + Planet dan RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: id +lastmod: 2026-08-19 +og_description: Hasilkan kode batang pos dalam C# dengan Aspose.BarCode. Ikuti panduan + ini untuk mempelajari cara menghasilkan kode batang untuk Planet dan RM4SCC dengan + dimensi khusus. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Menghasilkan kode batang pos di C# – panduan lengkap Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Cara menghasilkan kode batang pos di C# dengan Aspose.BarCode +url: /id/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cara menghasilkan barcode pos dalam C# dengan Aspose.BarCode + +Jika Anda perlu **menghasilkan barcode pos** untuk aplikasi pengiriman, panduan ini menunjukkan secara tepat cara menghasilkan barcode menggunakan pustaka Aspose.BarCode. Anda akan melihat contoh lengkap yang dapat dijalankan yang membuat barcode Planet (tinggi dihitung secara otomatis) dan barcode RM4SCC dengan tinggi bar yang eksplisit. + +Menghasilkan barcode pos adalah kebutuhan umum untuk perangkat lunak logistik, printer label otomatis, dan sistem pengiriman massal. Pada akhir tutorial ini Anda akan dapat mengintegrasikan pembuatan barcode ke dalam proyek .NET apa pun, menyesuaikan X‑dimension, dan mengontrol tinggi bar bila format standar mengizinkannya. + +**Apa yang akan Anda pelajari** + +* Cara menyiapkan Aspose.BarCode dalam proyek C#. +* Cara menghasilkan barcode pos Planet dan RM4SCC. +* Cara menyesuaikan X‑dimension (lebar modul) dan tinggi bar. +* Cara menyimpan hasil sebagai gambar PNG. + +Tidak diperlukan layanan eksternal—semua berjalan secara lokal setelah Anda merujuk paket Aspose.BarCode NuGet. + +## Prasyarat + +* .NET 6.0 SDK atau lebih baru (kode juga berfungsi dengan .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code, atau IDE C# apa pun yang Anda sukai. +* Aspose.BarCode untuk .NET paket – instal melalui NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Menghasilkan barcode pos dengan Aspose.BarCode + +Bagian berikut memandu Anda melalui setiap langkah, mulai dari membuat objek generator hingga menyimpan file PNG akhir. + +### Langkah 1: Buat barcode Planet (tinggi otomatis) + +Planet adalah barcode pos yang digunakan di banyak negara untuk penyortiran surat. Saat Anda membuat barcode Planet, pustaka secara otomatis menentukan tinggi bar yang optimal berdasarkan data yang dikodekan. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Mengapa ini berhasil** – `EncodeTypes.Planet` memberi tahu Aspose.BarCode untuk menggunakan simbol Planet. Properti `XDimension` mengontrol lebar bar terkecil (modul). Karena Planet tidak memerlukan tinggi bar tetap, pustaka menghitung tinggi yang sesuai secara otomatis, yang menyederhanakan kode. + +### Langkah 2: Buat barcode RM4SCC dengan tinggi eksplisit + +RM4SCC adalah simbol pos lain yang sering memerlukan tinggi bar tertentu untuk kompatibilitas pemindai. Kode berikut menunjukkan cara mengatur tinggi tersebut secara manual. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Mengapa Anda mengatur tinggi** – Beberapa pemindai pos mengharapkan tinggi bar minimum. Dengan menetapkan `BarHeight.Pixels = 100`, Anda menjamin gambar yang dihasilkan memenuhi persyaratan tersebut. X‑dimension tetap konsisten dengan barcode Planet sehingga kedua gambar memiliki kepadatan visual yang sama. + +### Langkah 3: Verifikasi output + +Setelah menjalankan program, buka dua file PNG yang berada di `YOUR_DIRECTORY`. Anda harus melihat dua barcode yang berbeda: + +* `PostalPlanetBarHeightNone.png` – barcode Planet dengan tinggi yang dihitung secara otomatis. +* `PostalRM4SCCBarHeight100Pixels.png` – barcode RM4SCC dengan tinggi bar 100 piksel. + +Kedua gambar dapat langsung diberikan ke printer label atau ditampilkan dalam aplikasi web. + +![Gambar barcode pos yang dihasilkan menggunakan Aspose.BarCode](generated-postal-barcode.png) + +*Teks alt gambar:* **Barcode pos yang dihasilkan** image using Aspose.BarCode (menunjukkan cara menghasilkan barcode pos). + +## Cara menghasilkan barcode dengan dimensi khusus (lanjutan) + +Jika Anda perlu menyempurnakan parameter lain—seperti margin, penempatan teks, atau warna—Aspose.BarCode menyediakan objek `Parameters` yang kaya. Berikut contoh singkat yang menambahkan latar belakang putih dan menonaktifkan teks yang dapat dibaca manusia. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Kapan menggunakan ini** – Menonaktifkan teks yang dapat dibaca manusia umum untuk penyortiran otomatis di mana hanya pola yang dapat dibaca mesin yang penting. Menetapkan warna latar belakang memastikan barcode tercetak dengan benar pada media transparan. + +## Kesalahan umum dan tip profesional + +| Masalah | Mengapa terjadi | Solusi | +|-------|----------------|-----| +| Barcode terlihat terdistorsi | X‑dimension terlalu besar relatif terhadap ukuran gambar | Jaga `XDimension.Pixels` antara 2 dan 5 untuk kebanyakan barcode pos | +| Pemindai menolak gambar | Tinggi bar berada di bawah minimum yang diperlukan oleh layanan pos | Gunakan `BarHeight.Pixels` ≥ 80 untuk RM4SCC kecuali spesifikasi menyatakan lain | +| Ukuran file PNG besar | Resolusi gambar lebih tinggi dari yang dibutuhkan | Simpan sebagai PNG‑8 (`BarCodeImageFormat.Png8`) atau kurangi dimensi piksel | + +**Tip profesional:** Selalu uji barcode yang dihasilkan dengan pemindai nyata sebelum diterapkan ke produksi. Perbedaan visual kecil dapat memengaruhi keterbacaan. + +## Kode sumber lengkap + +Salin seluruh blok di bawah ini ke dalam aplikasi konsol baru (`Program.cs`). Sesuaikan jalur output ke folder yang dapat ditulis oleh proses Anda. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Menjalankan program mencetak *“Barcodes generated successfully.”* dan membuat dua file PNG di direktori kerja executable. + +## Kesimpulan + +Anda kini tahu cara **menghasilkan barcode pos** dalam C# dengan Aspose.BarCode, mencakup barcode Planet dengan tinggi otomatis dan barcode RM4SCC dengan tinggi tetap. Panduan ini juga menunjukkan **cara menghasilkan barcode** dengan X‑dimension khusus, tinggi bar, dan opsi visual, memberikan fondasi yang kuat untuk proyek otomatisasi pengiriman apa pun. + +Langkah selanjutnya yang dapat Anda jelajahi: + +* Integrasikan PNG yang dihasilkan ke dalam faktur PDF menggunakan Aspose.PDF. +* Ubah format output menjadi SVG untuk grafik vektor yang dapat diskalakan. +* Gunakan kelas `BarcodeReader` untuk memverifikasi data yang dikodekan secara programatik. + +Jangan ragu bereksperimen dengan simbol berbeda (mis., `EncodeTypes.Postnet`) dan bagikan hasil Anda dengan komunitas. Selamat coding! + +## 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 yang berfungsi dengan penjelasan langkah demi langkah untuk membantu Anda menguasai fitur API tambahan dan mengeksplorasi pendekatan implementasi alternatif dalam proyek Anda sendiri. + +- [Cara Menghasilkan Gambar Barcode dengan Kustomisasi Ruang Tambahan menggunakan Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Cara Menghasilkan Barcode – Konfigurasi Code 39 dengan Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Cara Menghasilkan Barcode DataMatrix (ECC 200) dengan Aspose.BarCode untuk .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/italian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..6d104eeba --- /dev/null +++ b/barcode/italian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,252 @@ +--- +category: general +date: 2026-08-19 +description: Il tutorial del generatore di codici a barre C# mostra come generare + codici a barre DataBar Expanded Stacked, personalizzare le dimensioni del codice + a barre e configurare righe e colonne. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: it +lastmod: 2026-08-19 +og_description: Il tutorial sul generatore di codici a barre in C# ti insegna come + generare codici a barre DataBar, personalizzare le dimensioni e configurare righe + e colonne per un output preciso. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Generatore di codici a barre C# – guida passo passo per codici DataBar personalizzati +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Generatore di codici a barre C#: crea codici DataBar personalizzati' +url: /it/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Generatore di codici a barre C#: crea codici DataBar personalizzati + +Se hai bisogno di un **c# barcode generator** in grado di produrre simboli DataBar Expanded Stacked, questa guida ti mostra esattamente come generare immagini di codici a barre con righe e colonne personalizzate. Imparerai a configurare i parametri databar, regolare le dimensioni del codice a barre e salvare il risultato come file PNG. + +Generare codici a barre programmaticamente elimina le fasi di progettazione manuale e garantisce un output coerente su tutte le piattaforme. In questo tutorial tu: + +* Installa e riferisci la libreria Aspose.BarCode per .NET (o qualsiasi pacchetto compatibile). +* Crea un generatore di codici a barre per la simbologia DataBar Expanded Stacked. +* **How to generate barcode** immagini con impostazioni specifiche di colonna e riga. +* **Customize barcode size** controllando le righe e le colonne DataBar. +* **Configure databar parameters** come testo, formato e qualità dell'immagine. + +## Prerequisiti + +* .NET 6.0 SDK o successivo installato. +* Un ambiente di sviluppo C# (Visual Studio, VS Code, Rider, ecc.). +* Pacchetto NuGet `Aspose.BarCode` (o una libreria equivalente che fornisce `BarcodeGenerator`, `EncodeTypes` e `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Utilizzare il generatore di codici a barre C# per creare codici DataBar + +Le sezioni seguenti ti guidano passo passo. L'attenzione principale è sull'API **c# barcode generator**, ma lo stesso schema si applica ad altre librerie di codici a barre che espongono proprietà simili. + +### Passo 1: Inizializza il generatore di codici a barre con testo di esempio + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Perché questo passo?* +`BarcodeGenerator` è il punto di ingresso per tutte le attività di creazione di codici a barre. Fornire l'enumerazione `EncodeTypes.DatabarExpandedStacked` indica alla libreria quale simbologia utilizzare, mentre l'argomento di testo diventa il valore leggibile dall'uomo codificato nel simbolo. + +### Passo 2: Imposta il numero di colonne (vengono usate le righe predefinite) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Perché questo passo?* +I simboli DataBar Expanded Stacked consistono di elementi lineari impilati. Modificare la proprietà `Columns` cambia la densità orizzontale, consentendo di inserire stringhe di dati più lunghe senza aumentare l'altezza complessiva. Questo personalizza direttamente **customizes barcode size**. + +### Passo 3: Salva l'immagine del codice a barre che utilizza quattro colonne + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Cosa vedi:* +L'immagine salvata `DatabarCols4.png` mostra un codice DataBar più largo del predefinito perché contiene quattro colonne. Puoi aprire il file in qualsiasi visualizzatore di immagini per verificare l'output. + +### Passo 4: Re‑inizializza il generatore per una nuova configurazione + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Perché re‑inizializzare?* +Modificare la proprietà `Rows` mantenendo l'impostazione della colonna precedente potrebbe produrre una combinazione inattesa. Iniziare con una nuova istanza garantisce che solo il parametro previsto (`Rows`) influenzi l'immagine successiva. + +### Passo 5: Imposta il numero di righe (vengono usate le colonne predefinite) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Perché questo passo?* +La proprietà `Rows` controlla l'impilamento verticale. Aumentare le righe rende il codice a barre più alto, il che può essere utile quando lo spazio è limitato orizzontalmente ma abbondante verticalmente. Questo è un altro modo per **customize barcode size**. + +### Passo 6: Salva l'immagine del codice a barre che utilizza tre righe + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Risultato:* +`DatabarRows3.png` mostra un codice a barre più alto con tre righe impilate, dimostrando come **configure databar parameters** influisce sull'aspetto visivo. + +## Esempio completo eseguibile + +Di seguito è riportato un programma completo che puoi copiare, incollare ed eseguire. Include tutti gli import, la gestione degli errori e i commenti per chiarezza. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Output previsto** + +L'esecuzione del programma produce due file PNG: + +* `DatabarCols4.png` – un codice DataBar largo con quattro colonne. +* `DatabarRows3.png` – un codice DataBar alto con tre righe. + +Apri le immagini per confermare che le dimensioni del codice a barre corrispondano ai parametri configurati. + +## Domande comuni e gestione dei casi limite + +| Question | Answer | +|----------|--------| +| *E se avessi bisogno sia di righe personalizzate **e** colonne?* | Imposta `Rows` **e** `Columns` sulla stessa istanza di `BarcodeGenerator` prima di chiamare `Save`. La libreria combina entrambi i valori per produrre una griglia della dimensione richiesta. | +| *Posso cambiare il formato dell'immagine?* | Sì. Sostituisci `BarCodeImageFormat.Png` con `Jpeg`, `Bmp` o `Gif` per adattarlo al tuo flusso di lavoro. | +| *Cosa succede quando il testo è più lungo di quanto il simbolo possa contenere?* | Il generatore genera un'`ArgumentException`. Accorcia il testo o aumenta `Columns`/`Rows` per fornire più capacità. | +| *È possibile impostare DPI o risoluzione dell'immagine?* | Usa `generator.Parameters.ImageResolution` per specificare il DPI desiderato prima di salvare. Questo personalizza ulteriormente **customizes barcode size** per la stampa ad alta risoluzione. | +| *La libreria supporta altre varianti DataBar?* | Sì. Sostituisci `EncodeTypes.DatabarExpandedStacked` con `DatabarExpanded`, `DatabarLimited`, ecc., mantenendo la stessa struttura dei parametri. | + +## Suggerimenti per una generazione affidabile di codici a barre + +* **Pro tip:** Verifica sempre l'immagine generata con uno scanner o un'app mobile prima di distribuirla in produzione. +* **Watch out for:** Directory di output nulle o vuote—`Save` genererà un'eccezione se il percorso non esiste. Crea la cartella programmaticamente se necessario. +* **Performance note:** Riutilizzare una singola istanza di `BarcodeGenerator` e modificare solo `Rows` o `Columns` può ridurre l'overhead di creazione degli oggetti quando si generano molti codici a barre in un ciclo. + +## Conclusione + +Ora sai come utilizzare un **c# barcode generator** per **creare immagini di codici databar**, **customize barcode size**, e **configure databar parameters** come righe e colonne. Regolando queste impostazioni puoi adattare i codici a barre a qualsiasi requisito di layout mantenendo l'affidabilità della scansione. + +Successivamente, esplora argomenti correlati come **how to generate barcode** PDF, l'inserimento di codici a barre nei report o il passaggio ad altre simbologie (QR, Code‑128, ecc.). Sperimenta con diversi `Rows`, `Columns` e risoluzioni immagine per trovare la configurazione ottimale per il tuo caso d'uso specifico. + +--- + + +## Cosa dovresti imparare dopo? + +I seguenti tutorial coprono 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 ulteriori funzionalità dell'API ed esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [Come generare e regolare l'altezza del codice a barre per Databar unidimensionale usando Aspose.BarCode per .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generare codici a barre Databar 2D unidimensionali usando l'API Aspose.BarCode per .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generare codici a barre Aspose.BarCode Databar usando l'API .NET – Configurazione di righe e colonne](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/italian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..48de67753 --- /dev/null +++ b/barcode/italian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,221 @@ +--- +category: general +date: 2026-08-19 +description: Impara a generare un file PNG di codice a barre in C# e a regolarne l’altezza, + includendo come creare immagini di codici a barre e modificare facilmente l’altezza + del codice a barre. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: it +lastmod: 2026-08-19 +og_description: Crea un file PNG di codice a barre in C# e impara come generare immagini + di codici a barre, regolare l'altezza del codice a barre e modificarla per scansioni + ottimali. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Crea un file PNG di codice a barre in C# – guida passo passo +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Come creare un file PNG di codice a barre con altezza regolabile in C# +url: /it/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Come creare un file PNG di codice a barre con altezza regolabile in C# + +Se hai bisogno di creare un **file PNG di codice a barre** in C#, questa guida ti mostra esattamente come fare. Vedrai un esempio completo e eseguibile che dimostra **come generare codici a barre** e come **regolare l'altezza del codice a barre** per diversi casi d'uso. + +Generare un file PNG di codice a barre è una necessità comune per sistemi di inventario, terminali point‑of‑sale e qualsiasi applicazione che deve stampare o visualizzare dati leggibili da macchine. Alla fine di questo tutorial sarai in grado di modificare l'altezza del codice a barre, salvare più file PNG e comprendere l'impatto dell'altezza sull'affidabilità della scansione. + +## Prerequisiti + +Prima di iniziare, assicurati di avere: + +* .NET 6.0 SDK o versioni successive installate +* Visual Studio 2022 (o qualsiasi IDE che supporti .NET) +* Il pacchetto NuGet **Aspose.BarCode for .NET** (il campione di codice utilizza questa libreria) + +Puoi aggiungere il pacchetto dalla riga di comando: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Consiglio professionale:** La versione di valutazione gratuita di Aspose.BarCode funziona per sviluppo e test. Per la produzione, ottieni una chiave con licenza. + +## Installa la libreria per i codici a barre + +Il primo passo è fare riferimento alla libreria nel tuo progetto. Aggiungi le seguenti direttive `using` all'inizio del tuo file C#: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Questi namespace ti danno accesso a `BarcodeGenerator`, `EncodeTypes` e `BarCodeImageFormat`. + +## Crea il file PNG del codice a barre + +Ora creiamo un'istanza di `BarcodeGenerator` che produrrà un **file PNG di codice a barre**. L'esempio utilizza la simbologia Databar OmniDirectional, ma puoi sostituire `EncodeTypes.DatabarOmniDirectional` con qualsiasi tipo supportato. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +La stringa `"(01)12345678901231"` segue il formato GS1 Application Identifier per un GTIN a 14 cifre. Regola i dati per corrispondere ai tuoi identificatori di prodotto. + +## Imposta la dimensione X (opzionale) + +La dimensione X definisce la larghezza di un singolo modulo del codice a barre. Un valore basato sui pixel ti offre un controllo preciso sulla dimensione dell'immagine. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Un valore di `2` pixel funziona bene per la maggior parte dei display. Incrementalo se ti serve un codice a barre più grande in stampa. + +## Regola l'altezza del codice a barre e salva il file PNG del codice a barre + +La proprietà **BarHeight** controlla la dimensione verticale delle barre. Modificando questo valore puoi **regolare l'altezza del codice a barre** senza influire sui dati codificati. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Il file `DatabarBarHeight30Pixels.png` è ora un **file PNG di codice a barre** alto 30 pixel. + +Per **cambiare l'altezza del codice a barre** e creare una seconda immagine, assegna semplicemente un nuovo valore e chiama nuovamente `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Ora disponi di due file PNG—uno a 30 px e l'altro a 60 px—che dimostrano come **regolare l'altezza del codice a barre** al volo. + +### Perché l'altezza delle barre è importante + +* **Readability:** Gli scanner si aspettano un'altezza minima per una rilevazione affidabile. Un codice a barre troppo corto può essere ignorato, soprattutto con fotocamere a bassa risoluzione. +* **Aesthetics:** Abbinare l'altezza del codice a barre agli elementi di design circostanti crea un'interfaccia più pulita. +* **Print constraints:** Alcune stampanti di etichette hanno slot di altezza fissa; regolare l'altezza del codice a barre garantisce che si adatti. + +**Best practice:** Mantieni l'altezza un multiplo della dimensione X (ad esempio, 30 px quando la dimensione X è 2 px) per preservare le proporzioni ed evitare distorsioni. + +## Esempio completo + +Di seguito trovi il programma completo e autonomo che puoi incollare in un'applicazione console e eseguire immediatamente. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Output previsto** + +L'esecuzione del programma crea due file nella directory di lavoro dell'eseguibile: + +* `DatabarBarHeight30Pixels.png` – un file PNG di codice a barre alto 30 pixel +* `DatabarBarHeight60Pixels.png` – un file PNG di codice a barre alto 60 pixel + +Apri uno dei PNG con qualsiasi visualizzatore di immagini; vedrai un chiaro codice Databar OmniDirectional pronto per la scansione. + +## Casi limite e risoluzione dei problemi + +| Situazione | Cosa controllare | Correzione consigliata | +|------------|------------------|------------------------| +| Il codice a barre appare sfocato | X‑dimension troppo bassa per l'altezza scelta | Incrementa `XDimension.Pixels` (es., da 2 a 3) | +| Lo scanner fallisce su un codice a barre di bassa altezza | Altezza inferiore al minimo richiesto dallo scanner | Imposta `BarHeight.Pixels` ad almeno 30 px (o secondo le specifiche dello scanner) | +| Il file PNG è vuoto o corrotto | Percorso di output non valido o permessi di scrittura negati | Usa un percorso assoluto o assicurati che l'app abbia i permessi di scrittura | +| Serve una simbologia diversa | L'`EncodeTypes` corrente non è adatto | Sostituisci `EncodeTypes.DatabarOmniDirectional` con un altro valore enum (es., `EncodeTypes.Code128`) | + +## Domande frequenti + +**D: Posso generare altri formati immagine (JPEG, BMP)?** +R: Sì. Sostituisci `BarCodeImageFormat.Png` con `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, ecc. + +**D: Come inserisco il PNG in una pagina web?** +R: Servi il PNG generato tramite un endpoint HTTP o convertilo in una stringa Base64 e inseriscilo nell'attributo `src` di un tag ``. + +**D: È possibile impostare il colore di sfondo?** +R: Usa `generator.Parameters.Image.BackgroundColor = Color.White;` (o qualsiasi `System.Drawing.Color`). + +## Conclusione + +Ora sai come **generare un file PNG di codice a barre** in C# e **regolare con precisione l'altezza del codice a barre** per soddisfare requisiti di scansione o di design. Modificando la proprietà `BarHeight.Pixels` puoi **cambiare l'altezza del codice a barre** al volo e produrre più asset PNG da una singola base di codice. + +Successivamente, esplora altre opzioni di personalizzazione come colore di primo piano, margini e aggiunta di testo leggibile dall'uomo. Puoi anche sperimentare con diverse simbologie (`EncodeTypes.Code128`, `EncodeTypes.QR`) per ampliare la gamma di dati che puoi codificare. + +Buon coding, e che i tuoi codici a barre vengano sempre letti al primo tentativo! + +## 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à aggiuntive dell'API ed esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [Come generare e regolare l'altezza del codice a barre per Databar unidimensionale usando Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Come generare codici a barre - Tipi di codici a barre unidimensionali](/barcode/english/net/one-dimensional-barcode-types/) +- [Come generare un codice Aztec con rapporto d'aspetto personalizzato usando 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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/italian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..9322a9174 --- /dev/null +++ b/barcode/italian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Crea file PNG databar in C# con Aspose.BarCode. Scopri come generare + immagini databar, configurare i parametri databar e salvare l'output PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: it +lastmod: 2026-08-19 +og_description: Crea file PNG databar in C# usando Aspose.BarCode. Questo tutorial + ti guida nella generazione di immagini databar, nella configurazione dei parametri + databar come la dimensione X e il rapporto d'aspetto, e nel salvataggio di file + PNG ad alta qualità per la stampa o l'uso web. +og_image_alt: create databar PNG example +og_title: Crea immagini PNG databar in C# – guida passo passo +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Come creare immagini PNG databar con C# e Aspose.BarCode +url: /it/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Come creare immagini PNG databar con C# e Aspose.BarCode + +Se hai bisogno di **creare file PNG databar** in un'applicazione .NET, questa guida ti mostra esattamente come fare. Vedrai un esempio completo e eseguibile che genera codici DataBar impilati omnidirezionali, configura i parametri chiave e salva due file PNG con diversi rapporti di aspetto. + +Generare un'immagine DataBar non consiste solo nel chiamare un singolo metodo. Devi anche **configurare i parametri databar** come la X‑dimension (larghezza del modulo) e il rapporto di aspetto per soddisfare le specifiche di stampa o scansione. Alla fine di questo tutorial comprenderai **come generare grafica databar** che funziona in modo affidabile in scenari reali. + +## Prerequisiti + +- .NET 6.0 o versioni successive (il codice funziona anche con .NET Framework 4.7+) +- Visual Studio 2022 o qualsiasi IDE compatibile con C# +- Una licenza valida per **Aspose.BarCode for .NET** (la valutazione gratuita è sufficiente per i test) +- Familiarità di base con la sintassi C# + +> **Consiglio:** Se non hai ancora una licenza, puoi richiedere una chiave di valutazione temporanea dal portale Aspose. L'API si comporta allo stesso modo; solo la filigrana cambia. + +## Passo 1: Installa il pacchetto NuGet Aspose.BarCode + +Apri il tuo progetto in Visual Studio, fai clic con il tasto destro sulla soluzione e seleziona **Manage NuGet Packages**. Cerca `Aspose.BarCode` e installa l'ultima versione stabile. + +```bash +dotnet add package Aspose.BarCode +``` + +Questo comando aggiunge l'assembly `Aspose.BarCode` al tuo progetto e rende disponibile la classe `BarcodeGenerator`. + +## Passo 2: Inizializza il generatore di codici a barre per un DataBar impilato omnidirezionale + +Il costruttore `BarcodeGenerator` riceve due argomenti: il tipo di codice a barre e la stringa di dati grezzi. Per un DataBar impilato omnidirezionale si utilizza `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Perché è importante:** La costante `EncodeTypes.DatabarStackedOmniDirectional` indica alla libreria di produrre un codice a barre leggibile da qualsiasi orientamento, ideale per le etichette sugli scaffali dei negozi. + +## Passo 3: Configura la X‑dimension (larghezza del modulo) in pixel + +La X‑dimension controlla la dimensione dell'elemento barra più piccolo. Impostarla in pixel ti offre un controllo preciso sulla dimensione finale dell'immagine. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Un valore di **2 pixel** è un buon compromesso tra leggibilità e compattezza per la maggior parte delle stampanti di etichette. Regola questo valore se ti servono moduli più grandi o più piccoli. + +## Passo 4: Imposta il primo rapporto di aspetto e salva il PNG + +Il rapporto di aspetto influenza l'altezza del DataBar impilato. Un rapporto di aspetto di **15** produce un codice a barre relativamente corto, mentre **30** lo rende più alto. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Il metodo `Save` scrive il codice a barre generato in un file PNG. PNG è senza perdita, il che preserva i bordi nitidi richiesti dagli scanner di codici a barre. + +## Passo 5: Cambia il rapporto di aspetto e salva un secondo PNG + +Puoi riutilizzare la stessa istanza `BarcodeGenerator` per produrre variazioni semplicemente cambiando il rapporto di aspetto. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Ora hai due file PNG—`DatabarAspectRatio15.png` e `DatabarAspectRatio30.png`—ognuno con una diversa densità visiva. + +## Passo 6: Verifica l'output + +Apri i file PNG generati in qualsiasi visualizzatore di immagini. Dovresti vedere un codice DataBar pulito e ad alto contrasto. La scansione delle immagini con uno scanner di codici a barre per smartphone conferma che entrambi i rapporti di aspetto decodificano il valore GTIN originale `12345678901231`. + +![crea esempio PNG databar](databar_example.png) + +*L'immagine sopra mostra i due file PNG affiancati. L'immagine di sinistra utilizza il rapporto di aspetto 15, quella di destra utilizza il rapporto di aspetto 30.* + +## Variazioni comuni e casi limite + +| Scenario | Cosa modificare | Motivo | +|----------|----------------|--------| +| **Dati diversi** | Sostituisci la stringa `(01)12345678901231` con qualsiasi identificatore di applicazione GS1 valido e dati | Ti consente di codificare ID prodotto, numeri di serie, ecc. | +| **Risoluzione più alta** | Aumenta `XDimension.Pixels` a 3 o 4 | Necessario quando il codice a barre verrà stampato in grandi dimensioni o scansionato da una distanza. | +| **Altri tipi di DataBar** | Usa `EncodeTypes.DatabarStacked` o `EncodeTypes.DatabarExpanded` | Scegli il tipo che meglio si adatta al layout della tua etichetta. | +| **Sfondo trasparente** | Passa `BarCodeImageFormat.Png` con `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Utile per sovrapporre il codice a barre su etichette colorate. | + +> **Attenzione:** Impostare una X‑dimension troppo piccola (< 1 pixel) può produrre un codice a barre che appare sfocato dopo + +## 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à aggiuntive dell'API ed esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [Come generare e regolare l'altezza del codice a barre One-Dimensional Databar usando Aspose.BarCode per .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Creare codifica GS1 One-Dimensional Databar con Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generare codice a barre Databar Aspose.BarCode usando l'API .NET – Configurazione di righe e colonne](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/italian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..2fe8f16e6 --- /dev/null +++ b/barcode/italian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,211 @@ +--- +category: general +date: 2026-08-19 +description: Scopri come generare il codice a barre postale in C# usando Aspere.BarCode. + Questa guida passo passo mostra come generare il codice a barre per i formati Planet + e RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: it +lastmod: 2026-08-19 +og_description: Genera barcode postale in C# con Aspose.BarCode. Segui questa guida + per imparare a generare barcode per Planet e RM4SCC con dimensioni personalizzate. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Genera codice a barre postale in C# – guida completa ad Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Come generare un codice a barre postale in C# con Aspose.BarCode +url: /it/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Come generare il codice a barre postale in C# con Aspose.BarCode + +Se hai bisogno di **generare un codice a barre postale** per applicazioni di spedizione, questa guida ti mostra esattamente come creare il codice a barre usando la libreria Aspose.BarCode. Vedrai un esempio completo e funzionante che crea sia un codice a barre Planet (altezza calcolata automaticamente) sia un codice a barre RM4SCC con un’altezza delle barre esplicita. + +Generare codici a barre postali è una necessità comune per software di logistica, stampanti di etichette automatiche e sistemi di spedizione di massa. Alla fine di questo tutorial sarai in grado di integrare la generazione di codici a barre in qualsiasi progetto .NET, personalizzare la dimensione X‑ (larghezza del modulo) e controllare l’altezza delle barre quando il formato standard lo consente. + +**Cosa imparerai** + +* Come configurare Aspose.BarCode in un progetto C#. +* Come generare codici a barre postali Planet e RM4SCC. +* Come regolare la dimensione X‑ (larghezza del modulo) e l’altezza delle barre. +* Come salvare il risultato come immagine PNG. + +Non sono richiesti servizi esterni—tutto funziona in locale dopo aver referenziato il pacchetto NuGet Aspose.BarCode. + +## Prerequisiti + +* .NET 6.0 SDK o successivo (il codice funziona anche con .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code o qualsiasi IDE C# tu preferisca. +* Pacchetto Aspose.BarCode per .NET – installalo tramite NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generare un codice a barre postale con Aspose.BarCode + +Le sezioni seguenti ti guidano passo passo, dalla creazione degli oggetti generatore al salvataggio dei file PNG finali. + +### Passo 1: Creare un codice a barre Planet (altezza automatica) + +Planet è un codice a barre postale usato in molti paesi per l’ordinamento della posta. Quando crei un codice a barre Planet, la libreria determina automaticamente l’altezza ottimale delle barre in base ai dati codificati. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Perché funziona** – `EncodeTypes.Planet` indica ad Aspose.BarCode di utilizzare la simbologia Planet. La proprietà `XDimension` controlla la larghezza della barra più piccola (il modulo). Poiché Planet non richiede un’altezza fissa delle barre, la libreria calcola automaticamente un’altezza adeguata, semplificando il codice. + +### Passo 2: Creare un codice a barre RM4SCC con altezza esplicita + +RM4SCC è un’altra simbologia postale che spesso richiede un’altezza specifica delle barre per la compatibilità con gli scanner. Il codice seguente mostra come impostare quell’altezza manualmente. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Perché impostare l’altezza** – Alcuni scanner postali richiedono un’altezza minima delle barre. Assegnando `BarHeight.Pixels = 100`, garantisci che l’immagine generata soddisfi tali requisiti. La dimensione X rimane coerente con il codice Planet in modo che entrambe le immagini condividano la stessa densità visiva. + +### Passo 3: Verificare l’output + +Dopo aver eseguito il programma, apri i due file PNG situati in `YOUR_DIRECTORY`. Dovresti vedere due codici a barre distinti: + +* `PostalPlanetBarHeightNone.png` – un codice Planet con altezza calcolata automaticamente. +* `PostalRM4SCCBarHeight100Pixels.png` – un codice RM4SCC con un’altezza di 100 pixel. + +Entrambe le immagini possono essere inviate direttamente a stampanti di etichette o visualizzate in un’applicazione web. + +![Immagine del codice a barre postale generato con Aspose.BarCode](generated-postal-barcode.png) + +*Testo alternativo dell’immagine:* **Immagine del codice a barre postale** generata con Aspose.BarCode (dimostra come generare un codice a barre postale). + +## Come generare un codice a barre con dimensioni personalizzate (avanzato) + +Se devi perfezionare altri parametri—come margini, posizionamento del testo o colore—Aspose.BarCode fornisce un ricco oggetto `Parameters`. Di seguito un esempio rapido che aggiunge uno sfondo bianco e disabilita il testo leggibile dall’uomo. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Quando usarlo** – Disabilitare il testo leggibile è comune per l’ordinamento automatico dove conta solo il pattern leggibile dalla macchina. Impostare un colore di sfondo garantisce che il codice a barre venga stampato correttamente su supporti trasparenti. + +## Problemi comuni e consigli professionali + +| Problema | Perché si verifica | Soluzione | +|----------|--------------------|-----------| +| Il codice a barre appare allungato | La dimensione X è troppo grande rispetto alle dimensioni dell’immagine | Mantieni `XDimension.Pixels` tra 2 e 5 per la maggior parte dei codici postali | +| Lo scanner rifiuta l’immagine | L’altezza delle barre è inferiore al minimo richiesto dal servizio postale | Usa `BarHeight.Pixels` ≥ 80 per RM4SCC, salvo diversa specifica | +| La dimensione del file PNG è elevata | La risoluzione dell’immagine è più alta del necessario | Salva come PNG‑8 (`BarCodeImageFormat.Png8`) o riduci le dimensioni in pixel | + +**Consiglio professionale:** Testa sempre il codice a barre generato con uno scanner reale prima di passare in produzione. Piccole differenze visive possono influire sulla leggibilità. + +## Codice sorgente completo + +Copia l’intero blocco qui sotto in una nuova applicazione console (`Program.cs`). Regola i percorsi di output a una cartella in cui il tuo processo possa scrivere. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +L’esecuzione del programma stampa *“Barcodes generated successfully.”* e crea i due file PNG nella directory di lavoro dell’eseguibile. + +## Conclusione + +Ora sai come **generare un codice a barre postale** in C# con Aspose.BarCode, coprendo sia i codici Planet a altezza automatica sia i codici RM4SCC a altezza fissa. La guida ha anche mostrato **come generare un codice a barre** con dimensione X personalizzata, altezza delle barre e opzioni visive, fornendo una solida base per qualsiasi progetto di automazione della posta. + +Passi successivi che potresti esplorare: + +* Integrare i PNG generati in una fattura PDF usando Aspose.PDF. +* Cambiare il formato di output in SVG per grafica vettoriale scalabile. +* Utilizzare la classe `BarcodeReader` per verificare i dati codificati programmaticamente. + +Sentiti libero di sperimentare con diverse simbologie (ad es., `EncodeTypes.Postnet`) e condividere i tuoi risultati con la community. Buona programmazione! + +## 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à aggiuntive dell’API e a esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [Come generare un’immagine di codice a barre con personalizzazione dello spazio supplementare usando Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Come generare un codice a barre – Configurazione Code 39 con Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Come generare codici DataMatrix (ECC 200) con Aspose.BarCode per .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/japanese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..b59f50751 --- /dev/null +++ b/barcode/japanese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,247 @@ +--- +category: general +date: 2026-08-19 +description: C# バーコードジェネレータのチュートリアルでは、DataBar Expanded Stacked バーコードの生成方法、バーコードサイズのカスタマイズ、行と列の設定方法を示します。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: ja +lastmod: 2026-08-19 +og_description: C# バーコードジェネレーターのチュートリアルでは、DataBar バーコードの生成方法、サイズのカスタマイズ、正確な出力のための行と列の設定方法を学べます。 +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# バーコードジェネレーター – カスタム DataBar バーコードのステップバイステップガイド +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: C# バーコードジェネレーター:カスタム DataBar バーコードの作成 +url: /ja/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# バーコードジェネレーター: カスタム DataBar バーコードを作成 + +If you need a **c# barcode generator** that can produce DataBar Expanded Stacked symbols, this guide shows you exactly how to generate barcode images with custom rows and columns. You’ll learn to configure databar parameters, adjust barcode size, and save the result as PNG files. + +Generating barcodes programmatically removes manual design steps and guarantees consistent output across platforms. In this tutorial you will: + +* Install and reference the Aspose.BarCode for .NET library (or any compatible package). +* Create a barcode generator for the DataBar Expanded Stacked symbology. +* **How to generate barcode** images with specific column and row settings. +* **Customize barcode size** by controlling DataBar rows and columns. +* **Configure databar parameters** such as text, format, and image quality. + +## 前提条件 + +* .NET 6.0 SDK 以降がインストールされていること。 +* C# 開発環境 (Visual Studio、VS Code、Rider など)。 +* NuGet パッケージ `Aspose.BarCode`(または `BarcodeGenerator`、`EncodeTypes`、`BarCodeImageFormat` を提供する同等のライブラリ)。 + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## C# バーコードジェネレーターを使用して DataBar バーコードを作成する + +The following sections walk you through each step. The primary focus is on the **c# barcode generator** API, but the same pattern applies to other barcode libraries that expose similar properties. + +### 手順 1: サンプルテキストでバーコードジェネレーターを初期化する + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*このステップの目的は?* +`BarcodeGenerator` はすべてのバーコード作成タスクのエントリーポイントです。`EncodeTypes.DatabarExpandedStacked` 列挙体を指定することで、使用するシンボロジーをライブラリに指示し、テキスト引数はシンボルにエンコードされる人間が読める値になります。 + +### 手順 2: 列数を設定する(デフォルトの行が使用されます) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*このステップの目的は?* +DataBar Expanded Stacked シンボルは積み重ねられた線形要素で構成されています。`Columns` プロパティを調整すると水平密度が変わり、全体の高さを増やさずに長いデータ文字列を収めることができます。これにより **customizes barcode size** が直接実現されます。 + +### 手順 3: 4 列を使用したバーコード画像を保存する + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*表示内容:* +保存された `DatabarCols4.png` 画像は、4 列を含むためデフォルトよりも幅が広い DataBar バーコードを表示します。任意の画像ビューアでファイルを開き、出力を確認できます。 + +### 手順 4: 新しい構成のためにジェネレーターを再初期化する + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*なぜ再初期化するのか?* +`Rows` プロパティを変更しながら前の列設定を保持すると、予期しない組み合わせが生じる可能性があります。新しいインスタンスで開始することで、意図したパラメータ(`Rows`)だけが次の画像に影響することが保証されます。 + +### 手順 5: 行数を設定する(デフォルトの列が使用されます) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*このステップの目的は?* +`Rows` プロパティは垂直方向の積み重ねを制御します。行数を増やすとバーコードが高くなり、横方向のスペースが限られているが縦方向に余裕がある場合に有用です。これは **customize barcode size** を実現する別の方法です。 + +### 手順 6: 3 行を使用したバーコード画像を保存する + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*結果:* +`DatabarRows3.png` は、3 行の積み重ねで高さが増したバーコードを示し、**configure databar parameters** が視覚的外観に与える影響を実証しています。 + +## 完全な実行可能サンプル + +Below is a complete program that you can copy, paste, and run. It includes all imports, error handling, and comments for clarity. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**期待される出力** + +Running the program produces two PNG files: + +* `DatabarCols4.png` – a wide DataBar barcode with four columns. +* `DatabarRows3.png` – a tall DataBar barcode with three rows. + +Open the images to confirm that the barcode dimensions match the configured parameters. + +## よくある質問とエッジケースの対処 + +| Question | Answer | +|----------|--------| +| *カスタム行 **and** 列の両方が必要な場合はどうすればよいですか?* | `Save` を呼び出す前に、同じ `BarcodeGenerator` インスタンスで `Rows` **and** `Columns` を設定します。ライブラリは両方の値を組み合わせて、要求されたサイズのグリッドを生成します。 | +| *画像フォーマットを変更できますか?* | はい。`BarCodeImageFormat.Png` を `Jpeg`、`Bmp`、または `Gif` に置き換えて、ワークフローに合わせてください。 | +| *テキストがシンボルの容量を超えるとどうなりますか?* | ジェネレーターは `ArgumentException` をスローします。テキストを短くするか、`Columns`/`Rows` を増やして容量を確保してください。 | +| *DPI や画像解像度を設定する方法はありますか?* | `generator.Parameters.ImageResolution` を使用して、保存前に希望の DPI を指定します。これにより高解像度印刷向けに **customizes barcode size** がさらに行われます。 | +| *ライブラリは他の DataBar バリアントをサポートしていますか?* | はい。`EncodeTypes.DatabarExpandedStacked` を `DatabarExpanded`、`DatabarLimited` などに置き換えて、同じパラメータ構造を維持します。 | + +## 信頼性の高いバーコード生成のためのヒント + +* **Pro tip:** 本番環境にデプロイする前に、スキャナーまたはモバイルアプリで生成された画像を必ず確認してください。 +* **Watch out for:** Null または空の出力ディレクトリ — パスが存在しない場合、`Save` は例外をスローします。必要に応じてプログラムでフォルダーを作成してください。 +* **Performance note:** 1 つの `BarcodeGenerator` インスタンスを再利用し、`Rows` または `Columns` のみを変更することで、ループで多数のバーコードを生成する際のオブジェクト生成オーバーヘッドを削減できます。 + +## 結論 + +これで **c# barcode generator** を使用して **databar barcode** 画像を **作成**し、**barcode size** を **カスタマイズ**し、行や列などの **databar parameters** を **設定**する方法がわかりました。これらの設定を調整することで、スキャンの信頼性を保ちつつ、任意のレイアウト要件にバーコードを合わせることができます。 + +次に、**how to generate barcode** PDF の作成、レポートへのバーコード埋め込み、他のシンボロジー(QR、Code‑128 など)への切り替えなどの関連トピックを探求してください。さまざまな `Rows`、`Columns`、画像解像度を試して、特定のユースケースに最適な構成を見つけましょう。 + +--- + +## 次に学ぶべきことは? + +以下のチュートリアルは、本ガイドで示した手法を基にした密接に関連するトピックをカバーしています。各リソースには、ステップバイステップの解説と完全な動作コード例が含まれており、追加の API 機能を習得し、プロジェクトで代替実装アプローチを探求するのに役立ちます。 + +- [Aspose.BarCode for .NET を使用した一次元 Databar のバーコード高さの生成と調整方法](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Aspose.BarCode .NET API を使用して一次元 Databar 2D バーコードを生成する](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Aspose.BarCode Databar バーコードを .NET API で生成 – 行と列の構成](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/japanese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..ec7d9b955 --- /dev/null +++ b/barcode/japanese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,213 @@ +--- +category: general +date: 2026-08-19 +description: C#でバーコードのPNGファイルを生成し、高さを調整する方法を学びます。バーコード画像の生成方法とバーコードの高さを簡単に変更する手順を網羅しています。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: ja +lastmod: 2026-08-19 +og_description: C#でバーコードのPNGファイルを作成し、バーコード画像の生成方法、バーコードの高さの調整、最適なスキャンのための高さ変更を学びましょう。 +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: C#でバーコードPNGファイルを作成する – ステップバイステップガイド +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: C#で高さを調整可能なバーコードPNGファイルの作成方法 +url: /ja/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C#で高さ調整可能なバーコードPNGファイルを作成する方法 + +C#で **バーコードPNGファイル** を作成する必要がある場合、このガイドで手順を正確に示します。**バーコードの生成方法** と **バーコードの高さを調整する方法** を示す、完全に実行可能なサンプルをご覧いただけます。 + +バーコードPNGファイルの生成は、在庫管理システム、POS端末、機械可読データを印刷または表示する必要があるあらゆるアプリケーションで一般的な要件です。このチュートリアルの最後までに、バーコードの高さを変更し、複数のPNGファイルを保存し、高さがスキャンの信頼性に与える影響を理解できるようになります。 + +## 前提条件 + +* .NET 6.0 SDK 以降がインストールされていること +* Visual Studio 2022(または .NET をサポートする任意の IDE) +* **Aspose.BarCode for .NET** NuGet パッケージ(コードサンプルはこのライブラリを使用) + +コマンドラインからパッケージを追加できます: + +```bash +dotnet add package Aspose.BarCode +``` + +> **プロのコツ:** Aspose.BarCode の無料評価版は開発およびテストで使用できます。製品版では、ライセンスキーを取得してください。 + +## バーコードライブラリのインストール + +最初のステップはプロジェクトにライブラリを参照することです。C# ファイルの先頭に以下の `using` ディレクティブを追加します。 + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +## バーコードPNGファイルの作成 + +ここでは **バーコードPNGファイル** を出力する `BarcodeGenerator` インスタンスを作成します。例では Databar OmniDirectional シンボロジーを使用していますが、`EncodeTypes.DatabarOmniDirectional` を任意のサポートされているタイプに置き換えることができます。 + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +`"(01)12345678901231"` の文字列は 14 桁 GTIN の GS1 アプリケーション識別子形式に従っています。データはご自身の製品識別子に合わせて調整してください。 + +## X‑ディメンションの設定(任意) + +X‑ディメンションは単一のバーコードモジュールの幅を定義します。ピクセル単位の値にすることで画像サイズを正確に制御できます。 + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +`2` ピクセルの値はほとんどの画面表示でうまく機能します。印刷時により大きなバーコードが必要な場合は増やしてください。 + +## バーコードの高さを調整してバーコードPNGファイルを保存する + +**BarHeight** プロパティはバーの垂直サイズを制御します。この値を変更することで、エンコードされたデータに影響を与えることなく **バーコードの高さを調整** できます。 + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +`DatabarBarHeight30Pixels.png` ファイルは高さ 30 ピクセルの **バーコードPNGファイル** です。 + +**バーコードの高さを変更** して2枚目の画像を作成するには、新しい値を代入して `Save` を再度呼び出すだけです: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +これで 30 px と 60 px の2つの PNG ファイルが作成され、**バーコードの高さを動的に調整** する方法が示されました。 + +### バーコードの高さが重要な理由 + +* **可読性:** スキャナは信頼できる検出のために最低限の高さを期待します。特に低解像度カメラでは、バーコードが短すぎると検出されないことがあります。 +* **美観:** バーコードの高さを周囲のデザイン要素に合わせることで、よりすっきりした UI が実現します。 +* **印刷制約:** ラベルプリンタの中には高さが固定されたスロットがあるものがあります。バーコードの高さを調整することでフィットさせられます。 + +**ベストプラクティス:** 高さは X‑ディメンションの倍数に保ちます(例: X‑ディメンションが 2 px の場合は 30 px)。これにより比例が保たれ、歪みを防げます。 + +## 完全なサンプル + +以下は、コンソールアプリケーションに貼り付けてすぐに実行できる、完全な自己完結型プログラムです。 + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**期待される出力** + +プログラムを実行すると、実行ファイルの作業ディレクトリに2つのファイルが作成されます: + +* `DatabarBarHeight30Pixels.png` – 高さ30ピクセルのバーコードPNGファイル +* `DatabarBarHeight60Pixels.png` – 高さ60ピクセルのバーコードPNGファイル + +任意の画像ビューアでどちらかの PNG を開くと、スキャン可能なクリアな Databar OmniDirectional バーコードが表示されます。 + +## エッジケースとトラブルシューティング + +| Situation | What to check | Recommended fix | +|-----------|---------------|-----------------| +| バーコードがぼやけて表示される | 選択した高さに対して X‑ディメンションが低すぎる | `XDimension.Pixels` を増やす(例: 2 から 3 へ) | +| 低高さのバーコードでスキャナが失敗する | 高さがスキャナの最小要件を下回っている | `BarHeight.Pixels` を最低でも30 pxに設定する(またはスキャナの仕様に従う) | +| PNG ファイルが空または破損している | 出力パスが無効、または書き込み権限がない | 絶対パスを使用するか、アプリに書き込み権限があることを確認する | +| 別のシンボロジーが必要 | 現在の `EncodeTypes` が適切でない | `EncodeTypes.DatabarOmniDirectional` を別の列挙値に置き換える(例: `EncodeTypes.Code128`) | + +## よくある質問 + +**Q: 他の画像形式(JPEG、BMP)で生成できますか?** +A: はい。`BarCodeImageFormat.Png` を `BarCodeImageFormat.Jpeg`、`BarCodeImageFormat.Bmp` などに置き換えてください。 + +**Q: PNG をウェブページに埋め込むにはどうすればよいですか?** +A: 生成した PNG を HTTP エンドポイントで配信するか、Base64 文字列に変換して `` タグの `src` 属性に設定します。 + +**Q: 背景色を設定する方法はありますか?** +A: `generator.Parameters.Image.BackgroundColor = Color.White;`(または任意の `System.Drawing.Color`)を使用します。 + +## 結論 + +これで C# で **バーコードPNGファイルを生成** し、スキャンやデザイン要件に合わせて **バーコードの高さを正確に調整** する方法が分かりました。`BarHeight.Pixels` プロパティを変更することで、**バーコードの高さを動的に変更** でき、単一のコードベースから複数の PNG アセットを生成できます。 + +次に、前景色、余白、ヒューマンリーダブルテキストの追加など、他のカスタマイズオプションを検討してください。また、さまざまなシンボロジー(`EncodeTypes.Code128`、`EncodeTypes.QR`)を試すことで、エンコードできるデータの範囲を広げることができます。 + +コーディングを楽しんで、バーコードが常に最初のスキャンで読み取られますように! + +## 次に学ぶべきことは? + +以下のチュートリアルは、本ガイドで示した手法を基にした密接に関連するトピックを扱っています。各リソースには、ステップバイステップの解説と完全な動作コード例が含まれており、追加の API 機能を習得し、プロジェクトで代替実装アプローチを検討するのに役立ちます。 + +- [Aspose.BarCode for .NET を使用した 1 次元 Databar のバーコード高さの生成と調整方法](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [バーコード生成 - 1 次元バーコードタイプ](/barcode/english/net/one-dimensional-barcode-types/) +- [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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/japanese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..475943f69 --- /dev/null +++ b/barcode/japanese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,155 @@ +--- +category: general +date: 2026-08-19 +description: C# と Aspose.BarCode を使用してデータバー PNG ファイルを作成します。データバー画像の生成方法、データバー パラメータの設定方法、PNG + 出力の保存方法を学びます。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: ja +lastmod: 2026-08-19 +og_description: Aspose.BarCode を使用して C# でデータバーの PNG ファイルを作成します。このチュートリアルでは、データバー画像の生成方法、X + ディメンションやアスペクト比などのデータバー パラメータの設定方法、印刷やウェブで使用できる高品質 PNG ファイルの保存方法を順を追って解説します。 +og_image_alt: create databar PNG example +og_title: C#でデータバーPNG画像を作成する – ステップバイステップガイド +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: C# と Aspose.BarCode を使用してデータバー PNG 画像を作成する方法 +url: /ja/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# と Aspose.BarCode を使用して databar PNG 画像を作成する方法 + +.NET アプリケーションで **databar PNG** ファイルを作成する必要がある場合、本ガイドで具体的な手順を示します。スタック型全方向 DataBar コードを生成し、主要パラメータを設定し、異なるアスペクト比の PNG ファイルを 2 つ保存する、完全に実行可能なサンプルをご覧いただけます。 + +DataBar 画像の生成は単にメソッドを呼び出すだけではありません。印刷やスキャンの仕様を満たすために、X‑dimension(モジュール幅)やアスペクト比など **databar パラメータを設定** する必要があります。このチュートリアルの最後までに、実際のシナリオで信頼性のある **databar グラフィックを生成する方法** が理解できるようになります。 + +## 前提条件 + +- .NET 6.0 以降(コードは .NET Framework 4.7+ でも動作します) +- Visual Studio 2022 または任意の C# 対応 IDE +- **Aspose.BarCode for .NET** の有効なライセンス(無料評価版でもテストは可能) +- C# の基本的な構文に慣れていること + +> **プロのコツ:** まだライセンスをお持ちでない場合は、Aspose ポータルから一時的な評価キーをリクエストできます。API の動作は同じで、変わるのは透かしだけです。 + +## Step 1: Install the Aspose.BarCode NuGet package + +Visual Studio でプロジェクトを開き、ソリューションを右クリックして **Manage NuGet Packages** を選択します。`Aspose.BarCode` を検索し、最新の安定版をインストールします。 + +```bash +dotnet add package Aspose.BarCode +``` + +このコマンドにより `Aspose.BarCode` アセンブリがプロジェクトに追加され、`BarcodeGenerator` クラスが利用可能になります。 + +## Step 2: Initialize the barcode generator for a stacked omnidirectional DataBar + +`BarcodeGenerator` コンストラクタは 2 つの引数を受け取ります:バーコードの種類と生データ文字列です。スタック型全方向 DataBar を使用する場合は `EncodeTypes.DatabarStackedOmniDirectional` を指定します。 + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**重要ポイント:** `EncodeTypes.DatabarStackedOmniDirectional` 定数は、任意の向きから読み取れるバーコードを生成するようライブラリに指示します。これは小売棚ラベルに最適です。 + +## Step 3: Configure the X‑dimension (module width) in pixels + +X‑dimension は最小バー要素のサイズを制御します。ピクセル単位で設定することで、最終画像サイズを正確にコントロールできます。 + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +**2 ピクセル** の値は、ほとんどのラベルプリンターで可読性とコンパクトさのバランスが取れた設定です。必要に応じてモジュールを大きくしたり小さくしたりしてください。 + +## Step 4: Set the first aspect ratio and save the PNG + +アスペクト比はスタック型 DataBar の高さに影響します。アスペクト比 **15** は比較的短いバーコードを生成し、**30** はより高くなります。 + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +`Save` メソッドは生成したバーコードを PNG ファイルとして書き出します。PNG はロスレス形式なので、バーコードスキャナが必要とする鮮明なエッジが保持されます。 + +## Step 5: Change the aspect ratio and save a second PNG + +同じ `BarcodeGenerator` インスタンスを再利用し、アスペクト比を変更するだけでバリエーションを作成できます。 + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +これで 2 つの PNG ファイル、`DatabarAspectRatio15.png` と `DatabarAspectRatio30.png` が作成され、それぞれ異なる視覚密度を持ちます。 + +## Step 6: Verify the output + +生成された PNG ファイルを任意の画像ビューアで開きます。クリーンで高コントラストな DataBar バーコードが表示されるはずです。スマートフォンのバーコードスキャナで画像を読み取ると、両方のアスペクト比が元の GTIN 値 `12345678901231` に正しくデコードされることが確認できます。 + +![create databar PNG example](databar_example.png) + +*上の画像は 2 つの PNG ファイルを横に並べたものです。左側がアスペクト比 15、右側がアスペクト比 30 を使用しています。* + +## Common variations and edge cases + +| シナリオ | 変更点 | 理由 | +|----------|----------------|--------| +| **異なるデータ** | `(01)12345678901231` の文字列を任意の有効な GS1 アプリケーション識別子とデータに置き換える | 製品 ID、シリアル番号などをエンコードできるようにするため | +| **高解像度** | `XDimension.Pixels` を 3 または 4 に増やす | 大きなサイズで印刷したり、遠距離からスキャンする場合に必要 | +| **他の DataBar タイプ** | `EncodeTypes.DatabarStacked` または `EncodeTypes.DatabarExpanded` を使用する | ラベルレイアウトに最適なタイプを選択できる | +| **透明背景** | `BarCodeImageFormat.Png` と共に `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` を渡す | カラフルなラベル上にバーコードを重ねる際に便利 | + +> **注意点:** X‑dimension を 1 ピクセル未満に設定すると、画像がぼやけたように見えるバーコードが生成される可能性があります。 + +## What Should You Learn Next? + +以下のチュートリアルは、本ガイドで示した手法を基にした、密接に関連するトピックをカバーしています。各リソースには、ステップバイステップの解説と完全な動作コード例が含まれており、追加の API 機能を習得したり、プロジェクトで代替実装アプローチを検討したりするのに役立ちます。 + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/japanese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..8d2b0ca57 --- /dev/null +++ b/barcode/japanese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,209 @@ +--- +category: general +date: 2026-08-19 +description: C# と Aspere.BarCode を使用して郵便バーコードを生成する方法を学びましょう。このステップバイステップガイドでは、Planet + と RM4SCC 形式のバーコードの生成方法を示します。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: ja +lastmod: 2026-08-19 +og_description: Aspose.BarCode を使用して C# で郵便バーコードを生成します。このガイドに従って、Planet と RM4SCC のカスタム寸法でバーコードを作成する方法を学びましょう。 +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: C#で郵便バーコードを生成する – 完全なAspose.BarCodeガイド +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Aspose.BarCode を使用して C# で郵便バーコードを生成する方法 +url: /ja/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# と Aspose.BarCode で郵便バーコードを生成する方法 + +メールアプリケーション向けに **郵便バーコードを生成** する必要がある場合、このガイドでは Aspose.BarCode ライブラリを使用してバーコードを生成する方法を正確に示します。Planet バーコード(高さは自動計算)と、明示的なバー高さを持つ RM4SCC バーコードの両方を作成する完全な実行可能サンプルが確認できます。 + +郵便バーコードの生成は、物流ソフトウェア、ラベルプリンターの自動化、そして大量郵送システムにおいて一般的な要件です。このチュートリアルの最後までに、任意の .NET プロジェクトにバーコード生成を組み込み、X‑dimension(モジュール幅)をカスタマイズし、標準フォーマットが許す場合はバー高さを制御できるようになります。 + +**学べること** + +* C# プロジェクトで Aspose.BarCode を設定する方法。 +* Planet と RM4SCC の郵便バーコードを生成する方法。 +* X‑dimension(モジュール幅)とバー高さを調整する方法。 +* 結果を PNG 画像として保存する方法。 + +外部サービスは不要です—Aspose.BarCode の NuGet パッケージを参照すれば、すべてローカルで実行できます。 + +## 前提条件 + +* .NET 6.0 SDK 以降(コードは .NET Framework 4.7+ でも動作します)。 +* Visual Studio 2022、Visual Studio Code、またはお好みの C# IDE。 +* Aspose.BarCode for .NET パッケージ – NuGet でインストールします: + +```bash +dotnet add package Aspose.BarCode +``` + +## Aspose.BarCode で郵便バーコードを生成する + +以下のセクションでは、ジェネレーターオブジェクトの作成から最終的な PNG ファイルの保存まで、各ステップを順に説明します。 + +### 手順 1: Planet バーコードを作成(自動高さ) + +Planet は多くの国で郵便物の仕分けに使用される郵便バーコードです。Planet バーコードを作成すると、ライブラリはエンコードされたデータに基づいて最適なバー高さを自動的に決定します。 + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**なぜこれが機能するか** – `EncodeTypes.Planet` は Aspose.BarCode に Planet シンボルを使用するよう指示します。`XDimension` プロパティは最小バー(モジュール)の幅を制御します。Planet は固定のバー高さを必要としないため、ライブラリは適切な高さを自動的に計算し、コードがシンプルになります。 + +### 手順 2: 明示的な高さを持つ RM4SCC バーコードを作成 + +RM4SCC は別の郵便シンボルで、スキャナーとの互換性のために特定のバー高さが必要になることがあります。以下のコードは、その高さを手動で設定する方法を示しています。 + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**なぜ高さを設定するのか** – 一部の郵便スキャナーは最小バー高さを要求します。`BarHeight.Pixels = 100` を設定することで、生成された画像がその要件を満たすことを保証します。X‑dimension は Planet バーコードと同じに保たれるため、両画像は同じ視覚密度を共有します。 + +### 手順 3: 出力を確認 + +プログラムを実行した後、`YOUR_DIRECTORY` にある 2 つの PNG ファイルを開きます。2 つの異なるバーコードが表示されるはずです: + +* `PostalPlanetBarHeightNone.png` – 自動計算された高さの Planet バーコード。 +* `PostalRM4SCCBarHeight100Pixels.png` – 高さ 100 ピクセルの RM4SCC バーコード。 + +両方の画像はラベルプリンターに直接送信したり、Web アプリケーションで表示したりできます。 + +![Aspose.BarCode を使用して生成された郵便バーコード画像](generated-postal-barcode.png) + +*画像の代替テキスト:* **生成された郵便バーコード** 画像(Aspose.BarCode を使用して郵便バーコードの生成方法を示す)。 + +## カスタム寸法でバーコードを生成する方法(上級編) + +余白、テキスト配置、色などの他のパラメータを微調整する必要がある場合、Aspose.BarCode は豊富な `Parameters` オブジェクトを提供します。以下は、白背景を追加し、人が読めるテキストを無効にする簡単な例です。 + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**使用するタイミング** – 人が読めるテキストを無効にするのは、機械が読み取るパターンだけが重要な自動仕分けで一般的です。背景色を設定すると、透明メディア上でもバーコードが正しく印刷されます。 + +## よくある落とし穴とプロのコツ + +| 問題 | 発生理由 | 対策 | +|-------|----------------|-----| +| バーコードが伸びて見える | X‑dimension が画像サイズに対して大きすぎる | ほとんどの郵便バーコードで `XDimension.Pixels` を 2〜5 の間に保つ | +| スキャナーが画像を拒否する | バー高さが郵便サービスが要求する最小値未満 | RM4SCC の場合、仕様で別途指定がない限り `BarHeight.Pixels` を 80 以上にする | +| PNG ファイルサイズが大きい | 画像解像度が必要以上に高い | `BarCodeImageFormat.Png8` で保存するか、ピクセル寸法を縮小する | + +**プロのコツ:** 本番環境に導入する前に、必ず実際のスキャナーで生成されたバーコードをテストしてください。小さな視覚的差異が読み取り可能性に影響することがあります。 + +## 完全なソースコード + +以下のブロック全体を新しいコンソールアプリケーション(`Program.cs`)にコピーしてください。出力パスを、プロセスが書き込み可能なフォルダーに調整します。 + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +プログラムを実行すると *“Barcodes generated successfully.”* と表示され、実行ファイルの作業ディレクトリに 2 つの PNG ファイルが作成されます。 + +## 結論 + +これで、C# と Aspose.BarCode を使用して **郵便バーコードを生成** する方法が分かりました。自動高さの Planet バーコードと固定高さの RM4SCC バーコードの両方をカバーしています。また、カスタム X‑dimension、バー高さ、ビジュアルオプションで **バーコードを生成** する方法も示し、あらゆる郵便自動化プロジェクトの確固たる基盤を提供します。 + +次に検討できるステップ: + +* Aspose.PDF を使用して生成した PNG を PDF 請求書に統合する。 +* 出力形式を SVG に切り替えてスケーラブルベクタ画像にする。 +* `BarcodeReader` クラスを使用して、エンコードされたデータをプログラムで検証する。 + +さまざまなシンボル(例: `EncodeTypes.Postnet`)を試してみて、結果をコミュニティと共有してください。コーディングを楽しんで! + +## 次に学ぶべきことは? + +以下のチュートリアルは、本ガイドで示した手法を基にした密接に関連するトピックを取り上げています。各リソースは、ステップバイステップの解説と完全な動作コード例を含み、追加の API 機能を習得し、独自プロジェクトで代替実装アプローチを探求するのに役立ちます。 + +- [Aspose.BarCode を使用した補足スペースカスタマイズでバーコード画像を生成する方法](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Aspose.BarCode でバーコードを生成 – Code 39 設定](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Aspose.BarCode for .NET で DataMatrix バーコード (ECC 200) を生成する方法](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/korean/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..5475d1e35 --- /dev/null +++ b/barcode/korean/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,249 @@ +--- +category: general +date: 2026-08-19 +description: C# 바코드 생성기 튜토리얼에서는 DataBar Expanded Stacked 바코드를 생성하는 방법, 바코드 크기를 맞춤 + 설정하는 방법, 그리고 행과 열을 구성하는 방법을 보여줍니다. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: ko +lastmod: 2026-08-19 +og_description: C# 바코드 생성기 튜토리얼은 DataBar 바코드를 생성하고, 크기를 맞춤 설정하며, 정확한 출력을 위해 행과 열을 + 구성하는 방법을 알려줍니다. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# 바코드 생성기 – 맞춤형 DataBar 바코드에 대한 단계별 가이드 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C# 바코드 생성기: 맞춤형 DataBar 바코드 만들기' +url: /ko/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# 바코드 생성기: 맞춤 DataBar 바코드 만들기 + +DataBar Expanded Stacked 심볼을 생성할 수 있는 **c# barcode generator**가 필요하다면, 이 가이드는 맞춤 행과 열을 사용하여 바코드 이미지를 생성하는 방법을 정확히 보여줍니다. databar 매개변수를 구성하고, 바코드 크기를 조정하며, 결과를 PNG 파일로 저장하는 방법을 배울 수 있습니다. + +바코드를 프로그래밍 방식으로 생성하면 수동 디자인 단계가 사라지고 플랫폼 전반에 걸쳐 일관된 출력이 보장됩니다. 이 튜토리얼에서 여러분은 다음을 수행합니다: + +* Aspose.BarCode for .NET 라이브러리(또는 호환 패키지)를 설치하고 참조합니다. +* DataBar Expanded Stacked 심볼을 위한 바코드 생성기를 만듭니다. +* **How to generate barcode** 이미지를 특정 열 및 행 설정으로 생성합니다. +* **Customize barcode size** 를 DataBar 행 및 열을 제어하여 맞춤화합니다. +* **Configure databar parameters** 를 텍스트, 포맷, 이미지 품질 등으로 설정합니다. + +## 전제 조건 + +* .NET 6.0 SDK 또는 그 이후 버전이 설치되어 있어야 합니다. +* C# 개발 환경(Visual Studio, VS Code, Rider 등). +* `Aspose.BarCode` NuGet 패키지(또는 `BarcodeGenerator`, `EncodeTypes`, `BarCodeImageFormat`을 제공하는 동등한 라이브러리). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## C# 바코드 생성기를 사용하여 DataBar 바코드 만들기 + +다음 섹션에서는 각 단계를 안내합니다. 주요 초점은 **c# barcode generator** API에 있지만, 동일한 패턴은 유사한 속성을 제공하는 다른 바코드 라이브러리에도 적용됩니다. + +### 단계 1: 샘플 텍스트로 바코드 생성기 초기화 + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Why this step?* +`BarcodeGenerator`는 모든 바코드 생성 작업의 진입점입니다. `EncodeTypes.DatabarExpandedStacked` 열거형을 제공하면 라이브러리에 사용할 심볼리지를 알려주며, 텍스트 인수는 심볼에 인코딩되는 사람이 읽을 수 있는 값이 됩니다. + +### 단계 2: 열 수 설정 (기본 행 사용) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Why this step?* +DataBar Expanded Stacked 심볼은 겹쳐진 선형 요소로 구성됩니다. `Columns` 속성을 조정하면 수평 밀도가 변경되어 전체 높이를 늘리지 않고도 더 긴 데이터 문자열을 맞출 수 있습니다. 이는 직접적으로 **customizes barcode size**를 수행합니다. + +### 단계 3: 네 개의 열을 사용하는 바코드 이미지 저장 + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*What you see:* +저장된 `DatabarCols4.png` 이미지는 네 개의 열을 포함하고 있어 기본보다 넓은 DataBar 바코드를 표시합니다. 파일을 이미지 뷰어에서 열어 출력을 확인할 수 있습니다. + +### 단계 4: 새로운 구성을 위해 생성기 재초기화 + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Why re‑initialise?* +이전 열 설정을 유지하면서 `Rows` 속성을 변경하면 예상치 못한 조합이 발생할 수 있습니다. 새 인스턴스로 시작하면 의도한 매개변수(`Rows`)만 다음 이미지에 영향을 주도록 보장합니다. + +### 단계 5: 행 수 설정 (기본 열 사용) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Why this step?* +`Rows` 속성은 수직 스택을 제어합니다. 행을 늘리면 바코드가 더 높아지며, 가로 공간이 제한되고 세로 공간이 풍부할 때 유용합니다. 이는 **customize barcode size**를 구현하는 또 다른 방법입니다. + +### 단계 6: 세 개의 행을 사용하는 바코드 이미지 저장 + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Result:* +`DatabarRows3.png`는 세 개의 겹친 행을 가진 더 높은 바코드를 보여주며, **configure databar parameters**가 시각적 모양에 어떻게 영향을 주는지 보여줍니다. + +## 전체 실행 가능한 예제 + +아래는 복사·붙여넣기 후 실행할 수 있는 완전한 프로그램입니다. 모든 import, 오류 처리 및 명확성을 위한 주석이 포함되어 있습니다. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**예상 출력** + +프로그램을 실행하면 두 개의 PNG 파일이 생성됩니다: + +* `DatabarCols4.png` – 네 개의 열을 가진 넓은 DataBar 바코드. +* `DatabarRows3.png` – 세 개의 행을 가진 높은 DataBar 바코드. + +이미지를 열어 바코드 치수가 구성된 매개변수와 일치하는지 확인하십시오. + +## 일반적인 질문 및 엣지 케이스 처리 + +| Question | Answer | +|----------|--------| +| *맞춤 행과 **및** 열을 모두 필요로 하면 어떻게 해야 하나요?* | `Rows` **and** `Columns`를 동일한 `BarcodeGenerator` 인스턴스에 `Save` 호출 전에 설정합니다. 라이브러리는 두 값을 결합하여 요청된 크기의 그리드를 생성합니다. | +| *이미지 포맷을 변경할 수 있나요?* | 예. 워크플로에 맞게 `BarCodeImageFormat.Png`를 `Jpeg`, `Bmp`, 또는 `Gif`로 교체합니다. | +| *텍스트가 심볼이 담을 수 있는 길이보다 길면 어떻게 되나요?* | 생성기는 `ArgumentException`을 발생시킵니다. 텍스트를 짧게 하거나 `Columns`/`Rows`를 늘려 용량을 확보하십시오. | +| *DPI 또는 이미지 해상도를 설정하는 방법이 있나요?* | `generator.Parameters.ImageResolution`을 사용하여 저장하기 전에 원하는 DPI를 지정합니다. 이는 고해상도 인쇄를 위해 **customizes barcode size**를 추가로 수행합니다. | +| *라이브러리가 다른 DataBar 변형을 지원하나요?* | 예. 동일한 매개변수 구조를 유지하면서 `EncodeTypes.DatabarExpandedStacked`를 `DatabarExpanded`, `DatabarLimited` 등으로 교체합니다. | + +## 안정적인 바코드 생성을 위한 팁 + +* **Pro tip:** 배포하기 전에 스캐너나 모바일 앱으로 생성된 이미지를 항상 확인하십시오. +* **Watch out for:** null 또는 비어 있는 출력 디렉터리—경로가 존재하지 않으면 `Save`가 예외를 발생시킵니다. 필요하면 프로그래밍 방식으로 폴더를 생성하십시오. +* **Performance note:** 단일 `BarcodeGenerator` 인스턴스를 재사용하고 `Rows` 또는 `Columns`만 변경하면 루프에서 많은 바코드를 생성할 때 객체 생성 오버헤드를 줄일 수 있습니다. + +## 결론 + +이제 **c# barcode generator**를 사용하여 **databar barcode** 이미지를 **생성**, **barcode size**를 **맞춤화**, 그리고 행과 열과 같은 **databar parameters**를 **구성**하는 방법을 알게 되었습니다. 이러한 설정을 조정하면 스캔 신뢰성을 유지하면서 어떤 레이아웃 요구에도 바코드를 맞출 수 있습니다. + +다음으로 **how to generate barcode** PDF, 보고서에 바코드 삽입, 또는 다른 심볼리(QR, Code‑128 등)으로 전환과 같은 관련 주제를 탐색하십시오. 다양한 `Rows`, `Columns`, 이미지 해상도를 실험하여 특정 사용 사례에 최적의 구성을 찾으세요. + +--- + +## 다음에 배워야 할 내용은? + +다음 튜토리얼은 이 가이드에서 시연한 기술을 기반으로 하는 밀접한 관련 주제를 다룹니다. 각 자료는 단계별 설명이 포함된 완전한 코드 예제를 제공하여 추가 API 기능을 마스터하고 프로젝트에서 대체 구현 방식을 탐색하도록 돕습니다. + +- [Aspose.BarCode for .NET을 사용하여 1차원 Databar의 바코드 높이 생성 및 조정 방법](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Aspose.BarCode .NET API를 사용하여 1차원 Databar 2D 바코드 생성](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [.NET API를 사용하여 Aspose.BarCode Databar 바코드 생성 – 행 및 열 구성](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/korean/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..f92aa5584 --- /dev/null +++ b/barcode/korean/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: C#에서 바코드 PNG 파일을 생성하고 높이를 조정하는 방법을 배우세요. 바코드 이미지를 생성하고 바코드 높이를 쉽게 변경하는 + 방법을 다룹니다. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: ko +lastmod: 2026-08-19 +og_description: C#에서 바코드 PNG 파일을 만들고 바코드 이미지를 생성하는 방법, 바코드 높이를 조정하는 방법, 최적의 스캔을 위한 + 바코드 높이 변경 방법을 배워보세요. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: C#에서 바코드 PNG 파일 만들기 – 단계별 가이드 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: C#에서 높이를 조절할 수 있는 바코드 PNG 파일 만드는 방법 +url: /ko/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C#에서 높이 조절이 가능한 바코드 PNG 파일 만들기 + +C#에서 **바코드 PNG 파일**을 생성해야 할 때, 이 가이드는 정확한 방법을 보여줍니다. 바코드 이미지를 **생성하는 방법**과 다양한 사용 사례에 맞게 **바코드 높이를 조절하는 방법**을 포함한 완전한 실행 예제를 확인할 수 있습니다. + +바코드 PNG 파일 생성은 재고 시스템, POS 단말기 및 기계 판독 데이터가 필요하거나 표시되는 모든 애플리케이션에서 일반적인 요구 사항입니다. 이 튜토리얼을 마치면 바코드 높이를 변경하고, 여러 PNG 파일을 저장하며, 높이가 스캔 신뢰성에 미치는 영향을 이해할 수 있게 됩니다. + +## Prerequisites + +시작하기 전에 다음이 설치되어 있는지 확인하세요. + +* .NET 6.0 SDK 이상 +* Visual Studio 2022 (또는 .NET을 지원하는 IDE) +* **Aspose.BarCode for .NET** NuGet 패키지 (코드 샘플이 이 라이브러리를 사용합니다) + +패키지는 명령줄에서 추가할 수 있습니다: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Aspose.BarCode의 무료 평가판은 개발 및 테스트에 사용할 수 있습니다. 상용 환경에서는 정식 라이선스 키를 구입하세요. + +## Install the barcode library + +첫 번째 단계는 프로젝트에 라이브러리를 참조하는 것입니다. C# 파일 상단에 다음 `using` 지시문을 추가합니다: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +이 네임스페이스를 통해 `BarcodeGenerator`, `EncodeTypes`, `BarCodeImageFormat`에 접근할 수 있습니다. + +## Create the barcode PNG file + +이제 **바코드 PNG 파일**을 출력할 `BarcodeGenerator` 인스턴스를 생성합니다. 예제는 Databar OmniDirectional 심볼을 사용하지만, `EncodeTypes.DatabarOmniDirectional`을 지원되는 다른 타입으로 교체할 수 있습니다. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +문자열 `"(01)12345678901231"`은 14자리 GTIN에 대한 GS1 애플리케이션 식별자 형식입니다. 자신의 제품 식별자에 맞게 데이터를 조정하세요. + +## Set the X‑dimension (optional) + +X‑dimension은 단일 바코드 모듈의 너비를 정의합니다. 픽셀 기반 값을 사용하면 이미지 크기를 정밀하게 제어할 수 있습니다. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +`2` 픽셀 값은 대부분의 화면 표시에서 잘 작동합니다. 인쇄 시 더 큰 바코드가 필요하면 값을 늘리세요. + +## Adjust barcode height and save the barcode PNG file + +**BarHeight** 속성은 막대의 수직 크기를 제어합니다. 이 값을 변경하면 인코딩된 데이터에 영향을 주지 않고 **바코드 높이를 조절**할 수 있습니다. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +파일 `DatabarBarHeight30Pixels.png`는 이제 높이가 30 픽셀인 **바코드 PNG 파일**이 됩니다. + +**바코드 높이를 변경**하고 두 번째 이미지를 만들려면 새 값을 할당하고 다시 `Save`를 호출하면 됩니다: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +이제 30 px와 60 px 높이의 두 PNG 파일이 생성되어 **바코드 높이 조절**을 실시간으로 시연합니다. + +### Why bar height matters + +* **Readability:** 스캐너는 신뢰할 수 있는 판독을 위해 최소 높이를 기대합니다. 높이가 너무 짧으면 특히 저해상도 카메라에서 인식되지 않을 수 있습니다. +* **Aesthetics:** 바코드 높이를 주변 디자인 요소와 맞추면 UI가 깔끔해집니다. +* **Print constraints:** 일부 라벨 프린터는 고정된 높이 슬롯을 가지고 있어, 바코드 높이를 조절해야 맞출 수 있습니다. + +**Best practice:** X‑dimension의 배수(예: X‑dimension이 2 px일 때 30 px)로 높이를 유지하면 비율이 유지되고 왜곡을 방지할 수 있습니다. + +## Complete example + +아래는 콘솔 애플리케이션에 바로 붙여넣어 실행할 수 있는 전체 독립 프로그램입니다. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Expected output** + +프로그램을 실행하면 실행 파일 작업 디렉터리에 두 파일이 생성됩니다. + +* `DatabarBarHeight30Pixels.png` – 높이 30 픽셀인 바코드 PNG 파일 +* `DatabarBarHeight60Pixels.png` – 높이 60 픽셀인 바코드 PNG 파일 + +이미지 뷰어로 열면 스캔 준비가 된 선명한 Databar OmniDirectional 바코드를 확인할 수 있습니다. + +## Edge cases and troubleshooting + +| Situation | What to check | Recommended fix | +|-----------|---------------|-----------------| +| 바코드가 흐릿하게 보임 | 선택한 높이에 비해 X‑dimension이 너무 낮음 | `XDimension.Pixels` 값을 늘리세요 (예: 2 → 3) | +| 스캐너가 낮은 높이 바코드를 인식 못 함 | 높이가 스캐너 최소 요구치 이하 | `BarHeight.Pixels`를 최소 30 px(또는 스캐너 사양)로 설정 | +| PNG 파일이 비어 있거나 손상됨 | 출력 경로가 잘못되었거나 쓰기 권한이 없음 | 절대 경로를 사용하거나 앱에 쓰기 권한을 부여 | +| 다른 심볼로 교체 필요 | 현재 `EncodeTypes`가 목적에 맞지 않음 | `EncodeTypes.DatabarOmniDirectional`을 다른 열거값(예: `EncodeTypes.Code128`)으로 교체 | + +## Frequently asked questions + +**Q: 다른 이미지 포맷(JPEG, BMP)도 생성할 수 있나요?** +A: 네. `BarCodeImageFormat.Png`를 `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` 등으로 교체하면 됩니다. + +**Q: PNG를 웹 페이지에 삽입하려면 어떻게 하나요?** +A: 생성된 PNG를 HTTP 엔드포인트를 통해 제공하거나 Base64 문자열로 변환해 `` 태그의 `src` 속성에 넣으면 됩니다. + +**Q: 배경색을 설정할 수 있나요?** +A: `generator.Parameters.Image.BackgroundColor = Color.White;` (또는 원하는 `System.Drawing.Color`)를 사용하세요. + +## Conclusion + +이제 C#에서 **바코드 PNG 파일을 생성**하고 스캔 또는 디자인 요구 사항에 맞게 **바코드 높이를 정확히 조절**하는 방법을 알게 되었습니다. `BarHeight.Pixels` 속성을 변경하면 **바코드 높이를 실시간으로 바꾸고** 단일 코드 베이스에서 여러 PNG 자산을 만들 수 있습니다. + +다음 단계로 전경색, 여백, 인간이 읽을 수 있는 텍스트 추가와 같은 다른 커스터마이징 옵션을 살펴보세요. 또한 다양한 심볼(`EncodeTypes.Code128`, `EncodeTypes.QR`)을 실험해 인코딩 가능한 데이터 범위를 넓혀 보시기 바랍니다. + +행복한 코딩 되세요, 그리고 바코드가 항상 첫 번째 시도에 스캔되길 바랍니다! + +## What Should You Learn Next? + +다음 튜토리얼들은 이 가이드에서 시연한 기술을 기반으로 하여 밀접하게 연관된 주제를 다룹니다. 각 리소스는 단계별 설명과 완전한 코드 예제를 포함하고 있어 추가 API 기능을 마스터하고 프로젝트에 다양한 구현 방식을 적용하는 데 도움이 됩니다. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/korean/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/korean/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..25443fbd7 --- /dev/null +++ b/barcode/korean/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,156 @@ +--- +category: general +date: 2026-08-19 +description: C#와 Aspose.BarCode를 사용하여 데이터바 PNG 파일을 생성합니다. 데이터바 이미지를 생성하고, 데이터바 매개변수를 + 구성하며, PNG 출력을 저장하는 방법을 배웁니다. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: ko +lastmod: 2026-08-19 +og_description: Aspose.BarCode를 사용하여 C#에서 데이터바 PNG 파일을 생성합니다. 이 튜토리얼에서는 데이터바 이미지를 + 생성하고, X‑디멘션 및 종횡비와 같은 데이터바 매개변수를 구성하며, 인쇄 또는 웹 사용을 위한 고품질 PNG 파일을 저장하는 방법을 단계별로 + 안내합니다. +og_image_alt: create databar PNG example +og_title: C#에서 데이터바 PNG 이미지 만들기 – 단계별 가이드 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: C#와 Aspose.BarCode를 사용하여 데이터바 PNG 이미지 만드는 방법 +url: /ko/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C#와 Aspose.BarCode를 사용하여 databar PNG 이미지 만들기 + +.NET 애플리케이션에서 **databar PNG** 파일을 생성해야 한다면, 이 가이드가 정확히 방법을 알려줍니다. 스택형 전방향 DataBar 코드를 생성하고, 주요 매개변수를 설정하며, 서로 다른 종횡비를 가진 두 개의 PNG 파일을 저장하는 완전한 실행 가능한 예제를 확인할 수 있습니다. + +DataBar 이미지를 생성하는 것은 단일 메서드를 호출하는 것만으로는 충분하지 않습니다. 인쇄 또는 스캔 사양을 충족하기 위해 X‑dimension(모듈 폭) 및 종횡비와 같은 **databar 매개변수**를 **구성**해야 합니다. 이 튜토리얼을 마치면 실제 시나리오에서 안정적으로 작동하는 **databar 그래픽을 생성하는 방법**을 이해하게 됩니다. + +## 사전 요구 사항 + +- .NET 6.0 이상 (코드는 .NET Framework 4.7+에서도 작동합니다) +- Visual Studio 2022 또는 C# 호환 IDE +- **Aspose.BarCode for .NET**에 대한 유효한 라이선스(무료 평가판으로 테스트 가능) +- C# 구문에 대한 기본적인 이해 + +> **Pro tip:** 아직 라이선스가 없으시다면 Aspose 포털에서 임시 평가 키를 요청할 수 있습니다. API 동작은 동일하며, 워터마크만 변경됩니다. + +## Step 1: Install the Aspose.BarCode NuGet package + +Visual Studio에서 프로젝트를 열고 솔루션을 마우스 오른쪽 버튼으로 클릭한 뒤 **Manage NuGet Packages**를 선택합니다. `Aspose.BarCode`를 검색하고 최신 안정 버전을 설치합니다. + +```bash +dotnet add package Aspose.BarCode +``` + +이 명령은 `Aspose.BarCode` 어셈블리를 프로젝트에 추가하고 `BarcodeGenerator` 클래스를 사용할 수 있게 합니다. + +## Step 2: Initialize the barcode generator for a stacked omnidirectional DataBar + +`BarcodeGenerator` 생성자는 두 개의 인수를 받습니다: 바코드 유형과 원시 데이터 문자열. 스택형 전방향 DataBar의 경우 `EncodeTypes.DatabarStackedOmniDirectional`을 사용합니다. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Why this matters:** `EncodeTypes.DatabarStackedOmniDirectional` 상수는 라이브러리에게 모든 방향에서 읽을 수 있는 바코드를 생성하도록 지시합니다. 이는 소매 진열 라벨에 이상적입니다. + +## Step 3: Configure the X‑dimension (module width) in pixels + +X‑dimension은 가장 작은 바 요소의 크기를 제어합니다. 픽셀 단위로 설정하면 최종 이미지 크기를 정밀하게 제어할 수 있습니다. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +**2 픽셀** 값은 대부분의 라벨 프린터에서 가독성과 압축성 사이의 좋은 균형을 제공합니다. 더 크거나 작은 모듈이 필요하면 이 값을 조정하세요. + +## Step 4: Set the first aspect ratio and save the PNG + +종횡비는 스택형 DataBar의 높이에 영향을 줍니다. **15**의 종횡비는 비교적 짧은 바코드를 만들고, **30**은 더 높게 만듭니다. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +`Save` 메서드는 생성된 바코드를 PNG 파일로 저장합니다. PNG는 무손실 포맷이므로 바코드 스캐너에 필요한 선명한 가장자리를 유지합니다. + +## Step 5: Change the aspect ratio and save a second PNG + +같은 `BarcodeGenerator` 인스턴스를 재사용하여 종횡비만 변경하면 다양한 변형을 쉽게 만들 수 있습니다. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +이제 두 개의 PNG 파일—`DatabarAspectRatio15.png`와 `DatabarAspectRatio30.png`—이 각각 다른 시각적 밀도를 갖게 됩니다. + +## Step 6: Verify the output + +생성된 PNG 파일을 이미지 뷰어에서 열어보세요. 깨끗하고 고대비인 DataBar 바코드가 표시되어야 합니다. 스마트폰 바코드 스캐너로 이미지를 스캔하면 두 종횡비 모두 원본 GTIN 값 `12345678901231`을 올바르게 디코딩함을 확인할 수 있습니다. + +![databar PNG 예제 만들기](databar_example.png) + +*위 이미지는 두 PNG 파일을 나란히 보여줍니다. 왼쪽 이미지는 종횡비 15를 사용하고, 오른쪽은 종횡비 30을 사용했습니다.* + +## Common variations and edge cases + +| 시나리오 | 변경 내용 | 이유 | +|----------|----------------|--------| +| **다른 데이터** | 문자열 `(01)12345678901231`을 유효한 GS1 애플리케이션 식별자와 데이터로 교체 | 제품 ID, 시리얼 번호 등을 인코딩할 수 있습니다 | +| **고해상도** | `XDimension.Pixels`를 3 또는 4로 증가 | 바코드를 큰 크기로 인쇄하거나 멀리서 스캔할 때 필요합니다 | +| **다른 DataBar 유형** | `EncodeTypes.DatabarStacked` 또는 `EncodeTypes.DatabarExpanded` 사용 | 라벨 레이아웃에 가장 적합한 유형을 선택 | +| **투명 배경** | `BarCodeImageFormat.Png`와 함께 `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` 전달 | 컬러 라벨 위에 바코드를 오버레이할 때 유용 | + +> **Watch out for:** X‑dimension을 너무 작게(< 1 픽셀) 설정하면 바코드가 흐릿하게 보일 수 있습니다. + +## What Should You Learn Next? + +다음 튜토리얼은 이 가이드에서 시연한 기술을 기반으로 하는 밀접한 주제를 다룹니다. 각 리소스는 단계별 설명과 함께 완전한 코드 예제를 제공하여 추가 API 기능을 마스터하고 프로젝트에 적용할 수 있는 다양한 구현 방식을 탐색하도록 돕습니다. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/korean/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..92d544e9a --- /dev/null +++ b/barcode/korean/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,208 @@ +--- +category: general +date: 2026-08-19 +description: Aspere.BarCode를 사용하여 C#에서 우편 바코드를 생성하는 방법을 배웁니다. 이 단계별 가이드는 Planet 및 + RM4SCC 형식의 바코드를 생성하는 방법을 보여줍니다. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: ko +lastmod: 2026-08-19 +og_description: Aspose.BarCode를 사용하여 C#에서 우편 바코드를 생성합니다. 이 가이드를 따라 Planet 및 RM4SCC용 + 맞춤형 크기의 바코드 생성 방법을 배워보세요. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: C#에서 우편 바코드 생성 – 완전한 Aspose.BarCode 가이드 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Aspose.BarCode를 사용하여 C#에서 우편 바코드 생성하는 방법 +url: /ko/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C#와 Aspose.BarCode를 사용한 우편 바코드 생성 방법 + +메일링 애플리케이션을 위해 **우편 바코드 생성**이 필요하다면, 이 가이드는 Aspose.BarCode 라이브러리를 사용하여 바코드를 생성하는 방법을 정확히 보여줍니다. 자동으로 높이가 계산되는 Planet 바코드와 명시적인 바 높이를 가진 RM4SCC 바코드를 모두 생성하는 완전하고 실행 가능한 예제를 확인할 수 있습니다. + +우편 바코드 생성은 물류 소프트웨어, 자동 라벨 프린터, 대량 메일링 시스템에서 흔히 요구되는 기능입니다. 이 튜토리얼을 마치면 .NET 프로젝트에 바코드 생성을 통합하고, X‑dimension을 사용자 정의하며, 표준 형식이 허용하는 경우 바 높이를 제어할 수 있게 됩니다. + +**배우게 될 내용** + +* C# 프로젝트에 Aspose.BarCode를 설정하는 방법. +* Planet 및 RM4SCC 우편 바코드를 생성하는 방법. +* X‑dimension(모듈 폭)과 바 높이를 조정하는 방법. +* 결과를 PNG 이미지로 저장하는 방법. + +외부 서비스가 필요하지 않습니다—Aspose.BarCode NuGet 패키지를 참조하면 모든 작업이 로컬에서 실행됩니다. + +## 사전 요구 사항 + +* .NET 6.0 SDK 이상(.NET Framework 4.7+에서도 동작합니다). +* Visual Studio 2022, Visual Studio Code 또는 선호하는 C# IDE. +* Aspose.BarCode for .NET 패키지 – NuGet을 통해 설치: + +```bash +dotnet add package Aspose.BarCode +``` + +## Aspose.BarCode를 사용한 우편 바코드 생성 + +다음 섹션에서는 생성기 객체를 만들고 최종 PNG 파일을 저장하는 단계별 과정을 안내합니다. + +### 단계 1: Planet 바코드 생성 (자동 높이) + +Planet은 여러 국가에서 우편물 분류에 사용되는 우편 바코드입니다. Planet 바코드를 만들면 라이브러리가 인코딩된 데이터에 따라 최적의 바 높이를 자동으로 결정합니다. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**왜 이렇게 동작하는가** – `EncodeTypes.Planet`은 Aspose.BarCode에 Planet 심볼을 사용하도록 지시합니다. `XDimension` 속성은 가장 작은 바(모듈)의 폭을 제어합니다. Planet은 고정된 바 높이를 요구하지 않으므로 라이브러리가 자동으로 적절한 높이를 계산해 주어 코드가 간단해집니다. + +### 단계 2: 명시적 높이를 가진 RM4SCC 바코드 생성 + +RM4SCC는 스캐너 호환성을 위해 특정 바 높이가 요구되는 또 다른 우편 심볼입니다. 아래 코드는 해당 높이를 수동으로 설정하는 방법을 보여줍니다. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**높이를 설정하는 이유** – 일부 우편 스캐너는 최소 바 높이를 요구합니다. `BarHeight.Pixels = 100`을 지정하면 생성된 이미지가 해당 요구 사항을 충족함을 보장합니다. X‑dimension은 Planet 바코드와 동일하게 유지되어 두 이미지가 같은 시각적 밀도를 가집니다. + +### 단계 3: 출력 확인 + +프로그램을 실행한 후 `YOUR_DIRECTORY`에 있는 두 PNG 파일을 열어보세요. 서로 다른 두 바코드를 확인할 수 있습니다: + +* `PostalPlanetBarHeightNone.png` – 자동으로 계산된 높이의 Planet 바코드. +* `PostalRM4SCCBarHeight100Pixels.png` – 100픽셀 바 높이를 가진 RM4SCC 바코드. + +두 이미지는 라벨 프린터에 직접 전달하거나 웹 애플리케이션에 표시할 수 있습니다. + +![Aspose.BarCode를 사용하여 생성된 우편 바코드 이미지 (우편 바코드 생성 방법을 보여줍니다)](generated-postal-barcode.png) + +## 사용자 정의 치수로 바코드 생성하기 (고급) + +여백, 텍스트 위치, 색상 등 다른 매개변수를 미세 조정해야 할 경우 Aspose.BarCode는 풍부한 `Parameters` 객체를 제공합니다. 아래 예제는 흰색 배경을 추가하고 인간이 읽을 수 있는 텍스트를 비활성화하는 간단한 방법을 보여줍니다. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**사용 시점** – 인간이 읽을 수 있는 텍스트를 비활성화하는 것은 기계가 읽을 수 있는 패턴만 중요한 자동 분류에 일반적입니다. 배경 색상을 설정하면 투명 매체에 바코드가 올바르게 인쇄됩니다. + +## 흔히 발생하는 문제와 전문가 팁 + +| 문제 | 발생 원인 | 해결 방법 | +|-------|----------------|-----| +| 바코드가 늘어나 보임 | 이미지 크기에 비해 X‑dimension이 너무 큼 | 대부분의 우편 바코드에 `XDimension.Pixels`를 2~5 사이로 유지 | +| 스캐너가 이미지를 거부 | 바 높이가 우편 서비스에서 요구하는 최소값보다 낮음 | RM4SCC의 경우 사양에 별도 언급이 없으면 `BarHeight.Pixels`를 80 이상 사용 | +| PNG 파일 크기가 큼 | 이미지 해상도가 필요 이상으로 높음 | PNG‑8(`BarCodeImageFormat.Png8`)로 저장하거나 픽셀 크기를 줄임 | + +**전문가 팁:** 프로덕션에 배포하기 전에 실제 스캐너로 생성된 바코드를 반드시 테스트하세요. 작은 시각적 차이도 가독성에 영향을 줄 수 있습니다. + +## 전체 소스 코드 + +아래 전체 블록을 새 콘솔 애플리케이션(`Program.cs`)에 복사합니다. 출력 경로를 프로세스가 쓸 수 있는 폴더로 조정하세요. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +프로그램을 실행하면 *“Barcodes generated successfully.”* 가 출력되고 실행 파일 작업 디렉터리에 두 PNG 파일이 생성됩니다. + +## 결론 + +이제 C#와 Aspose.BarCode를 사용해 **우편 바코드 생성** 방법을 알게 되었으며, 자동 높이 Planet 바코드와 고정 높이 RM4SCC 바코드 모두를 다룰 수 있습니다. 또한 사용자 정의 X‑dimension, 바 높이 및 시각 옵션으로 **바코드 생성**하는 방법을 보여주어 메일 자동화 프로젝트의 탄탄한 기반을 제공했습니다. + +다음 단계로 시도해 볼 수 있는 내용: + +* 생성된 PNG를 Aspose.PDF를 사용해 PDF 청구서에 통합. +* 출력 형식을 SVG로 전환해 확장 가능한 벡터 그래픽 활용. +* `BarcodeReader` 클래스를 사용해 인코딩된 데이터를 프로그래밍 방식으로 검증. + +다양한 심볼(e.g., `EncodeTypes.Postnet`)을 실험하고 결과를 커뮤니티와 공유하세요. 즐거운 코딩 되세요! + +## 다음에 배울 내용은? + +다음 튜토리얼은 이 가이드에서 시연한 기술을 기반으로 하며, 밀접하게 연관된 주제를 다룹니다. 각 리소스는 완전한 코드 예제와 단계별 설명을 포함해 추가 API 기능을 마스터하고 프로젝트에 다양한 구현 방식을 탐색하도록 돕습니다. + +- [Aspose.BarCode를 사용한 보조 공간 맞춤 바코드 이미지 생성 방법](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Aspose.BarCode를 사용한 바코드 생성 – Code 39 구성](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Aspose.BarCode for .NET를 사용한 DataMatrix 바코드(ECC 200) 생성 방법](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/polish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..a87215014 --- /dev/null +++ b/barcode/polish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,252 @@ +--- +category: general +date: 2026-08-19 +description: Samouczek generatora kodów kreskowych w C# pokazuje, jak generować kody + DataBar Expanded Stacked, dostosowywać rozmiar kodu kreskowego oraz konfigurować + wiersze i kolumny. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: pl +lastmod: 2026-08-19 +og_description: Samouczek generatora kodów kreskowych w C# uczy, jak generować kody + DataBar, dostosowywać rozmiar oraz konfigurować wiersze i kolumny, aby uzyskać precyzyjny + wynik. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Generator kodów kreskowych w C# – przewodnik krok po kroku dla niestandardowych + kodów DataBar +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Generator kodów kreskowych C#: tworzenie własnych kodów DataBar' +url: /pl/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Generator kodów kreskowych w C#: tworzenie niestandardowych kodów DataBar + +Jeśli potrzebujesz **c# barcode generator** który może generować symbole DataBar Expanded Stacked, ten przewodnik pokaże Ci dokładnie, jak tworzyć obrazy kodów kreskowych z niestandardowymi wierszami i kolumnami. Nauczysz się konfigurować parametry databar, dostosowywać rozmiar kodu kreskowego i zapisywać wynik jako pliki PNG. + +Programowe generowanie kodów kreskowych eliminuje ręczne kroki projektowania i zapewnia spójny wynik na różnych platformach. W tym samouczku dowiesz się: + +* Zainstaluj i odwołaj się do biblioteki Aspose.BarCode for .NET (lub dowolnego kompatybilnego pakietu). +* Utwórz generator kodów kreskowych dla symbologii DataBar Expanded Stacked. +* **How to generate barcode** obrazy z określonymi ustawieniami kolumn i wierszy. +* **Customize barcode size** poprzez kontrolowanie wierszy i kolumn DataBar. +* **Configure databar parameters** takie jak tekst, format i jakość obrazu. + +## Wymagania wstępne + +* .NET 6.0 SDK lub nowszy zainstalowany. +* Środowisko programistyczne C# (Visual Studio, VS Code, Rider itp.). +* Pakiet NuGet `Aspose.BarCode` (lub równoważna biblioteka udostępniająca `BarcodeGenerator`, `EncodeTypes` i `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Używanie generatora kodów kreskowych w C# do tworzenia kodów DataBar + +Poniższe sekcje przeprowadzą Cię krok po kroku. Główny nacisk położony jest na API **c# barcode generator**, ale ten sam schemat ma zastosowanie do innych bibliotek kodów kreskowych, które udostępniają podobne właściwości. + +### Krok 1: Inicjalizacja generatora kodów kreskowych z przykładowym tekstem + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Dlaczego ten krok?* +`BarcodeGenerator` jest punktem wejścia dla wszystkich zadań tworzenia kodów kreskowych. Podanie wyliczenia `EncodeTypes.DatabarExpandedStacked` informuje bibliotekę, której symbologię użyć, a argument tekstowy staje się czytelną dla człowieka wartością zakodowaną w symbolu. + +### Krok 2: Ustaw liczbę kolumn (używane są domyślne wiersze) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Dlaczego ten krok?* +Symbole DataBar Expanded Stacked składają się ze stosowanych elementów liniowych. Dostosowanie właściwości `Columns` zmienia gęstość poziomą, umożliwiając dopasowanie dłuższych ciągów danych bez zwiększania całkowitej wysokości. To bezpośrednio **customizes barcode size**. + +### Krok 3: Zapisz obraz kodu kreskowego używający czterech kolumn + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Co widzisz:* +Zapisany obraz `DatabarCols4.png` przedstawia kod DataBar, który jest szerszy niż domyślny, ponieważ zawiera cztery kolumny. Możesz otworzyć plik w dowolnym przeglądarce obrazów, aby zweryfikować wynik. + +### Krok 4: Ponowna inicjalizacja generatora dla nowej konfiguracji + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Dlaczego ponowna inicjalizacja?* +Zmiana właściwości `Rows` przy zachowaniu poprzedniego ustawienia kolumn może spowodować nieoczekiwaną kombinację. Rozpoczęcie od nowej instancji zapewnia, że jedynie zamierzony parametr (`Rows`) wpływa na kolejny obraz. + +### Krok 5: Ustaw liczbę wierszy (używane są domyślne kolumny) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Dlaczego ten krok?* +Właściwość `Rows` kontroluje pionowe układanie. Zwiększenie liczby wierszy sprawia, że kod kreskowy jest wyższy, co może być przydatne, gdy przestrzeń jest ograniczona w poziomie, ale obfita w pionie. To kolejny sposób na **customize barcode size**. + +### Krok 6: Zapisz obraz kodu kreskowego używający trzech wierszy + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Wynik:* +`DatabarRows3.png` pokazuje wyższy kod kreskowy z trzema ułożonymi wierszami, demonstrując, jak **configure databar parameters** wpływa na wygląd wizualny. + +## Pełny przykład do uruchomienia + +Poniżej znajduje się kompletny program, który możesz skopiować, wkleić i uruchomić. Zawiera wszystkie importy, obsługę błędów i komentarze dla przejrzystości. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Oczekiwany wynik** + +Uruchomienie programu generuje dwa pliki PNG: + +* `DatabarCols4.png` – szeroki kod DataBar z czterema kolumnami. +* `DatabarRows3.png` – wysoki kod DataBar z trzema wierszami. + +Otwórz obrazy, aby potwierdzić, że wymiary kodu kreskowego odpowiadają skonfigurowanym parametrom. + +## Częste pytania i obsługa przypadków brzegowych + +| Question | Answer | +|----------|--------| +| *Co zrobić, jeśli potrzebuję zarówno niestandardowych wierszy **i** kolumn?* | Ustaw `Rows` **and** `Columns` w tej samej instancji `BarcodeGenerator` przed wywołaniem `Save`. Biblioteka łączy oba wartości, aby utworzyć siatkę o żądanym rozmiarze. | +| *Czy mogę zmienić format obrazu?* | Tak. Zastąp `BarCodeImageFormat.Png` przez `Jpeg`, `Bmp` lub `Gif`, aby dopasować do swojego przepływu pracy. | +| *Co się stanie, gdy tekst jest dłuższy niż symbol może pomieścić?* | Generator zgłasza `ArgumentException`. Skróć tekst lub zwiększ `Columns`/`Rows`, aby zapewnić większą pojemność. | +| *Czy istnieje sposób ustawienia DPI lub rozdzielczości obrazu?* | Użyj `generator.Parameters.ImageResolution`, aby określić żądane DPI przed zapisem. To dodatkowo **customizes barcode size** przy drukowaniu w wysokiej rozdzielczości. | +| *Czy biblioteka obsługuje inne warianty DataBar?* | Tak. Zastąp `EncodeTypes.DatabarExpandedStacked` przez `DatabarExpanded`, `DatabarLimited` itp., zachowując tę samą strukturę parametrów. | + +## Wskazówki dotyczące niezawodnego generowania kodów kreskowych + +* **Pro tip:** Zawsze weryfikuj wygenerowany obraz za pomocą skanera lub aplikacji mobilnej przed wdrożeniem go do produkcji. +* **Watch out for:** Puste lub nieistniejące katalogi wyjściowe — `Save` zgłosi wyjątek, jeśli ścieżka nie istnieje. Utwórz folder programowo w razie potrzeby. +* **Performance note:** Ponowne użycie jednej instancji `BarcodeGenerator` i zmiana jedynie `Rows` lub `Columns` może zmniejszyć narzut tworzenia obiektów przy generowaniu wielu kodów kreskowych w pętli. + +## Zakończenie + +Teraz wiesz, jak używać **c# barcode generator** do **tworzenia obrazów kodów databar**, **dostosowywania rozmiaru kodu kreskowego** oraz **konfigurowania parametrów databar**, takich jak wiersze i kolumny. Dzięki regulacji tych ustawień możesz dopasować kody kreskowe do dowolnych wymagań układu, zachowując niezawodność skanowania. + +Następnie, zapoznaj się z powiązanymi tematami, takimi jak **how to generate barcode** PDF‑y, osadzanie kodów kreskowych w raportach lub przełączanie się na inne symbologie (QR, Code‑128 itp.). Eksperymentuj z różnymi `Rows`, `Columns` i rozdzielczościami obrazu, aby znaleźć optymalną konfigurację dla swojego konkretnego przypadku użycia. + +--- + +## 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. + +- [Jak generować i dostosowywać wysokość kodu kreskowego dla jednowymiarowego Databar przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generowanie jednowymiarowych kodów Databar 2D przy użyciu Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generowanie kodu Databar Aspose.BarCode przy użyciu .NET API – konfiguracja wierszy i kolumn](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/polish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..4d99fcab3 --- /dev/null +++ b/barcode/polish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: Dowiedz się, jak wygenerować plik PNG z kodem kreskowym w C# i dostosować + jego wysokość, obejmując generowanie obrazów kodów kreskowych oraz łatwą zmianę + wysokości kodu kreskowego. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: pl +lastmod: 2026-08-19 +og_description: Utwórz plik PNG z kodem kreskowym w C# i dowiedz się, jak generować + obrazy kodów kreskowych, regulować ich wysokość oraz zmieniać ją dla optymalnego + skanowania. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Tworzenie pliku PNG z kodem kreskowym w C# – przewodnik krok po kroku +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Jak utworzyć plik PNG z kodem kreskowym o regulowanej wysokości w C# +url: /pl/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak utworzyć plik PNG z kodem kreskowym o regulowanej wysokości w C# + +Jeśli potrzebujesz utworzyć **plik PNG z kodem kreskowym** w C#, ten przewodnik pokaże Ci dokładnie, jak to zrobić. Zobaczysz kompletny, gotowy do uruchomienia przykład, który demonstruje **jak generować obrazy kodów kreskowych** oraz jak **regulować wysokość kodu kreskowego** dla różnych zastosowań. + +Tworzenie pliku PNG z kodem kreskowym jest powszechnym wymaganiem w systemach inwentaryzacji, terminalach punktu sprzedaży oraz w każdej aplikacji, która musi drukować lub wyświetlać dane odczytywane maszynowo. Po zakończeniu tego samouczka będziesz w stanie zmienić wysokość kodu kreskowego, zapisać wiele plików PNG oraz zrozumieć wpływ wysokości na niezawodność skanowania. + +## Wymagania wstępne + +* .NET 6.0 SDK lub nowszy zainstalowany +* Visual Studio 2022 (lub dowolne IDE obsługujące .NET) +* Pakiet NuGet **Aspose.BarCode for .NET** (przykład kodu używa tej biblioteki) + +Możesz dodać pakiet z wiersza poleceń: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Wskazówka:** Darmowa wersja ewaluacyjna Aspose.BarCode działa w środowisku deweloperskim i testowym. W produkcji należy uzyskać licencjonowany klucz. + +## Zainstaluj bibliotekę kodów kreskowych + +Pierwszym krokiem jest odwołanie do biblioteki w projekcie. Dodaj następujące dyrektywy `using` na początku pliku C#: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Te przestrzenie nazw dają dostęp do `BarcodeGenerator`, `EncodeTypes` oraz `BarCodeImageFormat`. + +## Utwórz plik PNG z kodem kreskowym + +Teraz tworzymy instancję `BarcodeGenerator`, która wygeneruje **plik PNG z kodem kreskowym**. Przykład używa symboliki Databar OmniDirectional, ale możesz zamienić `EncodeTypes.DatabarOmniDirectional` na dowolny obsługiwany typ. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Ciąg znaków `"(01)12345678901231"` jest zgodny z formatem GS1 Application Identifier dla 14‑cyfrowego GTIN. Dostosuj dane do własnych identyfikatorów produktów. + +## Ustaw wymiar X (opcjonalnie) + +Wymiar X określa szerokość pojedynczego modułu kodu kreskowego. Wartość wyrażona w pikselach daje precyzyjną kontrolę nad rozmiarem obrazu. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Wartość `2` piksele dobrze sprawdza się na większości wyświetlaczy. Zwiększ ją, jeśli potrzebujesz większego kodu kreskowego przy drukowaniu. + +## Regulacja wysokości kodu kreskowego i zapis pliku PNG + +Właściwość **BarHeight** kontroluje pionowy rozmiar pasków. Zmiana tej wartości pozwala **regulować wysokość kodu kreskowego** bez wpływu na zakodowane dane. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Plik `DatabarBarHeight30Pixels.png` jest teraz **plikem PNG z kodem kreskowym** o wysokości 30 pikseli. + +Aby **zmienić wysokość kodu kreskowego** i utworzyć drugi obraz, po prostu przypisz nową wartość i ponownie wywołaj `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Masz teraz dwa pliki PNG — jeden o wysokości 30 px, a drugi 60 px — co demonstruje, jak **regulować wysokość kodu kreskowego** w locie. + +### Dlaczego wysokość pasków ma znaczenie + +* **Czytelność:** Skanery oczekują minimalnej wysokości dla niezawodnego wykrywania. Zbyt krótki kod kreskowy może zostać pominięty, szczególnie przy kamerach o niskiej rozdzielczości. +* **Estetyka:** Dopasowanie wysokości kodu kreskowego do otaczających elementów projektu tworzy czystszy interfejs. +* **Ograniczenia druku:** Niektóre drukarki etykiet mają stałe szczeliny wysokości; regulacja wysokości kodu kreskowego zapewnia dopasowanie. + +**Najlepsza praktyka:** Utrzymuj wysokość jako wielokrotność wymiaru X (np. 30 px przy wymiarze X równym 2 px), aby zachować proporcje i uniknąć zniekształceń. + +## Pełny przykład + +Poniżej znajduje się pełny, samodzielny program, który możesz wkleić do aplikacji konsolowej i uruchomić od razu. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Oczekiwany wynik** + +Uruchomienie programu tworzy dwa pliki w katalogu roboczym wykonywalnego pliku: + +* `DatabarBarHeight30Pixels.png` – plik PNG z kodem kreskowym o wysokości 30 pikseli +* `DatabarBarHeight60Pixels.png` – plik PNG z kodem kreskowym o wysokości 60 pikseli + +Otwórz dowolny z plików PNG w dowolnym przeglądarce obrazów; zobaczysz wyraźny kod Databar OmniDirectional gotowy do skanowania. + +## Przypadki brzegowe i rozwiązywanie problemów + +| Sytuacja | Co sprawdzić | Zalecane rozwiązanie | +|-----------|---------------|-----------------| +| Kod kreskowy jest rozmyty | Wymiar X jest zbyt niski dla wybranej wysokości | Zwiększ `XDimension.Pixels` (np. z 2 do 3) | +| Skaner nie działa przy niskiej wysokości kodu | Wysokość poniżej minimalnej dla skanera | Ustaw `BarHeight.Pixels` na co najmniej 30 px (lub zgodnie ze specyfikacją skanera) | +| Plik PNG jest pusty lub uszkodzony | Ścieżka wyjściowa nieprawidłowa lub brak uprawnień do zapisu | Użyj ścieżki bezwzględnej lub upewnij się, że aplikacja ma dostęp do zapisu | +| Potrzebna inna symbolika | Obecny `EncodeTypes` nie jest odpowiedni | Zamień `EncodeTypes.DatabarOmniDirectional` na inną wartość wyliczenia (np. `EncodeTypes.Code128`) | + +## Najczęściej zadawane pytania + +**Q: Czy mogę generować inne formaty obrazu (JPEG, BMP)?** +A: Tak. Zamień `BarCodeImageFormat.Png` na `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` itd. + +**Q: Jak wstawić PNG na stronę internetową?** +A: Udostępnij wygenerowany PNG przez endpoint HTTP lub przekonwertuj go na ciąg Base64 i umieść w atrybucie `src` znacznika ``. + +**Q: Czy istnieje sposób, aby ustawić kolor tła?** +A: Użyj `generator.Parameters.Image.BackgroundColor = Color.White;` (lub dowolny `System.Drawing.Color`). + +## Zakończenie + +Teraz wiesz, jak **generować plik PNG z kodem kreskowym** w C# i precyzyjnie **regulować wysokość kodu kreskowego**, aby spełnić wymagania skanowania lub projektu. Zmieniając właściwość `BarHeight.Pixels`, możesz **zmieniać wysokość kodu kreskowego** w locie i tworzyć wiele zasobów PNG z jednego kodu. + +Następnie, odkryj inne opcje dostosowywania, takie jak kolor pierwszego planu, marginesy i dodawanie tekstu czytelnego dla człowieka. Możesz także eksperymentować z różnymi symbolikami (`EncodeTypes.Code128`, `EncodeTypes.QR`), aby rozszerzyć zakres danych, które możesz zakodować. + +Powodzenia w kodowaniu i niech Twoje kody kreskowe zawsze skanują się za pierwszym razem! + +## Co powinieneś nauczyć się dalej? + +Następujące 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. + +- [Jak generować i regulować wysokość kodu kreskowego dla jednowymiarowego Databar przy użyciu Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Jak generować kody kreskowe – jednowymiarowe typy kodów](/barcode/english/net/one-dimensional-barcode-types/) +- [Jak generować kod Aztec z niestandardowym współczynnikiem proporcji przy użyciu 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/polish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/polish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..7cf97a35b --- /dev/null +++ b/barcode/polish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,158 @@ +--- +category: general +date: 2026-08-19 +description: Twórz pliki PNG z kodem databar w C# przy użyciu Aspose.BarCode. Dowiedz + się, jak generować obrazy databar, konfigurować parametry databar i zapisywać wynik + w formacie PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: pl +lastmod: 2026-08-19 +og_description: Twórz pliki PNG z kodem databar w C# przy użyciu Aspose.BarCode. Ten + poradnik przeprowadzi Cię krok po kroku przez generowanie obrazów databar, konfigurowanie + parametrów databar, takich jak wymiar X i współczynnik proporcji, oraz zapisywanie + wysokiej jakości plików PNG do druku lub użytku w sieci. +og_image_alt: create databar PNG example +og_title: Tworzenie obrazów PNG z paskiem danych w C# – przewodnik krok po kroku +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Jak tworzyć obrazy PNG z kodem databar w C# i Aspose.BarCode +url: /pl/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak tworzyć obrazy PNG databar przy użyciu C# i Aspose.BarCode + +Jeśli potrzebujesz **tworzyć databar PNG** w aplikacji .NET, ten przewodnik pokaże Ci dokładnie, jak to zrobić. Zobaczysz kompletny, uruchamialny przykład, który generuje stosowane omnidirectional DataBar kody, konfiguruje kluczowe parametry i zapisuje dwa pliki PNG o różnych proporcjach. + +Generowanie obrazu DataBar nie polega jedynie na wywołaniu jednej metody. Musisz także **skonfigurować parametry databar**, takie jak wymiar X (szerokość modułu) oraz proporcje, aby spełnić specyfikacje druku lub skanowania. Po zakończeniu tego samouczka zrozumiesz **jak generować grafiki databar**, które działają niezawodnie w rzeczywistych scenariuszach. + +## Wymagania wstępne + +- .NET 6.0 lub nowszy (kod działa również z .NET Framework 4.7+) +- Visual Studio 2022 lub dowolne IDE zgodne z C# +- Ważna licencja na **Aspose.BarCode for .NET** (bezpłatna wersja ewaluacyjna działa do testów) +- Podstawowa znajomość składni C# + +> **Wskazówka:** Jeśli nie masz jeszcze licencji, możesz poprosić o tymczasowy klucz ewaluacyjny w portalu Aspose. API zachowuje się tak samo; zmienia się tylko znak wodny. + +## Krok 1: Zainstaluj pakiet NuGet Aspose.BarCode + +Otwórz swój projekt w Visual Studio, kliknij prawym przyciskiem myszy rozwiązanie i wybierz **Manage NuGet Packages**. Wyszukaj `Aspose.BarCode` i zainstaluj najnowszą stabilną wersję. + +```bash +dotnet add package Aspose.BarCode +``` + +To polecenie dodaje zestaw `Aspose.BarCode` do Twojego projektu i udostępnia klasę `BarcodeGenerator`. + +## Krok 2: Zainicjalizuj generator kodów kreskowych dla stosowanego omnidirectional DataBar + +Konstruktor `BarcodeGenerator` przyjmuje dwa argumenty: typ kodu kreskowego oraz surowy ciąg danych. Dla stosowanego omnidirectional DataBar używasz `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Dlaczego to ważne:** Stała `EncodeTypes.DatabarStackedOmniDirectional` informuje bibliotekę, aby wygenerowała kod kreskowy, który może być odczytany z dowolnej orientacji, co jest idealne dla etykiet na półkach sklepowych. + +## Krok 3: Skonfiguruj wymiar X (szerokość modułu) w pikselach + +Wymiar X kontroluje rozmiar najmniejszego elementu kreski. Ustawienie go w pikselach daje precyzyjną kontrolę nad ostatecznym rozmiarem obrazu. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Wartość **2 piksele** stanowi dobry kompromis między czytelnością a kompaktowością dla większości drukarek etykiet. Dostosuj tę wartość, jeśli potrzebujesz większych lub mniejszych modułów. + +## Krok 4: Ustaw pierwszą proporcję i zapisz PNG + +Proporcja wpływa na wysokość stosowanego DataBar. Proporcja **15** daje stosunkowo krótki kod kreskowy, podczas gdy **30** sprawia, że jest wyższy. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Metoda `Save` zapisuje wygenerowany kod kreskowy do pliku PNG. PNG jest bezstratny, co zachowuje ostre krawędzie potrzebne skanerom kodów kreskowych. + +## Krok 5: Zmień proporcję i zapisz drugi PNG + +Możesz ponownie użyć tej samej instancji `BarcodeGenerator`, aby tworzyć warianty, po prostu zmieniając proporcję. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Teraz masz dwa pliki PNG — `DatabarAspectRatio15.png` i `DatabarAspectRatio30.png` — każdy o innej gęstości wizualnej. + +## Krok 6: Zweryfikuj wynik + +Otwórz wygenerowane pliki PNG w dowolnym przeglądarce obrazów. Powinieneś zobaczyć czysty, wysokokontrastowy kod DataBar. Skanowanie obrazów smartfonowym skanerem kodów kreskowych potwierdza, że obie proporcje dekodują się do pierwotnej wartości GTIN `12345678901231`. + +![create databar PNG example](databar_example.png) + +*Powyższy obraz pokazuje dwa pliki PNG obok siebie. Lewy obraz używa proporcji 15, prawy używa proporcji 30.* + +## Typowe warianty i przypadki brzegowe + +| Scenariusz | Co zmienić | Powód | +|------------|------------|-------| +| **Inne dane** | Zastąp ciąg `(01)12345678901231` dowolnym prawidłowym identyfikatorem aplikacji GS1 i danymi | Pozwala kodować identyfikatory produktów, numery seryjne itp. | +| **Wyższa rozdzielczość** | Zwiększ `XDimension.Pixels` do 3 lub 4 | Potrzebne, gdy kod kreskowy będzie drukowany w dużych rozmiarach lub skanowany z daleka. | +| **Inne typy DataBar** | Użyj `EncodeTypes.DatabarStacked` lub `EncodeTypes.DatabarExpanded` | Wybierz typ, który najlepiej pasuje do układu etykiety. | +| **Przezroczyste tło** | Przekaż `BarCodeImageFormat.Png` wraz z `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Przydatne przy nakładaniu kodu kreskowego na kolorowe etykiety. | + +> **Uwaga:** Ustawienie wymiaru X, który jest zbyt mały (< 1 piksela), może spowodować, że kod kreskowy będzie wyglądał na rozmyty po + +## 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. + +- [Jak generować i dostosowywać wysokość kodu kreskowego dla jednowymiarowego Databar przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Utwórz jednowymiarowe kodowanie GS1 Databar przy użyciu Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generuj kod Databar Aspose.BarCode przy użyciu .NET API – konfiguracja wierszy i kolumn](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/polish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..4e7f23d32 --- /dev/null +++ b/barcode/polish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,214 @@ +--- +category: general +date: 2026-08-19 +description: Dowiedz się, jak generować kod kreskowy pocztowy w C# przy użyciu Aspere.BarCode. + Ten przewodnik krok po kroku pokazuje, jak generować kod kreskowy w formatach Planet + i RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: pl +lastmod: 2026-08-19 +og_description: Wygeneruj kod kreskowy pocztowy w C# przy użyciu Aspose.BarCode. Przejdź + do tego przewodnika, aby dowiedzieć się, jak generować kod kreskowy dla Planet i + RM4SCC o niestandardowych wymiarach. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Generowanie kodu kreskowego pocztowego w C# – kompletny przewodnik Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Jak wygenerować kod kreskowy pocztowy w C# przy użyciu Aspose.BarCode +url: /pl/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak generować kod kreskowy pocztowy w C# z Aspose.BarCode + +Jeśli potrzebujesz **generować kod kreskowy pocztowy** dla aplikacji pocztowych, ten przewodnik pokaże Ci dokładnie, jak wygenerować kod kreskowy przy użyciu biblioteki Aspose.BarCode. Zobaczysz kompletny, gotowy do uruchomienia przykład, który tworzy zarówno kod Planet (wysokość obliczana automatycznie), jak i kod RM4SCC z określoną wysokością kreski. + +Generowanie kodu kreskowego pocztowego jest powszechnym wymogiem dla oprogramowania logistycznego, automatycznych drukarek etykiet oraz systemów masowej wysyłki. Po zakończeniu tego tutorialu będziesz w stanie zintegrować generowanie kodów kreskowych z dowolnym projektem .NET, dostosować wymiar X‑dimension oraz kontrolować wysokość kreski, gdy standardowy format na to pozwala. + +**Czego się nauczysz** + +* Jak skonfigurować Aspose.BarCode w projekcie C#. +* Jak generować kody kreskowe pocztowe Planet i RM4SCC. +* Jak regulować X‑dimension (szerokość modułu) i wysokość kreski. +* Jak zapisać wynik jako obraz PNG. + +Żadne zewnętrzne usługi nie są wymagane — wszystko działa lokalnie po dodaniu pakietu Aspose.BarCode z NuGet. + +## Wymagania wstępne + +* .NET 6.0 SDK lub nowszy (kod działa również z .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code lub dowolne IDE dla C#, które preferujesz. +* Pakiet Aspose.BarCode for .NET – zainstaluj go poprzez NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generowanie kodu kreskowego pocztowego z Aspose.BarCode + +Poniższe sekcje przeprowadzą Cię krok po kroku, od tworzenia obiektów generatora po zapisanie finalnych plików PNG. + +### Krok 1: Utwórz kod Planet (automatyczna wysokość) + +Planet to kod kreskowy używany w wielu krajach do sortowania poczty. Gdy tworzysz kod Planet, biblioteka automatycznie określa optymalną wysokość kreski na podstawie zakodowanych danych. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Dlaczego to działa** – `EncodeTypes.Planet` informuje Aspose.BarCode, aby użył symboliki Planet. Właściwość `XDimension` kontroluje szerokość najmniejszej kreski (modułu). Ponieważ Planet nie wymaga stałej wysokości kreski, biblioteka automatycznie oblicza odpowiednią wysokość, co upraszcza kod. + +### Krok 2: Utwórz kod RM4SCC z określoną wysokością + +RM4SCC to kolejna symbolika pocztowa, która często wymaga konkretnej wysokości kreski dla kompatybilności ze skanerami. Poniższy kod pokazuje, jak ustawić tę wysokość ręcznie. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Dlaczego ustawiasz wysokość** – Niektóre skanery pocztowe wymagają minimalnej wysokości kreski. Przypisując `BarHeight.Pixels = 100`, zapewniasz, że wygenerowany obraz spełnia te wymagania. Wymiar X‑dimension pozostaje spójny z kodem Planet, dzięki czemu oba obrazy mają taką samą gęstość wizualną. + +### Krok 3: Zweryfikuj wynik + +Po uruchomieniu programu otwórz dwa pliki PNG znajdujące się w `YOUR_DIRECTORY`. Powinny się tam znajdować dwa odrębne kody kreskowe: + +* `PostalPlanetBarHeightNone.png` – kod Planet z automatycznie obliczoną wysokością. +* `PostalRM4SCCBarHeight100Pixels.png` – kod RM4SCC z wysokością kreski równą 100 pikseli. + +Oba obrazy mogą być bezpośrednio podawane drukarkom etykiet lub wyświetlane w aplikacji internetowej. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Tekst alternatywny obrazu:* **Wygenerowany kod kreskowy pocztowy** przy użyciu Aspose.BarCode (prezentuje, jak generować kod kreskowy pocztowy). + +## Jak generować kod kreskowy z własnymi wymiarami (zaawansowane) + +Jeśli potrzebujesz precyzyjnie dostroić inne parametry — takie jak marginesy, położenie tekstu czy kolor — Aspose.BarCode udostępnia rozbudowany obiekt `Parameters`. Poniżej szybki przykład, który dodaje białe tło i wyłącza tekst czytelny dla człowieka. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Kiedy to stosować** – Wyłączanie tekstu czytelnego dla człowieka jest typowe w automatycznym sortowaniu, gdzie liczy się wyłącznie wzór maszynowo odczytywalny. Ustawienie koloru tła zapewnia prawidłowy wydruk kodu na przezroczystym podłożu. + +## Typowe pułapki i wskazówki ekspertów + +| Problem | Dlaczego się pojawia | Rozwiązanie | +|---------|----------------------|-------------| +| Kod kreskowy wygląda na rozciągnięty | X‑dimension jest zbyt duża w stosunku do rozmiaru obrazu | Trzymaj `XDimension.Pixels` w przedziale 2‑5 dla większości kodów pocztowych | +| Skaner odrzuca obraz | Wysokość kreski jest poniżej minimalnego wymogu usługi pocztowej | Użyj `BarHeight.Pixels` ≥ 80 dla RM4SCC, chyba że specyfikacja mówi inaczej | +| Rozmiar pliku PNG jest duży | Rozdzielczość obrazu jest wyższa niż potrzebna | Zapisz jako PNG‑8 (`BarCodeImageFormat.Png8`) lub zmniejsz wymiary w pikselach | + +**Wskazówka eksperta:** Zawsze testuj wygenerowany kod kreskowy na rzeczywistym skanerze przed wdrożeniem do produkcji. Małe różnice wizualne mogą wpływać na czytelność. + +## Pełny kod źródłowy + +Skopiuj cały blok poniżej do nowej aplikacji konsolowej (`Program.cs`). Dostosuj ścieżki wyjściowe do folderu, w którym proces ma prawo zapisu. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Uruchomienie programu wypisze *„Barcodes generated successfully.”* i utworzy dwa pliki PNG w katalogu roboczym wykonywalnego pliku. + +## Podsumowanie + +Teraz wiesz, jak **generować kod kreskowy pocztowy** w C# z Aspose.BarCode, obejmując zarówno kody Planet o automatycznej wysokości, jak i kody RM4SCC o stałej wysokości. Przewodnik pokazał także, **jak generować kod kreskowy** z własnym X‑dimension, wysokością kreski i opcjami wizualnymi, zapewniając solidną bazę dla każdego projektu automatyzacji wysyłek. + +Kolejne kroki, które możesz rozważyć: + +* Zintegruj wygenerowane PNG z fakturą PDF przy użyciu Aspose.PDF. +* Przełącz format wyjściowy na SVG, aby uzyskać skalowalną grafikę wektorową. +* Użyj klasy `BarcodeReader`, aby programowo zweryfikować zakodowane dane. + +Śmiało eksperymentuj z różnymi symbolikami (np. `EncodeTypes.Postnet`) i dziel się wynikami ze społecznością. Powodzenia w kodowaniu! + + +## Co powinieneś nauczyć się dalej? + + +Poniższe tutoriale 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 wraz z wyjaśnieniami krok po kroku, aby pomóc Ci opanować dodatkowe funkcje API i odkrywać alternatywne podejścia implementacyjne w własnych projektach. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/portuguese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..39ca79cba --- /dev/null +++ b/barcode/portuguese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,253 @@ +--- +category: general +date: 2026-08-19 +description: O tutorial do gerador de códigos de barras em C# mostra como gerar códigos + de barras DataBar Expanded Stacked, personalizar o tamanho do código de barras e + configurar linhas e colunas. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: pt +lastmod: 2026-08-19 +og_description: O tutorial de gerador de código de barras em C# ensina como gerar + códigos de barras DataBar, personalizar o tamanho e configurar linhas e colunas + para uma saída precisa. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Gerador de códigos de barras em C# – guia passo a passo para códigos DataBar + personalizados +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Gerador de código de barras C#: crie códigos DataBar personalizados' +url: /pt/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Gerador de código de barras C#: crie códigos DataBar personalizados + +Se você precisa de um **c# barcode generator** que possa produzir símbolos DataBar Expanded Stacked, este guia mostra exatamente como gerar imagens de código de barras com linhas e colunas personalizadas. Você aprenderá a configurar parâmetros databar, ajustar o tamanho do código de barras e salvar o resultado como arquivos PNG. + +Gerar códigos de barras programaticamente elimina etapas de design manual e garante saída consistente em todas as plataformas. Neste tutorial você irá: + +* Instalar e referenciar a biblioteca Aspose.BarCode para .NET (ou qualquer pacote compatível). +* Criar um gerador de código de barras para a simbologia DataBar Expanded Stacked. +* **Como gerar imagens de código de barras** com configurações específicas de coluna e linha. +* **Personalizar o tamanho do código de barras** controlando linhas e colunas do DataBar. +* **Configurar parâmetros databar** como texto, formato e qualidade da imagem. + +## Pré-requisitos + +* .NET 6.0 SDK ou posterior instalado. +* Um ambiente de desenvolvimento C# (Visual Studio, VS Code, Rider, etc.). +* Pacote NuGet `Aspose.BarCode` (ou uma biblioteca equivalente que forneça `BarcodeGenerator`, `EncodeTypes` e `BarCodeImageFormat`). + +Adicione o pacote usando a CLI do .NET: + +```bash +dotnet add package Aspose.BarCode +``` + +## Usando o gerador de código de barras C# para criar códigos DataBar + +As próximas seções guiam você passo a passo. O foco principal está na API **c# barcode generator**, mas o mesmo padrão se aplica a outras bibliotecas de código de barras que exponham propriedades semelhantes. + +### Etapa 1: Inicializar o gerador de código de barras com texto de exemplo + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Por que esta etapa?* +`BarcodeGenerator` é o ponto de entrada para todas as tarefas de criação de códigos de barras. Fornecer o enum `EncodeTypes.DatabarExpandedStacked` informa à biblioteca qual simbologia usar, enquanto o argumento de texto se torna o valor legível codificado no símbolo. + +### Etapa 2: Definir o número de colunas (linhas padrão são usadas) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Por que esta etapa?* +Os símbolos DataBar Expanded Stacked consistem em elementos lineares empilhados. Ajustar a propriedade `Columns` altera a densidade horizontal, permitindo que você encaixe cadeias de dados mais longas sem aumentar a altura geral. Isso personaliza diretamente **o tamanho do código de barras**. + +### Etapa 3: Salvar a imagem do código de barras que usa quatro colunas + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*O que você vê:* +A imagem salva `DatabarCols4.png` exibe um código de barras DataBar mais largo que o padrão porque contém quatro colunas. Você pode abrir o arquivo em qualquer visualizador de imagens para verificar o resultado. + +### Etapa 4: Re‑inicializar o gerador para uma nova configuração + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Por que re‑inicializar?* +Mudar a propriedade `Rows` mantendo a configuração de coluna anterior pode gerar uma combinação inesperada. Começar com uma nova instância garante que apenas o parâmetro pretendido (`Rows`) influencie a próxima imagem. + +### Etapa 5: Definir o número de linhas (colunas padrão são usadas) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Por que esta etapa?* +A propriedade `Rows` controla o empilhamento vertical. Aumentar as linhas torna o código de barras mais alto, o que pode ser útil quando o espaço horizontal é limitado, mas há abundância vertical. Esta é outra forma de **personalizar o tamanho do código de barras**. + +### Etapa 6: Salvar a imagem do código de barras que usa três linhas + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Resultado:* +`DatabarRows3.png` mostra um código de barras mais alto com três linhas empilhadas, demonstrando como **configurar parâmetros databar** impacta a aparência visual. + +## Exemplo completo executável + +Abaixo está um programa completo que você pode copiar, colar e executar. Ele inclui todas as importações, tratamento de erros e comentários para clareza. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Saída esperada** + +Executar o programa gera dois arquivos PNG: + +* `DatabarCols4.png` – um código de barras DataBar largo com quatro colunas. +* `DatabarRows3.png` – um código de barras DataBar alto com três linhas. + +Abra as imagens para confirmar que as dimensões do código de barras correspondem aos parâmetros configurados. + +## Perguntas comuns e tratamento de casos extremos + +| Question | Answer | +|----------|--------| +| *E se eu precisar de linhas personalizadas **e** colunas?* | Defina `Rows` **e** `Columns` na mesma instância de `BarcodeGenerator` antes de chamar `Save`. A biblioteca combina ambos os valores para produzir uma grade do tamanho solicitado. | +| *Posso mudar o formato da imagem?* | Sim. Substitua `BarCodeImageFormat.Png` por `Jpeg`, `Bmp` ou `Gif` conforme seu fluxo de trabalho. | +| *O que acontece quando o texto é maior que o símbolo pode suportar?* | O gerador lança uma `ArgumentException`. Reduza o texto ou aumente `Columns`/`Rows` para fornecer mais capacidade. | +| *Existe uma maneira de definir DPI ou resolução da imagem?* | Use `generator.Parameters.ImageResolution` para especificar o DPI desejado antes de salvar. Isso personaliza ainda mais o **tamanho do código de barras** para impressão em alta resolução. | +| *A biblioteca suporta outras variantes do DataBar?* | Sim. Substitua `EncodeTypes.DatabarExpandedStacked` por `DatabarExpanded`, `DatabarLimited`, etc., mantendo a mesma estrutura de parâmetros. | + +## Dicas para geração confiável de códigos de barras + +* **Dica profissional:** Sempre verifique a imagem gerada com um scanner ou aplicativo móvel antes de implantá‑la em produção. +* **Atenção:** Diretórios de saída nulos ou vazios—`Save` lançará uma exceção se o caminho não existir. Crie a pasta programaticamente se necessário. +* **Nota de desempenho:** Reutilizar uma única instância de `BarcodeGenerator` e mudar apenas `Rows` ou `Columns` pode reduzir a sobrecarga de criação de objetos ao gerar muitos códigos de barras em um loop. + +## Conclusão + +Agora você sabe como usar um **c# barcode generator** para **criar imagens de código de barras databar**, **personalizar o tamanho do código de barras** e **configurar parâmetros databar** como linhas e colunas. Ajustando essas configurações, você pode encaixar códigos de barras em qualquer requisito de layout mantendo a confiabilidade da leitura. + +Em seguida, explore tópicos relacionados como **como gerar PDFs de código de barras**, incorporar códigos de barras em relatórios ou mudar para outras simbologias (QR, Code‑128, etc.). Experimente diferentes `Rows`, `Columns` e resoluções de imagem para encontrar a configuração ideal para seu caso de uso específico. + +--- + + +## O que você deve aprender a seguir? + +Os tutoriais a seguir cobrem tópicos estreitamente relacionados que se baseiam nas 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. + +- [Como gerar e ajustar a altura do código de barras para Databar unidimensional usando Aspose.BarCode para .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Gerar códigos de barras Databar 2D unidimensionais usando a API Aspose.BarCode .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Gerar código de barras Aspose.BarCode Databar usando a API .NET – Configuração de linhas e colunas](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/portuguese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..58d252fd9 --- /dev/null +++ b/barcode/portuguese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,221 @@ +--- +category: general +date: 2026-08-19 +description: Aprenda como gerar um arquivo PNG de código de barras em C# e ajustar + sua altura, abordando como gerar imagens de código de barras e mudar a altura do + código de barras facilmente. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: pt +lastmod: 2026-08-19 +og_description: Crie um arquivo PNG de código de barras em C# e aprenda a gerar imagens + de código de barras, ajustar a altura do código de barras e alterar a altura para + leituras ótimas. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Crie um arquivo PNG de código de barras em C# – guia passo a passo +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Como criar um arquivo PNG de código de barras com altura ajustável em C# +url: /pt/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Como criar um arquivo PNG de código de barras com altura ajustável em C# + +Se você precisa criar um **arquivo PNG de código de barras** em C#, este guia mostra exatamente como fazer. Você verá um exemplo completo e executável que demonstra **como gerar imagens de código de barras** e como **ajustar a altura do código de barras** para diferentes casos de uso. + +Gerar um arquivo PNG de código de barras é uma necessidade comum para sistemas de inventário, terminais de ponto de venda e qualquer aplicação que precise imprimir ou exibir dados legíveis por máquina. Ao final deste tutorial você será capaz de mudar a altura do código de barras, salvar múltiplos arquivos PNG e entender o impacto da altura na confiabilidade da leitura. + +## Pré-requisitos + +Antes de começar, certifique‑se de que você tem: + +* .NET 6.0 SDK ou posterior instalado +* Visual Studio 2022 (ou qualquer IDE que suporte .NET) +* O pacote NuGet **Aspose.BarCode for .NET** (o exemplo de código usa esta biblioteca) + +Você pode adicionar o pacote pela linha de comando: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Dica profissional:** A versão de avaliação gratuita do Aspose.BarCode funciona para desenvolvimento e testes. Para produção, obtenha uma chave licenciada. + +## Instalar a biblioteca de código de barras + +O primeiro passo é referenciar a biblioteca no seu projeto. Adicione as diretivas `using` a seguir no topo do seu arquivo C#: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Esses namespaces dão acesso a `BarcodeGenerator`, `EncodeTypes` e `BarCodeImageFormat`. + +## Criar o arquivo PNG de código de barras + +Agora criamos uma instância de `BarcodeGenerator` que irá gerar um **arquivo PNG de código de barras**. O exemplo usa a simbologia Databar OmniDirectional, mas você pode substituir `EncodeTypes.DatabarOmniDirectional` por qualquer tipo suportado. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +A string `"(01)12345678901231"` segue o formato do Identificador de Aplicação GS1 para um GTIN de 14 dígitos. Ajuste os dados para corresponder aos identificadores do seu produto. + +## Definir a dimensão X (opcional) + +A dimensão X define a largura de um único módulo do código de barras. Um valor baseado em pixels oferece controle preciso sobre o tamanho da imagem. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Um valor de `2` pixels funciona bem para a maioria das telas. Aumente se precisar de um código de barras maior ao imprimir. + +## Ajustar a altura do código de barras e salvar o arquivo PNG + +A propriedade **BarHeight** controla o tamanho vertical das barras. Alterar esse valor permite **ajustar a altura do código de barras** sem afetar os dados codificados. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +O arquivo `DatabarBarHeight30Pixels.png` agora é um **arquivo PNG de código de barras** com 30 pixels de altura. + +Para **alterar a altura do código de barras** e criar uma segunda imagem, basta atribuir um novo valor e chamar `Save` novamente: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Agora você tem dois arquivos PNG — um com 30 px e outro com 60 px — demonstrando como **ajustar a altura do código de barras** dinamicamente. + +### Por que a altura da barra importa + +* **Legibilidade:** Scanners esperam uma altura mínima para detecção confiável. Um código de barras muito curto pode ser ignorado, especialmente em câmeras de baixa resolução. +* **Estética:** Ajustar a altura do código de barras aos elementos de design ao redor cria uma UI mais limpa. +* **Restrições de impressão:** Algumas impressoras de etiquetas têm slots de altura fixa; ajustar a altura garante que o código de barras caiba. + +**Melhor prática:** Mantenha a altura como múltiplo da dimensão X (por exemplo, 30 px quando a dimensão X é 2 px) para preservar a proporção e evitar distorções. + +## Exemplo completo + +Abaixo está o programa completo e autocontido que você pode colar em uma aplicação console e executar imediatamente. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Saída esperada** + +Executar o programa cria dois arquivos no diretório de trabalho do executável: + +* `DatabarBarHeight30Pixels.png` – um arquivo PNG de código de barras com 30 pixels de altura +* `DatabarBarHeight60Pixels.png` – um arquivo PNG de código de barras com 60 pixels de altura + +Abra qualquer um dos PNGs com um visualizador de imagens; você verá um código de barras Databar OmniDirectional nítido, pronto para leitura. + +## Casos de borda e solução de problemas + +| Situação | O que verificar | Correção recomendada | +|-----------|----------------|----------------------| +| O código de barras aparece borrado | Dimensão X muito baixa para a altura escolhida | Aumente `XDimension.Pixels` (ex.: de 2 para 3) | +| O scanner falha em código de barras de baixa altura | Altura abaixo do mínimo do scanner | Defina `BarHeight.Pixels` para pelo menos 30 px (ou conforme especificações do scanner) | +| O arquivo PNG está vazio ou corrompido | Caminho de saída inválido ou permissão de gravação negada | Use um caminho absoluto ou garanta que o app tenha acesso de escrita | +| Precisa de outra simbologia | `EncodeTypes` atual não é adequado | Substitua `EncodeTypes.DatabarOmniDirectional` por outro valor do enum (ex.: `EncodeTypes.Code128`) | + +## Perguntas frequentes + +**P: Posso gerar outros formatos de imagem (JPEG, BMP)?** +R: Sim. Substitua `BarCodeImageFormat.Png` por `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, etc. + +**P: Como incorporo o PNG em uma página web?** +R: Sirva o PNG gerado via um endpoint HTTP ou converta‑o para uma string Base64 e coloque‑a no atributo `src` de uma tag ``. + +**P: Existe uma forma de definir a cor de fundo?** +R: Use `generator.Parameters.Image.BackgroundColor = Color.White;` (ou qualquer `System.Drawing.Color`). + +## Conclusão + +Agora você sabe como **gerar um arquivo PNG de código de barras** em C# e ajustar precisamente a **altura do código de barras** para atender a requisitos de leitura ou design. Alterando a propriedade `BarHeight.Pixels` você pode **mudar a altura do código de barras** dinamicamente e produzir múltiplos ativos PNG a partir de um único código‑base. + +Em seguida, explore outras opções de personalização, como cor de primeiro plano, margens e adição de texto legível por humanos. Você também pode experimentar diferentes simbologias (`EncodeTypes.Code128`, `EncodeTypes.QR`) para ampliar o leque de dados que pode codificar. + +Bom código, e que seus códigos de barras sempre sejam lidos na primeira tentativa! + +## O que você deve aprender a seguir? + +Os tutoriais a seguir cobrem tópicos intimamente relacionados que se baseiam nas 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 alternativas de implementação em seus próprios projetos. + +- [Como gerar e ajustar a altura do código de barras para Databar unidimensional usando Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Como gerar código de barras – Tipos de código de barras unidimensionais](/barcode/english/net/one-dimensional-barcode-types/) +- [Como gerar código de barras Aztec com proporção personalizada usando 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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/portuguese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..7bf44ae1c --- /dev/null +++ b/barcode/portuguese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Crie arquivos PNG de databar em C# com Aspose.BarCode. Aprenda como gerar + imagens databar, configurar parâmetros databar e salvar a saída em PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: pt +lastmod: 2026-08-19 +og_description: Crie arquivos PNG de databar em C# usando Aspose.BarCode. Este tutorial + orienta você sobre como gerar imagens databar, configurar parâmetros como dimensão + X e proporção, e salvar arquivos PNG de alta qualidade para impressão ou uso na + web. +og_image_alt: create databar PNG example +og_title: Crie imagens PNG de databar em C# – guia passo a passo +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Como criar imagens PNG de databar com C# e Aspose.BarCode +url: /pt/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Como criar imagens PNG de databar com C# e Aspose.BarCode + +Se você precisa **criar arquivos PNG de databar** em uma aplicação .NET, este guia mostra exatamente como fazer. Você verá um exemplo completo e executável que gera códigos DataBar omnidirecionais empilhados, configura parâmetros chave e salva dois arquivos PNG com diferentes proporções. + +Gerar uma imagem DataBar não se resume a chamar um único método. Também é necessário **configurar os parâmetros do databar** como a dimensão X (largura do módulo) e a proporção para atender às especificações de impressão ou leitura. Ao final deste tutorial você entenderá **como gerar gráficos databar** que funcionam de forma confiável em cenários reais. + +## Pré‑requisitos + +- .NET 6.0 ou superior (o código também funciona com .NET Framework 4.7+) +- Visual Studio 2022 ou qualquer IDE compatível com C# +- Uma licença válida para **Aspose.BarCode for .NET** (a avaliação gratuita serve para testes) +- Familiaridade básica com a sintaxe C# + +> **Dica:** Se ainda não tem uma licença, você pode solicitar uma chave de avaliação temporária no portal da Aspose. A API se comporta da mesma forma; apenas a marca d'água muda. + +## Etapa 1: Instalar o pacote NuGet Aspose.BarCode + +Abra seu projeto no Visual Studio, clique com o botão direito na solução e selecione **Manage NuGet Packages**. Procure por `Aspose.BarCode` e instale a versão estável mais recente. + +```bash +dotnet add package Aspose.BarCode +``` + +Este comando adiciona o assembly `Aspose.BarCode` ao seu projeto e disponibiliza a classe `BarcodeGenerator`. + +## Etapa 2: Inicializar o gerador de código de barras para um DataBar omnidirecional empilhado + +O construtor `BarcodeGenerator` recebe dois argumentos: o tipo de código de barras e a string de dados bruta. Para um DataBar omnidirecional empilhado você usa `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Por que isso importa:** A constante `EncodeTypes.DatabarStackedOmniDirectional` indica à biblioteca que o código de barras deve ser legível em qualquer orientação, o que é ideal para etiquetas de prateleira no varejo. + +## Etapa 3: Configurar a dimensão X (largura do módulo) em pixels + +A dimensão X controla o tamanho do menor elemento de barra. Defini‑la em pixels oferece controle preciso sobre o tamanho final da imagem. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Um valor de **2 pixels** é um bom equilíbrio entre legibilidade e compacidade para a maioria das impressoras de etiquetas. Ajuste esse valor se precisar de módulos maiores ou menores. + +## Etapa 4: Definir a primeira proporção e salvar o PNG + +A proporção influencia a altura do DataBar empilhado. Uma proporção de **15** produz um código de barras relativamente curto, enquanto **30** o torna mais alto. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +O método `Save` grava o código de barras gerado em um arquivo PNG. PNG é sem perdas, o que preserva as bordas nítidas necessárias para os scanners de código de barras. + +## Etapa 5: Alterar a proporção e salvar um segundo PNG + +Você pode reutilizar a mesma instância de `BarcodeGenerator` para produzir variações simplesmente alterando a proporção. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Agora você tem dois arquivos PNG — `DatabarAspectRatio15.png` e `DatabarAspectRatio30.png` — cada um com uma densidade visual diferente. + +## Etapa 6: Verificar a saída + +Abra os arquivos PNG gerados em qualquer visualizador de imagens. Você deverá ver um código de barras DataBar limpo e de alto contraste. Escanear as imagens com um leitor de código de barras de smartphone confirma que ambas as proporções decodificam o valor GTIN original `12345678901231`. + +![exemplo de criação de databar PNG](databar_example.png) + +*A imagem acima mostra os dois arquivos PNG lado a lado. A imagem da esquerda usa proporção 15, a da direita usa proporção 30.* + +## Variações comuns e casos de borda + +| Cenário | O que mudar | Motivo | +|----------|----------------|--------| +| **Dados diferentes** | Substitua a string `(01)12345678901231` por qualquer Identificador de Aplicação GS1 válido e seus dados | Permite codificar IDs de produto, números de série, etc. | +| **Resolução maior** | Aumente `XDimension.Pixels` para 3 ou 4 | Necessário quando o código de barras será impresso em tamanhos grandes ou escaneado à distância. | +| **Outros tipos de DataBar** | Use `EncodeTypes.DatabarStacked` ou `EncodeTypes.DatabarExpanded` | Escolha o tipo que melhor se adapta ao layout da sua etiqueta. | +| **Fundo transparente** | Passe `BarCodeImageFormat.Png` com `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Útil para sobrepor o código de barras em etiquetas coloridas. | + +> **Atenção:** Definir uma dimensão X muito pequena (< 1 pixel) pode gerar um código de barras que parece borrado após + +## 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 alternativas de implementação em seus próprios projetos. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/portuguese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..2ef12ba17 --- /dev/null +++ b/barcode/portuguese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,211 @@ +--- +category: general +date: 2026-08-19 +description: Aprenda a gerar código de barras postal em C# usando Aspere.BarCode. + Este guia passo a passo mostra como gerar código de barras nos formatos Planet e + RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: pt +lastmod: 2026-08-19 +og_description: Gere código de barras postal em C# com Aspose.BarCode. Siga este guia + para aprender como gerar código de barras para Planet e RM4SCC com dimensões personalizadas. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Gerar código de barras postal em C# – guia completo do Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Como gerar código de barras postal em C# com Aspose.BarCode +url: /pt/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Como gerar código de barras postal em C# com Aspose.BarCode + +Se você precisa **gerar código de barras postal** para aplicações de envio, este guia mostra exatamente como gerar o código de barras usando a biblioteca Aspose.BarCode. Você verá um exemplo completo e executável que cria tanto um código de barras Planet (altura calculada automaticamente) quanto um código de barras RM4SCC com altura de barra explícita. + +Gerar código de barras postal é uma necessidade comum para softwares de logística, impressoras de etiquetas automáticas e sistemas de mala direta em massa. Ao final deste tutorial você será capaz de integrar a geração de códigos de barras em qualquer projeto .NET, personalizar a dimensão X e controlar a altura da barra quando o formato padrão permite. + +**O que você aprenderá** + +* Como configurar o Aspose.BarCode em um projeto C#. +* Como gerar códigos de barras Planet e RM4SCC. +* Como ajustar a dimensão X (largura do módulo) e a altura da barra. +* Como salvar o resultado como imagem PNG. + +Nenhum serviço externo é necessário — tudo roda localmente após você referenciar o pacote NuGet Aspose.BarCode. + +## Pré-requisitos + +* .NET 6.0 SDK ou superior (o código também funciona com .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code ou qualquer IDE C# de sua preferência. +* Pacote Aspose.BarCode for .NET – instale via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Gerar código de barras postal com Aspose.BarCode + +As seções a seguir orientam passo a passo, desde a criação dos objetos geradores até a gravação dos arquivos PNG finais. + +### Etapa 1: Criar um código de barras Planet (altura automática) + +Planet é um código de barras postal usado em muitos países para triagem de correspondência. Quando você cria um código de barras Planet, a biblioteca determina automaticamente a altura ideal da barra com base nos dados codificados. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Por que isso funciona** – `EncodeTypes.Planet` indica ao Aspose.BarCode que use a simbologia Planet. A propriedade `XDimension` controla a largura da menor barra (o módulo). Como o Planet não exige uma altura fixa, a biblioteca calcula uma altura adequada automaticamente, simplificando o código. + +### Etapa 2: Criar um código de barras RM4SCC com altura explícita + +RM4SCC é outra simbologia postal que frequentemente requer uma altura de barra específica para compatibilidade com scanners. O código abaixo mostra como definir essa altura manualmente. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Por que definir a altura** – Alguns scanners postais esperam uma altura mínima de barra. Ao atribuir `BarHeight.Pixels = 100`, você garante que a imagem gerada atenda a esses requisitos. A dimensão X permanece consistente com o código Planet, de modo que ambas as imagens compartilhem a mesma densidade visual. + +### Etapa 3: Verificar a saída + +Após executar o programa, abra os dois arquivos PNG localizados em `YOUR_DIRECTORY`. Você deverá ver dois códigos de barras distintos: + +* `PostalPlanetBarHeightNone.png` – um código Planet com altura calculada automaticamente. +* `PostalRM4SCCBarHeight100Pixels.png` – um código RM4SCC com altura de barra de 100 pixels. + +Ambas as imagens podem ser enviadas diretamente para impressoras de etiquetas ou exibidas em uma aplicação web. + +![Imagem gerada de código de barras postal usando Aspose.BarCode](generated-postal-barcode.png) + +*Texto alternativo da imagem:* **Imagem gerada de código de barras postal** usando Aspose.BarCode (demonstrando como gerar código de barras postal). + +## Como gerar código de barras com dimensões personalizadas (avançado) + +Se precisar ajustar outros parâmetros — como margens, posicionamento de texto ou cor — o Aspose.BarCode oferece um rico objeto `Parameters`. A seguir, um exemplo rápido que adiciona um fundo branco e desabilita o texto legível por humanos. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Quando usar isso** – Desabilitar o texto legível por humanos é comum em triagens automatizadas onde apenas o padrão legível por máquina importa. Definir uma cor de fundo garante que o código de barras imprima corretamente em mídia transparente. + +## Armadilhas comuns e dicas de especialista + +| Problema | Por que acontece | Solução | +|----------|------------------|---------| +| O código de barras parece esticado | A dimensão X é muito grande em relação ao tamanho da imagem | Mantenha `XDimension.Pixels` entre 2 e 5 para a maioria dos códigos postais | +| O scanner rejeita a imagem | A altura da barra está abaixo do mínimo exigido pelo serviço postal | Use `BarHeight.Pixels` ≥ 80 para RM4SCC, salvo especificação em contrário | +| O tamanho do arquivo PNG é grande | A resolução da imagem está maior que o necessário | Salve como PNG‑8 (`BarCodeImageFormat.Png8`) ou reduza as dimensões em pixels | + +**Dica de especialista:** Sempre teste o código de barras gerado com um scanner real antes de colocar em produção. Pequenas diferenças visuais podem afetar a legibilidade. + +## Código-fonte completo + +Copie todo o bloco abaixo para uma nova aplicação console (`Program.cs`). Ajuste os caminhos de saída para uma pasta onde seu processo tenha permissão de gravação. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Executar o programa exibe *“Barcodes generated successfully.”* e cria os dois arquivos PNG no diretório de trabalho do executável. + +## Conclusão + +Agora você sabe como **gerar código de barras postal** em C# com Aspose.BarCode, cobrindo tanto códigos Planet de altura automática quanto códigos RM4SCC de altura fixa. O guia também mostrou **como gerar código de barras** com dimensão X personalizada, altura de barra e opções visuais, proporcionando uma base sólida para qualquer projeto de automação de correspondência. + +Próximos passos que você pode explorar: + +* Integrar os PNGs gerados em uma fatura PDF usando Aspose.PDF. +* Alterar o formato de saída para SVG para gráficos vetoriais escaláveis. +* Usar a classe `BarcodeReader` para verificar os dados codificados programaticamente. + +Sinta-se à vontade para experimentar diferentes simbologias (por exemplo, `EncodeTypes.Postnet`) e compartilhar seus resultados com a comunidade. Feliz codificação! + +## 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 alternativas de implementação em seus próprios projetos. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/russian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..a3265bd21 --- /dev/null +++ b/barcode/russian/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,254 @@ +--- +category: general +date: 2026-08-19 +description: Учебник по генератору штрих‑кодов на C# показывает, как создавать штрих‑коды + DataBar Expanded Stacked, настраивать размер штрих‑кода и конфигурировать строки + и столбцы. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: ru +lastmod: 2026-08-19 +og_description: Учебник по генератору штрихкодов на C# показывает, как генерировать + штрихкоды DataBar, настраивать их размер и задавать количество строк и столбцов + для точного вывода. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Генератор штрих‑кодов на C# – пошаговое руководство по созданию пользовательских + DataBar штрих‑кодов +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Генератор штрихкодов C#: создание пользовательских штрихкодов DataBar' +url: /ru/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# генератор штрих‑кодов: создание пользовательских DataBar штрих‑кодов + +Если вам нужен **c# barcode generator**, который может создавать символы DataBar Expanded Stacked, это руководство покажет, как точно генерировать изображения штрих‑кодов с пользовательскими строками и столбцами. Вы узнаете, как настроить параметры databar, изменить размер штрих‑кода и сохранить результат в виде PNG‑файлов. + +Программная генерация штрих‑кодов устраняет ручные этапы дизайна и гарантирует согласованный вывод на разных платформах. В этом учебнике вы: + +* Установите и подключите библиотеку Aspose.BarCode for .NET (или любой совместимый пакет). +* Создадите генератор штрих‑кода для символьного набора DataBar Expanded Stacked. +* **Как генерировать изображения штрих‑кода** с конкретными настройками столбцов и строк. +* **Настроите размер штрих‑кода** путем управления строками и столбцами DataBar. +* **Настроите параметры databar** такие как текст, формат и качество изображения. + +## Prerequisites + +* .NET 6.0 SDK или более поздняя версия. +* Среда разработки C# (Visual Studio, VS Code, Rider и т.д.). +* NuGet‑пакет `Aspose.BarCode` (или эквивалентная библиотека, предоставляющая `BarcodeGenerator`, `EncodeTypes` и `BarCodeImageFormat`). + +Добавьте пакет с помощью .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Using the C# barcode generator to create DataBar barcodes + +Следующие разделы проведут вас через каждый шаг. Основное внимание уделяется **c# barcode generator** API, но тот же шаблон применим к другим библиотекам штрих‑кодов, которые предоставляют аналогичные свойства. + +### Step 1: Initialise the barcode generator with sample text + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Почему этот шаг?* +`BarcodeGenerator` — точка входа для всех задач создания штрих‑кодов. Передача перечисления `EncodeTypes.DatabarExpandedStacked` сообщает библиотеке, какой символьный набор использовать, а аргумент текста становится читаемым значением, закодированным в символе. + +### Step 2: Set the number of columns (default rows are used) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Почему этот шаг?* +Символы DataBar Expanded Stacked состоят из наложенных линейных элементов. Изменение свойства `Columns` меняет горизонтальную плотность, позволяя разместить более длинные строки данных без увеличения общей высоты. Это напрямую **настраивает размер штрих‑кода**. + +### Step 3: Save the barcode image that uses four columns + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Что вы видите:* +Сохранённое изображение `DatabarCols4.png` отображает DataBar штрих‑код, шире стандартного, потому что содержит четыре столбца. Вы можете открыть файл в любом просмотрщике изображений, чтобы проверить результат. + +### Step 4: Re‑initialise the generator for a new configuration + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Почему переинициализировать?* +Изменение свойства `Rows` при сохранённом предыдущем значении `Columns` может привести к неожиданной комбинации. Создание нового экземпляра гарантирует, что только желаемый параметр (`Rows`) повлияет на следующее изображение. + +### Step 5: Set the number of rows (default columns are used) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Почему этот шаг?* +Свойство `Rows` управляет вертикальным наложением. Увеличение количества строк делает штрих‑код выше, что полезно, когда горизонтальное пространство ограничено, а вертикальное — обильное. Это ещё один способ **настроить размер штрих‑кода**. + +### Step 6: Save the barcode image that uses three rows + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Результат:* +`DatabarRows3.png` показывает более высокий штрих‑код с тремя наложенными строками, демонстрируя, как **configure databar parameters** влияет на визуальное представление. + +## Full runnable example + +Ниже приведена полная программа, которую можно скопировать, вставить и запустить. В ней включены все импорты, обработка ошибок и комментарии для ясности. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Ожидаемый вывод** + +Запуск программы создаёт два PNG‑файла: + +* `DatabarCols4.png` — широкий DataBar штрих‑код с четырьмя столбцами. +* `DatabarRows3.png` — высокий DataBar штрих‑код с тремя строками. + +Откройте изображения, чтобы убедиться, что размеры штрих‑кода соответствуют заданным параметрам. + +## Common questions and edge‑case handling + +| Question | Answer | +|----------|--------| +| *What if I need both custom rows **and** columns?* | Set `Rows` **and** `Columns` on the same `BarcodeGenerator` instance before calling `Save`. The library combines both values to produce a grid of the requested size. | +| *Can I change the image format?* | Yes. Replace `BarCodeImageFormat.Png` with `Jpeg`, `Bmp`, or `Gif` to suit your workflow. | +| *What happens when the text is longer than the symbol can hold?* | The generator throws an `ArgumentException`. Shorten the text or increase `Columns`/`Rows` to provide more capacity. | +| *Is there a way to set DPI or image resolution?* | Use `generator.Parameters.ImageResolution` to specify the desired DPI before saving. This further **customizes barcode size** for high‑resolution printing. | +| *Does the library support other DataBar variants?* | Yes. Replace `EncodeTypes.DatabarExpandedStacked` with `DatabarExpanded`, `DatabarLimited`, etc., while keeping the same parameter structure. | + +## Tips for reliable barcode generation + +* **Pro tip:** Always verify the generated image with a scanner or a mobile app before deploying it to production. +* **Watch out for:** Null or empty output directories—`Save` will throw an exception if the path does not exist. Create the folder programmatically if needed. +* **Performance note:** Re‑using a single `BarcodeGenerator` instance and only changing `Rows` or `Columns` can reduce object‑creation overhead when generating many barcodes in a loop. + +## Conclusion + +Теперь вы знаете, как использовать **c# barcode generator** для **создания databar штрих‑кодов**, **настройки размера штрих‑кода** и **конфигурации параметров databar** таких как строки и столбцы. Регулируя эти настройки, вы сможете вписать штрих‑коды в любой макет, сохраняя их надёжность при сканировании. + +Далее изучайте связанные темы, такие как **как генерировать PDF‑файлы со штрих‑кодами**, встраивание штрих‑кодов в отчёты или переход к другим символьным наборам (QR, Code‑128 и т.д.). Экспериментируйте с различными `Rows`, `Columns` и разрешениями изображений, чтобы найти оптимальную конфигурацию для вашего конкретного случая. + +--- + + +## 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 and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/russian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..354903b5e --- /dev/null +++ b/barcode/russian/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: Узнайте, как генерировать PNG‑файл штрих‑кода на C# и регулировать его + высоту, включая создание изображений штрих‑кода и простое изменение высоты штрих‑кода. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: ru +lastmod: 2026-08-19 +og_description: Создайте PNG‑файл штрих‑кода на C# и узнайте, как генерировать изображения + штрих‑кодов, регулировать высоту штрих‑кода и изменять её для оптимального сканирования. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Создайте PNG‑файл штрих‑кода в C# – пошаговое руководство +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Как создать PNG‑файл штрих‑кода с регулируемой высотой в C# +url: /ru/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Как создать PNG‑файл штрих‑кода с регулируемой высотой в C# + +Если вам нужно создать **PNG‑файл штрих‑кода** в C#, это руководство покажет, как это сделать. Вы увидите полностью готовый, исполняемый пример, демонстрирующий **генерацию изображений штрих‑кода** и **регулировку высоты штрих‑кода** для разных сценариев. + +Создание PNG‑файла штрих‑кода — распространённая задача для систем учёта, POS‑терминалов и любых приложений, которым требуется печатать или отображать машинно‑читаемые данные. К концу этого урока вы сможете изменять высоту штрих‑кода, сохранять несколько PNG‑файлов и понимать, как высота влияет на надёжность сканирования. + +## Предварительные требования + +Прежде чем начать, убедитесь, что у вас есть: + +* .NET 6.0 SDK или более новая версия +* Visual Studio 2022 (или любая IDE, поддерживающая .NET) +* NuGet‑пакет **Aspose.BarCode for .NET** (в примере используется эта библиотека) + +Пакет можно добавить из командной строки: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Бесплатная оценочная версия Aspose.BarCode подходит для разработки и тестирования. Для продакшна получите лицензионный ключ. + +## Установите библиотеку штрих‑кода + +Первый шаг — добавить ссылку на библиотеку в ваш проект. Добавьте следующие директивы `using` в начало вашего C#‑файла: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Эти пространства имён дают доступ к `BarcodeGenerator`, `EncodeTypes` и `BarCodeImageFormat`. + +## Создайте PNG‑файл штрих‑кода + +Теперь создаём экземпляр `BarcodeGenerator`, который будет выводить **PNG‑файл штрих‑кода**. В примере используется символьная система Databar OmniDirectional, но вы можете заменить `EncodeTypes.DatabarOmniDirectional` на любой поддерживаемый тип. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Строка `"(01)12345678901231"` соответствует формату GS1 Application Identifier для 14‑значного GTIN. Подкорректируйте данные под свои идентификаторы продуктов. + +## Установите X‑размер (необязательно) + +X‑размер определяет ширину отдельного модуля штрих‑кода. Значение в пикселях даёт точный контроль над размером изображения. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Значение `2` пикселя хорошо подходит для большинства экранов. Увеличьте его, если нужен более крупный штрих‑код при печати. + +## Регулируйте высоту штрих‑кода и сохраняйте PNG‑файл + +Свойство **BarHeight** управляет вертикальным размером полос. Изменяя это значение, вы **регулируете высоту штрих‑кода** без изменения закодированных данных. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Файл `DatabarBarHeight30Pixels.png` теперь представляет собой **PNG‑файл штрих‑кода** высотой 30 пикселей. + +Чтобы **изменить высоту штрих‑кода** и создать второе изображение, просто задайте новое значение и снова вызовите `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Теперь у вас есть два PNG‑файла — один высотой 30 px, другой 60 px — демонстрирующие, как **регулировать высоту штрих‑кода** «на лету». + +### Почему высота полос важна + +* **Читаемость:** Сканеры ожидают минимальную высоту для надёжного обнаружения. Слишком короткий штрих‑код может не считаться, особенно на камерах низкого разрешения. +* **Эстетика:** Согласование высоты штрих‑кода с окружающими элементами дизайна делает интерфейс чище. +* **Ограничения печати:** У некоторых принтеров этикеток фиксированные высотные слоты; регулировка высоты штрих‑кода гарантирует его размещение. + +**Best practice:** Делайте высоту кратной X‑размеру (например, 30 px при X‑размере 2 px), чтобы сохранить пропорции и избежать искажений. + +## Полный пример + +Ниже приведена полностью автономная программа, которую можно вставить в консольное приложение и сразу запустить. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Ожидаемый результат** + +Запуск программы создаёт два файла в рабочем каталоге исполняемого файла: + +* `DatabarBarHeight30Pixels.png` — PNG‑файл штрих‑кода высотой 30 пикселей +* `DatabarBarHeight60Pixels.png` — PNG‑файл штрих‑кода высотой 60 пикселей + +Откройте любой из PNG‑файлов в просмотрщике изображений — вы увидите чёткий штрих‑код Databar OmniDirectional, готовый к сканированию. + +## Пограничные случаи и устранение неполадок + +| Ситуация | Что проверить | Рекомендуемое решение | +|-----------|---------------|-----------------| +| Штрих‑код выглядит размытым | X‑размер слишком мал для выбранной высоты | Увеличьте `XDimension.Pixels` (например, с 2 до 3) | +| Сканер не читает штрих‑код низкой высоты | Высота ниже минимального порога сканера | Установите `BarHeight.Pixels` минимум 30 px (или согласно спецификации сканера) | +| PNG‑файл пустой или повреждён | Неправильный путь вывода или отсутствие прав записи | Используйте абсолютный путь или убедитесь, что приложение имеет права на запись | +| Требуется другая символьная система | Текущий `EncodeTypes` не подходит | Замените `EncodeTypes.DatabarOmniDirectional` на другое значение enum (например, `EncodeTypes.Code128`) | + +## Часто задаваемые вопросы + +**В: Можно ли генерировать другие форматы изображений (JPEG, BMP)?** +О: Да. Замените `BarCodeImageFormat.Png` на `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` и т.д. + +**В: Как встроить PNG в веб‑страницу?** +О: Отдайте сгенерированный PNG через HTTP‑endpoint или преобразуйте его в строку Base64 и поместите в атрибут `src` тега ``. + +**В: Можно ли задать цвет фона?** +О: Используйте `generator.Parameters.Image.BackgroundColor = Color.White;` (или любой `System.Drawing.Color`). + +## Заключение + +Теперь вы знаете, как **генерировать PNG‑файл штрих‑кода** в C# и точно **регулировать высоту штрих‑кода** под требования сканирования или дизайна. Изменяя свойство `BarHeight.Pixels`, вы можете **изменять высоту штрих‑кода** «на лету» и создавать несколько PNG‑ресурсов из одного кода. + +Далее изучайте другие варианты настройки, такие как цвет штрихов, отступы и добавление человекочитаемого текста. Вы также можете экспериментировать с различными символьными системами (`EncodeTypes.Code128`, `EncodeTypes.QR`), расширяя диапазон кодируемых данных. + +Удачной разработки, и пусть ваши штрих‑коды всегда сканируются с первой попытки! + +## Что изучать дальше? + +Следующие руководства охватывают тесно связанные темы, расширяющие техники, продемонстрированные в этом руководстве. Каждый ресурс содержит полностью работающие примеры кода с пошаговыми объяснениями, помогающими освоить дополнительные возможности API и исследовать альтернативные подходы в ваших проектах. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/russian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/russian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..208aa0cd3 --- /dev/null +++ b/barcode/russian/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,158 @@ +--- +category: general +date: 2026-08-19 +description: Создавайте PNG‑файлы Databar в C# с помощью Aspose.BarCode. Узнайте, + как генерировать изображения Databar, настраивать параметры Databar и сохранять + результат в формате PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: ru +lastmod: 2026-08-19 +og_description: Создавайте PNG‑файлы Databar в C# с помощью Aspose.BarCode. Этот учебник + пошагово покажет, как генерировать изображения Databar, настраивать параметры Databar, + такие как X‑размер и соотношение сторон, и сохранять PNG‑файлы высокого качества + для печати или использования в вебе. +og_image_alt: create databar PNG example +og_title: Создание PNG‑изображений databar в C# – пошаговое руководство +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Как создать PNG‑изображения databar с помощью C# и Aspose.BarCode +url: /ru/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Как создавать PNG‑изображения DataBar с C# и Aspose.BarCode + +Если вам нужно **создавать PNG‑DataBar** файлы в .NET‑приложении, это руководство покажет вам, как это сделать. Вы увидите полностью готовый, исполняемый пример, который генерирует stacked omnidirectional DataBar коды, настраивает ключевые параметры и сохраняет два PNG‑файла с разными соотношениями сторон. + +Создание изображения DataBar — это не просто вызов одной функции. Вам также нужно **настраивать параметры DataBar**, такие как X‑dimension (ширина модуля) и соотношение сторон, чтобы соответствовать требованиям печати или сканирования. К концу этого руководства вы поймёте, **как генерировать графику DataBar**, которая надёжно работает в реальных сценариях. + +## Предварительные требования + +- .NET 6.0 или новее (код также работает с .NET Framework 4.7+) +- Visual Studio 2022 или любой IDE, совместимый с C# +- Действительная лицензия для **Aspose.BarCode for .NET** (бесплатная оценочная версия подходит для тестирования) +- Базовое знакомство с синтаксисом C# + +> **Совет:** Если у вас ещё нет лицензии, вы можете запросить временный оценочный ключ на портале Aspose. API работает так же; меняется только водяной знак. + +## Шаг 1: Установите пакет Aspose.BarCode NuGet + +Откройте ваш проект в Visual Studio, щёлкните правой кнопкой мыши по решению и выберите **Manage NuGet Packages**. Найдите `Aspose.BarCode` и установите последнюю стабильную версию. + +```bash +dotnet add package Aspose.BarCode +``` + +Эта команда добавляет сборку `Aspose.BarCode` в ваш проект и делает класс `BarcodeGenerator` доступным. + +## Шаг 2: Инициализируйте генератор штрихкода для stacked omnidirectional DataBar + +Конструктор `BarcodeGenerator` принимает два аргумента: тип штрихкода и строку исходных данных. Для stacked omnidirectional DataBar используйте `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Почему это важно:** Константа `EncodeTypes.DatabarStackedOmniDirectional` указывает библиотеке создавать штрихкод, который может быть считан в любой ориентации, что идеально подходит для этикеток на полках розничных магазинов. + +## Шаг 3: Настройте X‑dimension (ширину модуля) в пикселях + +X‑dimension управляет размером самого маленького элемента полосы. Установка её в пикселях даёт точный контроль над конечным размером изображения. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Значение **2 пикселя** обеспечивает хороший баланс между читаемостью и компактностью для большинства принтеров этикеток. При необходимости измените это значение для более крупных или более мелких модулей. + +## Шаг 4: Установите первое соотношение сторон и сохраните PNG + +Соотношение сторон влияет на высоту stacked DataBar. Соотношение **15** создаёт относительно короткий штрихкод, тогда как **30** делает его выше. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Метод `Save` записывает сгенерированный штрихкод в PNG‑файл. PNG — без потерь, что сохраняет чёткие края, необходимые сканерам штрихкодов. + +## Шаг 5: Измените соотношение сторон и сохраните второй PNG + +Вы можете повторно использовать тот же экземпляр `BarcodeGenerator` для создания вариантов, просто изменив соотношение сторон. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Теперь у вас есть два PNG‑файла — `DatabarAspectRatio15.png` и `DatabarAspectRatio30.png` — каждый с разной визуальной плотностью. + +## Шаг 6: Проверьте результат + +Откройте сгенерированные PNG‑файлы в любом просмотрщике изображений. Вы должны увидеть чистый, высококонтрастный штрихкод DataBar. Сканирование изображений с помощью сканера штрихкодов на смартфоне подтверждает, что оба соотношения сторон декодируются в исходное значение GTIN `12345678901231`. + +![create databar PNG example](databar_example.png) + +*На изображении выше показаны два PNG‑файла рядом. Левый файл использует соотношение сторон 15, правый — соотношение сторон 30.* + +## Распространённые варианты и граничные случаи + +| Сценарий | Что изменить | Причина | +|----------|----------------|--------| +| **Другие данные** | Замените строку `(01)12345678901231` любой допустимой GS1 Application Identifier и данными | Позволяет кодировать идентификаторы продуктов, серийные номера и т.д. | +| **Более высокое разрешение** | Увеличьте `XDimension.Pixels` до 3 или 4 | Требуется, когда штрихкод будет печататься в больших размерах или сканироваться с расстояния. | +| **Другие типы DataBar** | Используйте `EncodeTypes.DatabarStacked` или `EncodeTypes.DatabarExpanded` | Выберите тип, который лучше подходит для макета вашей этикетки. | +| **Прозрачный фон** | Передайте `BarCodeImageFormat.Png` с `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Полезно для наложения штрихкода на цветные этикетки. | + +> **Осторожно:** Установка X‑dimension слишком маленькой (< 1 pixel) может привести к тому, что штрихкод будет выглядеть размытым после + +## Что изучать дальше? + +Следующие руководства охватывают тесно связанные темы, которые опираются на техники, продемонстрированные в этом руководстве. Каждый ресурс включает полные рабочие примеры кода с пошаговыми объяснениями, чтобы помочь вам освоить дополнительные возможности API и исследовать альтернативные подходы к реализации в ваших проектах. + +- [Как генерировать и настраивать высоту штрихкода для One-Dimensional Databar с помощью Aspose.BarCode для .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Создание One-Dimensional Databar GS1 кодирования с Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Генерация Databar штрихкода Aspose.BarCode с использованием .NET API – конфигурация строк и столбцов](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/russian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..5465573de --- /dev/null +++ b/barcode/russian/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Узнайте, как генерировать почтовый штрих‑код в C# с помощью Aspere.BarCode. + Это пошаговое руководство показывает, как создавать штрих‑коды форматов Planet и + RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: ru +lastmod: 2026-08-19 +og_description: Создайте почтовый штрих‑код на C# с помощью Aspose.BarCode. Следуйте + этому руководству, чтобы узнать, как генерировать штрих‑код для Planet и RM4SCC + с пользовательскими размерами. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Создание почтового штрихкода в C# – полное руководство Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Как сгенерировать почтовый штрих‑код в C# с помощью Aspose.BarCode +url: /ru/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Как генерировать почтовый штрих‑код в C# с помощью Aspose.BarCode + +Если вам нужно **генерировать почтовый штрих‑код** для почтовых приложений, это руководство покажет, как именно генерировать штрих‑код с использованием библиотеки Aspose.BarCode. Вы увидите полный, исполняемый пример, который создает как штрих‑код Planet (высота рассчитывается автоматически), так и штрих‑код RM4SCC с явно заданной высотой полосы. + +Генерация почтового штрих‑кода — распространённое требование для логистического программного обеспечения, автоматических принтеров этикеток и систем массовой рассылки. К концу этого урока вы сможете интегрировать генерацию штрих‑кода в любой проект .NET, настроить X‑размер и управлять высотой полосы, если стандартный формат это позволяет. + +**Что вы узнаете** + +* Как настроить Aspose.BarCode в проекте C#. +* Как генерировать почтовые штрих‑коды Planet и RM4SCC. +* Как регулировать X‑размер (ширину модуля) и высоту полосы. +* Как сохранить результат в виде PNG‑изображения. + +Внешние сервисы не требуются — всё работает локально после подключения пакета Aspose.BarCode через NuGet. + +## Предварительные требования + +* .NET 6.0 SDK или новее (код также работает с .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code или любой другой IDE для C#. +* Пакет Aspose.BarCode for .NET – установите его через NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Генерировать почтовый штрих‑код с помощью Aspose.BarCode + +В следующих разделах мы пошагово пройдём весь процесс: от создания объектов‑генераторов до сохранения окончательных PNG‑файлов. + +### Шаг 1: Создать штрих‑код Planet (автоматическая высота) + +Planet — почтовый штрих‑код, используемый во многих странах для сортировки почты. При создании штрих‑кода Planet библиотека автоматически определяет оптимальную высоту полосы на основе закодированных данных. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Почему это работает** – `EncodeTypes.Planet` указывает Aspose.BarCode использовать символьную систему Planet. Свойство `XDimension` задаёт ширину самой маленькой полосы (модуля). Поскольку Planet не требует фиксированной высоты полосы, библиотека автоматически вычисляет подходящую высоту, что упрощает код. + +### Шаг 2: Создать штрих‑код RM4SCC с явной высотой + +RM4SCC — другая почтовая символьная система, часто требующая конкретной высоты полосы для совместимости со сканерами. Ниже показано, как задать эту высоту вручную. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Почему вы задаёте высоту** – Некоторые почтовые сканеры ожидают минимальную высоту полосы. Установив `BarHeight.Pixels = 100`, вы гарантируете, что сгенерированное изображение удовлетворяет этим требованиям. X‑размер остаётся одинаковым с штрих‑кодом Planet, чтобы оба изображения имели одинаковую визуальную плотность. + +### Шаг 3: Проверить результат + +После запуска программы откройте два PNG‑файла, находящиеся в `YOUR_DIRECTORY`. Вы должны увидеть два разных штрих‑кода: + +* `PostalPlanetBarHeightNone.png` – штрих‑код Planet с автоматически рассчитанной высотой. +* `PostalRM4SCCBarHeight100Pixels.png` – штрих‑код RM4SCC с высотой 100 пикселей. + +Оба изображения можно напрямую отправлять на принтеры этикеток или отображать в веб‑приложении. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Текст альтернативы изображения:* **Сгенерированный почтовый штрих‑код** с помощью Aspose.BarCode (демонстрирует, как генерировать почтовый штрих‑код). + +## Как генерировать штрих‑код с пользовательскими размерами (расширенный) + +Если необходимо точно настроить другие параметры — такие как отступы, расположение текста или цвет — Aspose.BarCode предоставляет богатый объект `Parameters`. Ниже быстрый пример, который добавляет белый фон и отключает читаемый человеком текст. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Когда использовать это** – Отключение читаемого человеком текста часто применяется в автоматической сортировке, где важен только машинно‑читаемый шаблон. Установка цвета фона гарантирует корректную печать штрих‑кода на прозрачных носителях. + +## Распространённые ошибки и профессиональные советы + +| Проблема | Почему происходит | Решение | +|----------|-------------------|---------| +| Штрих‑код выглядит растянутым | X‑размер слишком велик относительно размера изображения | Держите `XDimension.Pixels` в диапазоне от 2 до 5 для большинства почтовых штрих‑кодов | +| Сканер отклоняет изображение | Высота полосы ниже минимального требования почтовой службы | Используйте `BarHeight.Pixels` ≥ 80 для RM4SCC, если спецификация не указывает иначе | +| Размер PNG‑файла большой | Разрешение изображения выше необходимого | Сохраняйте как PNG‑8 (`BarCodeImageFormat.Png8`) или уменьшайте пиксельные размеры | + +**Профессиональный совет:** Всегда проверяйте сгенерированный штрих‑код на реальном сканере перед выпуском в продакшн. Небольшие визуальные различия могут влиять на читаемость. + +## Полный исходный код + +Скопируйте весь блок ниже в новое консольное приложение (`Program.cs`). При необходимости измените пути вывода на папку, в которую ваш процесс имеет право записи. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Запуск программы выводит *“Barcodes generated successfully.”* и создаёт два PNG‑файла в рабочем каталоге исполняемого файла. + +## Заключение + +Теперь вы знаете, как **генерировать почтовый штрих‑код** в C# с помощью Aspose.BarCode, охватывая как штрих‑коды Planet с автоматической высотой, так и штрих‑коды RM4SCC с фиксированной высотой. Руководство также показало, **как генерировать штрих‑код** с пользовательским X‑размером, высотой полосы и визуальными параметрами, предоставляя надёжную основу для любого проекта автоматизации рассылки. + +Дальнейшие шаги, которые вы можете изучить: + +* Интегрировать сгенерированные PNG‑файлы в PDF‑счёт с помощью Aspose.PDF. +* Переключить формат вывода на SVG для масштабируемой векторной графики. +* Использовать класс `BarcodeReader` для программной проверки закодированных данных. + +Не стесняйтесь экспериментировать с различными символьными системами (например, `EncodeTypes.Postnet`) и делиться результатами с сообществом. Приятного кодинга! + +## Что вам стоит изучить дальше? + +Следующие учебные материалы охватывают тесно связанные темы, расширяющие техники, продемонстрированные в этом руководстве. Каждый ресурс включает полностью работающие примеры кода с пошаговыми объяснениями, чтобы помочь вам освоить дополнительные возможности API и исследовать альтернативные подходы в собственных проектах. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/spanish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..6a4f260b4 --- /dev/null +++ b/barcode/spanish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,252 @@ +--- +category: general +date: 2026-08-19 +description: El tutorial del generador de códigos de barras en C# muestra cómo generar + códigos de barras DataBar Expanded Stacked, personalizar el tamaño del código de + barras y configurar filas y columnas. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: es +lastmod: 2026-08-19 +og_description: El tutorial del generador de códigos de barras en C# te enseña cómo + generar códigos de barras DataBar, personalizar el tamaño y configurar filas y columnas + para una salida precisa. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Generador de códigos de barras en C# – guía paso a paso para códigos de + barras DataBar personalizados +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Generador de códigos de barras C#: crear códigos de barras DataBar personalizados' +url: /es/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Generador de códigos de barras C#: crear códigos DataBar personalizados + +Si necesitas un **c# barcode generator** que pueda producir símbolos DataBar Expanded Stacked, esta guía te muestra exactamente cómo generar imágenes de códigos de barras con filas y columnas personalizadas. Aprenderás a configurar los parámetros databar, ajustar el tamaño del código de barras y guardar el resultado como archivos PNG. + +Generar códigos de barras programáticamente elimina los pasos de diseño manual y garantiza una salida consistente en todas las plataformas. En este tutorial aprenderás a: + +* Instalar y referenciar la biblioteca Aspose.BarCode for .NET (o cualquier paquete compatible). +* Crear un generador de códigos de barras para la simbología DataBar Expanded Stacked. +* **How to generate barcode** imágenes con configuraciones específicas de columnas y filas. +* **Customize barcode size** controlando filas y columnas de DataBar. +* **Configure databar parameters** como texto, formato y calidad de imagen. + +## Requisitos previos + +* .NET 6.0 SDK o posterior instalado. +* Un entorno de desarrollo C# (Visual Studio, VS Code, Rider, etc.). +* Paquete NuGet `Aspose.BarCode` (o una biblioteca equivalente que proporcione `BarcodeGenerator`, `EncodeTypes` y `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Uso del generador de códigos de barras C# para crear códigos DataBar + +Las siguientes secciones te guiarán paso a paso. El enfoque principal está en la API del **c# barcode generator**, pero el mismo patrón se aplica a otras bibliotecas de códigos de barras que expongan propiedades similares. + +### Paso 1: Inicializar el generador de códigos de barras con texto de ejemplo + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*¿Por qué este paso?* +`BarcodeGenerator` es el punto de entrada para todas las tareas de creación de códigos de barras. Proporcionar el enum `EncodeTypes.DatabarExpandedStacked` indica a la biblioteca qué simbología usar, mientras que el argumento de texto se convierte en el valor legible por humanos codificado en el símbolo. + +### Paso 2: Establecer el número de columnas (se usan filas predeterminadas) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*¿Por qué este paso?* +Los símbolos DataBar Expanded Stacked consisten en elementos lineales apilados. Ajustar la propiedad `Columns` cambia la densidad horizontal, permitiéndote acomodar cadenas de datos más largas sin aumentar la altura total. Esto personaliza directamente **personaliza el tamaño del código de barras**. + +### Paso 3: Guardar la imagen del código de barras que usa cuatro columnas + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Lo que ves:* +La imagen guardada `DatabarCols4.png` muestra un código de barras DataBar que es más ancho que el predeterminado porque contiene cuatro columnas. Puedes abrir el archivo en cualquier visor de imágenes para verificar el resultado. + +### Paso 4: Re‑inicializar el generador para una nueva configuración + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*¿Por qué re‑inicializar?* +Cambiar la propiedad `Rows` mientras se mantiene la configuración de columnas anterior podría producir una combinación inesperada. Comenzar con una nueva instancia garantiza que solo el parámetro deseado (`Rows`) influya en la siguiente imagen. + +### Paso 5: Establecer el número de filas (se usan columnas predeterminadas) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*¿Por qué este paso?* +La propiedad `Rows` controla el apilamiento vertical. Incrementar las filas hace que el código de barras sea más alto, lo que puede ser útil cuando el espacio es limitado horizontalmente pero abundante verticalmente. Esta es otra forma de **personalizar el tamaño del código de barras**. + +### Paso 6: Guardar la imagen del código de barras que usa tres filas + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Resultado:* +`DatabarRows3.png` muestra un código de barras más alto con tres filas apiladas, demostrando cómo **configure databar parameters** afecta la apariencia visual. + +## Ejemplo completo ejecutable + +A continuación se muestra un programa completo que puedes copiar, pegar y ejecutar. Incluye todas las importaciones, manejo de errores y comentarios para mayor claridad. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Salida esperada** + +Ejecutar el programa genera dos archivos PNG: + +* `DatabarCols4.png` – un código de barras DataBar ancho con cuatro columnas. +* `DatabarRows3.png` – un código de barras DataBar alto con tres filas. + +Abre las imágenes para confirmar que las dimensiones del código de barras coinciden con los parámetros configurados. + +## Preguntas frecuentes y manejo de casos límite + +| Question | Answer | +|----------|--------| +| *¿Qué pasa si necesito filas personalizadas **y** columnas?* | Establece `Rows` **and** `Columns` en la misma instancia de `BarcodeGenerator` antes de llamar a `Save`. La biblioteca combina ambos valores para producir una cuadrícula del tamaño solicitado. | +| *¿Puedo cambiar el formato de imagen?* | Sí. Reemplaza `BarCodeImageFormat.Png` por `Jpeg`, `Bmp` o `Gif` según tu flujo de trabajo. | +| *¿Qué ocurre cuando el texto es más largo de lo que el símbolo puede contener?* | El generador lanza una `ArgumentException`. Acorta el texto o incrementa `Columns`/`Rows` para proporcionar mayor capacidad. | +| *¿Hay alguna forma de establecer DPI o resolución de imagen?* | Utiliza `generator.Parameters.ImageResolution` para especificar el DPI deseado antes de guardar. Esto personaliza aún más **el tamaño del código de barras** para impresión de alta resolución. | +| *¿La biblioteca admite otras variantes de DataBar?* | Sí. Reemplaza `EncodeTypes.DatabarExpandedStacked` por `DatabarExpanded`, `DatabarLimited`, etc., manteniendo la misma estructura de parámetros. | + +## Consejos para una generación fiable de códigos de barras + +* **Pro tip:** Siempre verifica la imagen generada con un escáner o una aplicación móvil antes de implementarla en producción. +* **Watch out for:** Directorios de salida nulos o vacíos—`Save` lanzará una excepción si la ruta no existe. Crea la carpeta programáticamente si es necesario. +* **Performance note:** Reutilizar una única instancia de `BarcodeGenerator` y solo cambiar `Rows` o `Columns` puede reducir la sobrecarga de creación de objetos al generar muchos códigos de barras en un bucle. + +## Conclusión + +Ahora sabes cómo usar un **c# barcode generator** para **create databar barcode** imágenes, **customize barcode size**, y **configure databar parameters** como filas y columnas. Ajustando estas configuraciones puedes adaptar los códigos de barras a cualquier requisito de diseño manteniendo la fiabilidad del escaneo. + +A continuación, explora temas relacionados como **how to generate barcode** PDFs, incrustar códigos de barras en informes, o cambiar a otras simbologías (QR, Code‑128, etc.). Experimenta con diferentes `Rows`, `Columns` y resoluciones de imagen para encontrar la configuración óptima para tu caso de uso específico. + +--- + +## ¿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 funciones adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/spanish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..5db50dd66 --- /dev/null +++ b/barcode/spanish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: Aprende a generar un archivo PNG de código de barras en C# y a ajustar + su altura, cubriendo cómo crear imágenes de códigos de barras y cambiar la altura + del código de barras fácilmente. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: es +lastmod: 2026-08-19 +og_description: Crea un archivo PNG de código de barras en C# y aprende a generar + imágenes de códigos de barras, ajustar la altura del código de barras y cambiarla + para obtener escaneos óptimos. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Crear un archivo PNG de código de barras en C# – guía paso a paso +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Cómo crear un archivo PNG de código de barras con altura ajustable en C# +url: /es/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cómo crear un archivo PNG de código de barras con altura ajustable en C# + +Si necesitas crear un **archivo PNG de código de barras** en C#, esta guía te muestra exactamente cómo. Verás un ejemplo completo y ejecutable que demuestra **cómo generar códigos de barras** e **ajustar la altura del código de barras** para diferentes casos de uso. + +Generar un archivo PNG de código de barras es un requisito común para sistemas de inventario, terminales punto de venta y cualquier aplicación que deba imprimir o mostrar datos legibles por máquina. Al final de este tutorial podrás cambiar la altura del código de barras, guardar varios archivos PNG y comprender el impacto de la altura en la fiabilidad del escaneo. + +## Requisitos previos + +* SDK .NET 6.0 o posterior instalado +* Visual Studio 2022 (o cualquier IDE que soporte .NET) +* El paquete NuGet **Aspose.BarCode for .NET** (el ejemplo de código usa esta biblioteca) + +Puedes agregar el paquete desde la línea de comandos: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Consejo profesional:** La versión de evaluación gratuita de Aspose.BarCode funciona para desarrollo y pruebas. Para producción, obtén una clave con licencia. + +## Instalar la biblioteca de códigos de barras + +El primer paso es referenciar la biblioteca en tu proyecto. Agrega las siguientes directivas `using` al inicio de tu archivo C#: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Estos espacios de nombres te dan acceso a `BarcodeGenerator`, `EncodeTypes` y `BarCodeImageFormat`. + +## Crear el archivo PNG de código de barras + +Ahora creamos una instancia de `BarcodeGenerator` que generará un **archivo PNG de código de barras**. El ejemplo usa la simbología Databar OmniDirectional, pero puedes reemplazar `EncodeTypes.DatabarOmniDirectional` por cualquier tipo compatible. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +La cadena `"(01)12345678901231"` sigue el formato de Identificador de Aplicación GS1 para un GTIN de 14 dígitos. Ajusta los datos para que coincidan con los identificadores de tus productos. + +## Establecer la dimensión X (opcional) + +La dimensión X define el ancho de un solo módulo del código de barras. Un valor basado en píxeles te brinda un control preciso sobre el tamaño de la imagen. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Un valor de `2` píxeles funciona bien para la mayoría de pantallas. Auméntalo si necesitas un código de barras más grande al imprimir. + +## Ajustar la altura del código de barras y guardar el archivo PNG + +La propiedad **BarHeight** controla el tamaño vertical de las barras. Cambiar este valor te permite **ajustar la altura del código de barras** sin afectar los datos codificados. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +El archivo `DatabarBarHeight30Pixels.png` es ahora un **archivo PNG de código de barras** de 30 píxeles de alto. + +Para **cambiar la altura del código de barras** y crear una segunda imagen, simplemente asigna un nuevo valor y llama a `Save` nuevamente: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Ahora tienes dos archivos PNG—uno de 30 px y otro de 60 px—que demuestran cómo **ajustar la altura del código de barras** sobre la marcha. + +### Por qué la altura de la barra es importante + +* **Legibilidad:** Los escáneres esperan una altura mínima para una detección fiable. Un código de barras demasiado corto puede pasar desapercibido, especialmente en cámaras de baja resolución. +* **Estética:** Igualar la altura del código de barras con los elementos de diseño circundantes crea una UI más limpia. +* **Restricciones de impresión:** Algunas impresoras de etiquetas tienen ranuras de altura fija; ajustar la altura del código de barras asegura que encaje. + +**Mejor práctica:** Mantén la altura como múltiplo de la dimensión X (p.ej., 30 px cuando la dimensión X es 2 px) para mantener la proporción y evitar distorsiones. + +## Ejemplo completo + +A continuación se muestra el programa completo y autónomo que puedes pegar en una aplicación de consola y ejecutar de inmediato. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Salida esperada** + +Ejecutar el programa crea dos archivos en el directorio de trabajo del ejecutable: + +* `DatabarBarHeight30Pixels.png` – un archivo PNG de código de barras de 30 píxeles de alto +* `DatabarBarHeight60Pixels.png` – un archivo PNG de código de barras de 60 píxeles de alto + +Abre cualquiera de los PNG con cualquier visor de imágenes; verás un código de barras Databar OmniDirectional claro listo para escanear. + +## Casos límite y solución de problemas + +| Situación | Qué verificar | Solución recomendada | +|-----------|---------------|----------------------| +| El código de barras aparece borroso | Dimensión X demasiado baja para la altura elegida | Aumentar `XDimension.Pixels` (p.ej., de 2 a 3) | +| El escáner falla con un código de barras de baja altura | Altura por debajo del mínimo del escáner | Establecer `BarHeight.Pixels` al menos en 30 px (o según especificaciones del escáner) | +| El archivo PNG está vacío o corrupto | Ruta de salida inválida o permiso de escritura denegado | Usar una ruta absoluta o asegurarse de que la aplicación tenga acceso de escritura | +| Necesito una simbología diferente | `EncodeTypes` actual no es adecuada | Reemplazar `EncodeTypes.DatabarOmniDirectional` por otro valor del enum (p.ej., `EncodeTypes.Code128`) | + +## Preguntas frecuentes + +**P: ¿Puedo generar otros formatos de imagen (JPEG, BMP)?** +R: Sí. Reemplaza `BarCodeImageFormat.Png` por `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, etc. + +**P: ¿Cómo incrusto el PNG en una página web?** +R: Sirve el PNG generado a través de un endpoint HTTP o conviértelo a una cadena Base64 y colócalo en el atributo `src` de una etiqueta ``. + +**P: ¿Hay una forma de establecer el color de fondo?** +R: Usa `generator.Parameters.Image.BackgroundColor = Color.White;` (o cualquier `System.Drawing.Color`). + +## Conclusión + +Ahora sabes cómo **generar un archivo PNG de código de barras** en C# y **ajustar la altura del código de barras** con precisión para cumplir con los requisitos de escaneo o diseño. Cambiando la propiedad `BarHeight.Pixels` puedes **cambiar la altura del código de barras** sobre la marcha y producir múltiples recursos PNG desde una única base de código. + +A continuación, explora otras opciones de personalización como el color de primer plano, los márgenes y la adición de texto legible por humanos. También puedes experimentar con diferentes simbologías (`EncodeTypes.Code128`, `EncodeTypes.QR`) para ampliar el rango de datos que puedes codificar. + +¡Feliz codificación, y que tus códigos de barras siempre se lean en el primer intento! + +## ¿Qué deberías aprender a continuación? + +Los siguientes tutoriales cubren temas estrechamente relacionados que se basan en 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 funciones adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [Cómo generar y ajustar la altura del código de barras para Databar unidimensional usando Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Cómo generar códigos de barras - Tipos de códigos de barras unidimensionales](/barcode/english/net/one-dimensional-barcode-types/) +- [Cómo generar un código de barras Aztec con relación de aspecto personalizada usando 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/spanish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/spanish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..76f9ec73c --- /dev/null +++ b/barcode/spanish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Cree archivos PNG de databar en C# con Aspose.BarCode. Aprenda a generar + imágenes databar, configurar los parámetros de databar y guardar la salida PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: es +lastmod: 2026-08-19 +og_description: Crea archivos PNG de databar en C# usando Aspose.BarCode. Este tutorial + te guía paso a paso sobre cómo generar imágenes databar, configurar parámetros de + databar como la dimensión X y la relación de aspecto, y guardar archivos PNG de + alta calidad para impresión o uso web. +og_image_alt: create databar PNG example +og_title: Crear imágenes PNG de databar en C# – guía paso a paso +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Cómo crear imágenes PNG de databar con C# y Aspose.BarCode +url: /es/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cómo crear imágenes PNG de databar con C# y Aspose.BarCode + +Si necesitas **crear archivos PNG de databar** en una aplicación .NET, esta guía te muestra exactamente cómo hacerlo. Verás un ejemplo completo y ejecutable que genera códigos DataBar omnidireccionales apilados, configura parámetros clave y guarda dos archivos PNG con diferentes relaciones de aspecto. + +Generar una imagen DataBar no consiste solo en llamar a un único método. También debes **configurar los parámetros del databar** como la dimensión X (ancho del módulo) y la relación de aspecto para cumplir con las especificaciones de impresión o escaneo. Al final de este tutorial comprenderás **cómo generar gráficos databar** que funcionen de manera fiable en escenarios del mundo real. + +## Prerrequisitos + +- .NET 6.0 o posterior (el código también funciona con .NET Framework 4.7+) +- Visual Studio 2022 o cualquier IDE compatible con C# +- Una licencia válida de **Aspose.BarCode for .NET** (la evaluación gratuita sirve para pruebas) +- Familiaridad básica con la sintaxis de C# + +> **Consejo profesional:** Si aún no tienes una licencia, puedes solicitar una clave de evaluación temporal desde el portal de Aspose. La API se comporta de la misma forma; solo cambia la marca de agua. + +## Paso 1: Instalar el paquete NuGet Aspose.BarCode + +Abre tu proyecto en Visual Studio, haz clic con el botón derecho en la solución y selecciona **Manage NuGet Packages**. Busca `Aspose.BarCode` e instala la versión estable más reciente. + +```bash +dotnet add package Aspose.BarCode +``` + +Este comando agrega el ensamblado `Aspose.BarCode` a tu proyecto y pone a disposición la clase `BarcodeGenerator`. + +## Paso 2: Inicializar el generador de códigos de barras para un DataBar omnidireccional apilado + +El constructor de `BarcodeGenerator` recibe dos argumentos: el tipo de código de barras y la cadena de datos sin formato. Para un DataBar omnidireccional apilado utilizas `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Por qué es importante:** La constante `EncodeTypes.DatabarStackedOmniDirectional` indica a la biblioteca que produzca un código de barras que pueda leerse desde cualquier orientación, lo cual es ideal para etiquetas de estanterías en retail. + +## Paso 3: Configurar la dimensión X (ancho del módulo) en píxeles + +La dimensión X controla el tamaño del elemento de barra más pequeño. Configurarla en píxeles te brinda un control preciso sobre el tamaño final de la imagen. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Un valor de **2 píxeles** es un buen equilibrio entre legibilidad y compacidad para la mayoría de impresoras de etiquetas. Ajusta este valor si necesitas módulos más grandes o más pequeños. + +## Paso 4: Establecer la primera relación de aspecto y guardar el PNG + +La relación de aspecto influye en la altura del DataBar apilado. Una relación de aspecto de **15** produce un código de barras relativamente corto, mientras que **30** lo hace más alto. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +El método `Save` escribe el código de barras generado en un archivo PNG. PNG es sin pérdida, lo que preserva los bordes nítidos requeridos por los escáneres de códigos de barras. + +## Paso 5: Cambiar la relación de aspecto y guardar un segundo PNG + +Puedes reutilizar la misma instancia de `BarcodeGenerator` para producir variaciones simplemente cambiando la relación de aspecto. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Ahora tienes dos archivos PNG —`DatabarAspectRatio15.png` y `DatabarAspectRatio30.png`— cada uno con una densidad visual diferente. + +## Paso 6: Verificar la salida + +Abre los archivos PNG generados en cualquier visor de imágenes. Deberías ver un código de barras DataBar limpio y de alto contraste. Escanear las imágenes con una aplicación de escáner de códigos de barras en el smartphone confirma que ambas relaciones de aspecto decodifican el valor GTIN original `12345678901231`. + +![create databar PNG example](databar_example.png) + +*La imagen anterior muestra los dos archivos PNG uno al lado del otro. La imagen de la izquierda usa la relación de aspecto 15, la de la derecha usa la relación de aspecto 30.* + +## Variaciones comunes y casos límite + +| Escenario | Qué cambiar | Razón | +|----------|----------------|--------| +| **Datos diferentes** | Reemplaza la cadena `(01)12345678901231` por cualquier Identificador de Aplicación GS1 válido y sus datos | Permite codificar IDs de producto, números de serie, etc. | +| **Resolución mayor** | Incrementa `XDimension.Pixels` a 3 o 4 | Necesario cuando el código de barras se imprimirá en tamaños grandes o se escaneará desde distancia. | +| **Otros tipos de DataBar** | Usa `EncodeTypes.DatabarStacked` o `EncodeTypes.DatabarExpanded` | Elige el tipo que mejor se adapte al diseño de tu etiqueta. | +| **Fondo transparente** | Pasa `BarCodeImageFormat.Png` con `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Útil para superponer el código de barras sobre etiquetas de colores. | + +> **Cuidado con:** Configurar una dimensión X demasiado pequeña (< 1 pixel) puede producir un código de barras que se vea borroso después + +## ¿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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/spanish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..12dcc88ef --- /dev/null +++ b/barcode/spanish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Aprende a generar códigos de barras postales en C# usando Aspere.BarCode. + Esta guía paso a paso muestra cómo generar códigos de barras para los formatos Planet + y RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: es +lastmod: 2026-08-19 +og_description: Genera códigos de barras postales en C# con Aspose.BarCode. Sigue + esta guía para aprender cómo generar códigos de barras para Planet y RM4SCC con + dimensiones personalizadas. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Generar código de barras postal en C# – guía completa de Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Cómo generar código de barras postal en C# con Aspose.BarCode +url: /es/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cómo generar códigos de barras postales en C# con Aspose.BarCode + +Si necesitas **generar códigos de barras postales** para aplicaciones de envío, esta guía te muestra exactamente cómo generar el código de barras usando la biblioteca Aspose.BarCode. Verás un ejemplo completo y ejecutable que crea tanto un código de barras Planet (altura calculada automáticamente) como un código de barras RM4SCC con una altura de barra explícita. + +Generar códigos de barras postales es un requisito común para software de logística, impresoras de etiquetas automáticas y sistemas de envío masivo. Al final de este tutorial podrás integrar la generación de códigos de barras en cualquier proyecto .NET, personalizar la dimensión X y controlar la altura de la barra cuando el formato estándar lo permite. + +**Lo que aprenderás** + +* Cómo configurar Aspose.BarCode en un proyecto C#. +* Cómo generar códigos de barras postales Planet y RM4SCC. +* Cómo ajustar la dimensión X (ancho del módulo) y la altura de la barra. +* Cómo guardar el resultado como una imagen PNG. + +No se requieren servicios externos: todo se ejecuta localmente después de referenciar el paquete NuGet Aspose.BarCode. + +## Requisitos previos + +* SDK de .NET 6.0 o posterior (el código también funciona con .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code o cualquier IDE de C# que prefieras. +* Paquete Aspose.BarCode para .NET – instálalo vía NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generar código de barras postal con Aspose.BarCode + +Las siguientes secciones te guían paso a paso, desde la creación de los objetos generadores hasta el guardado de los archivos PNG finales. + +### Paso 1: Crear un código de barras Planet (altura automática) + +Planet es un código de barras postal usado en muchos países para la clasificación del correo. Cuando creas un código de barras Planet, la biblioteca determina automáticamente la altura óptima de la barra basada en los datos codificados. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Por qué funciona** – `EncodeTypes.Planet` indica a Aspose.BarCode que use la simbología Planet. La propiedad `XDimension` controla el ancho de la barra más pequeña (el módulo). Como Planet no requiere una altura de barra fija, la biblioteca calcula una altura adecuada automáticamente, lo que simplifica el código. + +### Paso 2: Crear un código de barras RM4SCC con altura explícita + +RM4SCC es otra simbología postal que a menudo requiere una altura de barra específica para la compatibilidad con escáneres. El siguiente código muestra cómo establecer esa altura manualmente. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Por qué estableces la altura** – Algunos escáneres postales esperan una altura mínima de barra. Al asignar `BarHeight.Pixels = 100`, garantizas que la imagen generada cumpla con esos requisitos. La dimensión X permanece consistente con el código de barras Planet para que ambas imágenes compartan la misma densidad visual. + +### Paso 3: Verificar la salida + +Después de ejecutar el programa, abre los dos archivos PNG ubicados en `YOUR_DIRECTORY`. Deberías ver dos códigos de barras distintos: + +* `PostalPlanetBarHeightNone.png` – un código de barras Planet con altura calculada automáticamente. +* `PostalRM4SCCBarHeight100Pixels.png` – un código de barras RM4SCC con una altura de barra de 100 píxeles. + +Ambas imágenes pueden enviarse directamente a impresoras de etiquetas o mostrarse en una aplicación web. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Texto alternativo de la imagen:* **Imagen generada de código de barras postal** usando Aspose.BarCode (demuestra cómo generar un código de barras postal). + +## Cómo generar códigos de barras con dimensiones personalizadas (avanzado) + +Si necesitas afinar otros parámetros —como márgenes, ubicación del texto o color— Aspose.BarCode ofrece un rico objeto `Parameters`. A continuación, un ejemplo rápido que agrega un fondo blanco y desactiva el texto legible por humanos. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Cuándo usar esto** – Desactivar el texto legible por humanos es común en la clasificación automatizada donde solo importa el patrón legible por máquinas. Establecer un color de fondo asegura que el código de barras se imprima correctamente sobre medios transparentes. + +## Problemas comunes y consejos profesionales + +| Problema | Por qué ocurre | Solución | +|----------|----------------|----------| +| El código de barras aparece estirado | La dimensión X es demasiado grande respecto al tamaño de la imagen | Mantén `XDimension.Pixels` entre 2 y 5 para la mayoría de los códigos postales | +| El escáner rechaza la imagen | La altura de la barra está por debajo del mínimo requerido por el servicio postal | Usa `BarHeight.Pixels` ≥ 80 para RM4SCC a menos que la especificación indique lo contrario | +| El tamaño del archivo PNG es grande | La resolución de la imagen es mayor de lo necesario | Guarda como PNG‑8 (`BarCodeImageFormat.Png8`) o reduce las dimensiones en píxeles | + +**Consejo profesional:** Siempre prueba el código de barras generado con un escáner real antes de desplegarlo en producción. Pequeñas diferencias visuales pueden afectar la legibilidad. + +## Código fuente completo + +Copia todo el bloque a continuación en una nueva aplicación de consola (`Program.cs`). Ajusta las rutas de salida a una carpeta en la que tu proceso pueda escribir. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Ejecutar el programa muestra *“Barcodes generated successfully.”* y crea los dos archivos PNG en el directorio de trabajo del ejecutable. + +## Conclusión + +Ahora sabes cómo **generar códigos de barras postales** en C# con Aspose.BarCode, cubriendo tanto códigos Planet de altura automática como códigos RM4SCC de altura fija. La guía también mostró **cómo generar códigos de barras** con dimensión X personalizada, altura de barra y opciones visuales, proporcionando una base sólida para cualquier proyecto de automatización de envíos. + +Próximos pasos que podrías explorar: + +* Integrar los PNG generados en una factura PDF usando Aspose.PDF. +* Cambiar el formato de salida a SVG para gráficos vectoriales escalables. +* Usar la clase `BarcodeReader` para verificar los datos codificados programáticamente. + +¡Siéntete libre de experimentar con diferentes simbologías (p. ej., `EncodeTypes.Postnet`) y compartir tus resultados con la comunidad! ¡Feliz codificación! + +## ¿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. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/swedish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..fd4ab4eb8 --- /dev/null +++ b/barcode/swedish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,249 @@ +--- +category: general +date: 2026-08-19 +description: C#-barcodegeneratorhandledning visar hur man genererar DataBar Expanded + Stacked-streckkoder, anpassar streckkodens storlek och konfigurerar rader och kolumner. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: sv +lastmod: 2026-08-19 +og_description: C#-barcodegeneratorhandledning lär dig hur du genererar DataBar-streckkoder, + anpassar storlek och konfigurerar rader och kolumner för exakt resultat. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C#-streckkodsgenerator – steg‑för‑steg guide för anpassade DataBar-streckkoder +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C#-streckkodsgenerator: skapa anpassade DataBar-streckkoder' +url: /sv/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# streckkodsgenerator: skapa anpassade DataBar-streckkoder + +Om du behöver en **c# barcode generator** som kan producera DataBar Expanded Stacked‑symboler, visar den här guiden exakt hur du genererar streckkods‑bilder med anpassade rader och kolumner. Du kommer att lära dig att konfigurera databar‑parametrar, justera streckkodsstorlek och spara resultatet som PNG‑filer. + +Att generera streckkoder programatiskt tar bort manuella designsteg och garanterar konsekvent resultat över plattformar. I den här handledningen kommer du att: + +* Installera och referera Aspose.BarCode för .NET‑biblioteket (eller ett kompatibelt paket). +* Skapa en streckkodsgenerator för DataBar Expanded Stacked‑symbologi. +* **How to generate barcode** bilder med specifika kolumn‑ och radinställningar. +* **Customize barcode size** genom att kontrollera DataBar‑rader och -kolumner. +* **Configure databar parameters** såsom text, format och bildkvalitet. + +## Förutsättningar + +* .NET 6.0 SDK eller senare installerat. +* En C#‑utvecklingsmiljö (Visual Studio, VS Code, Rider, etc.). +* NuGet‑paketet `Aspose.BarCode` (eller ett motsvarande bibliotek som tillhandahåller `BarcodeGenerator`, `EncodeTypes` och `BarCodeImageFormat`). + +Add the package with the .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Använda C# streckkodsgenerator för att skapa DataBar‑streckkoder + +Följande avsnitt guidar dig genom varje steg. Huvudfokus ligger på **c# barcode generator**‑API:et, men samma mönster gäller för andra streckkodsbibliotek som exponerar liknande egenskaper. + +### Steg 1: Initiera streckkodsgeneratorn med exempeltext + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Varför detta steg?* +`BarcodeGenerator` är ingångspunkten för alla streckkodsskapande‑uppgifter. Genom att ange enum‑värdet `EncodeTypes.DatabarExpandedStacked` talar du om för biblioteket vilken symbologi som ska användas, medan textargumentet blir det mänskligt läsbara värdet som kodas i symbolen. + +### Steg 2: Ställ in antalet kolumner (standardrader används) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Varför detta steg?* +DataBar Expanded Stacked‑symboler består av staplade linjära element. Genom att justera egenskapen `Columns` ändras den horisontella densiteten, vilket gör att du kan passa längre datasträngar utan att öka den totala höjden. Detta anpassar direkt **customizes barcode size**. + +### Steg 3: Spara streckkodsbilden som använder fyra kolumner + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Vad du ser:* +Den sparade bilden `DatabarCols4.png` visar en DataBar‑streckkod som är bredare än standard eftersom den innehåller fyra kolumner. Du kan öppna filen i valfri bildvisare för att verifiera resultatet. + +### Steg 4: Åter‑initiera generatorn för en ny konfiguration + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Varför åter‑initiera?* +Att ändra egenskapen `Rows` samtidigt som den tidigare kolumninställningen behålls kan leda till en oväntad kombination. Genom att börja med en ny instans säkerställer du att endast den avsedda parametern (`Rows`) påverkar nästa bild. + +### Steg 5: Ställ in antalet rader (standardkolumner används) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Varför detta steg?* +Egenskapen `Rows` styr vertikal stapling. Att öka antalet rader gör streckkoden högre, vilket kan vara användbart när horisontellt utrymme är begränsat men vertikalt finns gott om plats. Detta är ett annat sätt att **customize barcode size**. + +### Steg 6: Spara streckkodsbilden som använder tre rader + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Resultat:* +`DatabarRows3.png` visar en högre streckkod med tre staplade rader, vilket demonstrerar hur **configure databar parameters** påverkar det visuella utseendet. + +## Fullt körbart exempel + +Nedan finns ett komplett program som du kan kopiera, klistra in och köra. Det innehåller alla importeringar, felhantering och kommentarer för tydlighet. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Förväntat resultat** + +Kör programmet så skapas två PNG‑filer: + +* `DatabarCols4.png` – en bred DataBar‑streckkod med fyra kolumner. +* `DatabarRows3.png` – en hög DataBar‑streckkod med tre rader. + +Öppna bilderna för att bekräfta att streckkodens dimensioner matchar de konfigurerade parametrarna. + +## Vanliga frågor och hantering av kantfall + +| Question | Answer | +|----------|--------| +| *Vad händer om jag behöver både anpassade rader **och** kolumner?* | Ange `Rows` **och** `Columns` på samma `BarcodeGenerator`‑instans innan du anropar `Save`. Biblioteket kombinerar båda värdena för att skapa ett rutnät med den begärda storleken. | +| *Kan jag ändra bildformatet?* | Ja. Ersätt `BarCodeImageFormat.Png` med `Jpeg`, `Bmp` eller `Gif` för att passa ditt arbetsflöde. | +| *Vad händer när texten är längre än vad symbolen kan rymma?* | Generatorn kastar ett `ArgumentException`. Förkorta texten eller öka `Columns`/`Rows` för att ge mer kapacitet. | +| *Finns det ett sätt att ange DPI eller bildupplösning?* | Använd `generator.Parameters.ImageResolution` för att ange önskad DPI innan du sparar. Detta anpassar ytterligare **customizes barcode size** för högupplöst utskrift. | +| *Stöder biblioteket andra DataBar‑varianter?* | Ja. Ersätt `EncodeTypes.DatabarExpandedStacked` med `DatabarExpanded`, `DatabarLimited` osv., samtidigt som du behåller samma parameterstruktur. | + +## Tips för pålitlig streckkodsgenerering + +* **Pro tip:** Verifiera alltid den genererade bilden med en scanner eller en mobilapp innan du distribuerar den i produktion. +* **Watch out for:** Null‑ eller tomma utdatamappar—`Save` kastar ett undantag om sökvägen inte finns. Skapa mappen programatiskt om det behövs. +* **Performance note:** Återanvändning av en enda `BarcodeGenerator`‑instans och endast ändring av `Rows` eller `Columns` kan minska objekt‑skapande‑kostnaden när många streckkoder genereras i en loop. + +## Slutsats + +Du vet nu hur du använder en **c# barcode generator** för att **create databar barcode**‑bilder, **customize barcode size** och **configure databar parameters** såsom rader och kolumner. Genom att justera dessa inställningar kan du anpassa streckkoder till alla layoutkrav samtidigt som du upprätthåller skanningspålitlighet. + +Nästa steg är att utforska relaterade ämnen som **how to generate barcode**‑PDF:er, inbäddning av streckkoder i rapporter eller byte till andra symbologier (QR, Code‑128 osv.). Experimentera med olika `Rows`, `Columns` och bildupplösningar för att hitta den optimala konfigurationen för ditt specifika användningsområde. + +--- + +## Vad bör du lära dig härnäst? + +Följande handledningar 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/swedish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..70e07ae00 --- /dev/null +++ b/barcode/swedish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,220 @@ +--- +category: general +date: 2026-08-19 +description: Lär dig hur du genererar en streckkod‑PNG‑fil i C# och justerar dess + höjd, med fokus på hur du skapar streckkodsbilder och enkelt ändrar streckkodens + höjd. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: sv +lastmod: 2026-08-19 +og_description: Skapa en streckkod‑PNG‑fil i C# och lär dig hur du genererar streckkods­bilder, + justerar streckkodshöjden och ändrar streckkodshöjden för optimal skanning. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Skapa en streckkod PNG-fil i C# – steg‑för‑steg guide +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Hur man skapar en streckkod PNG‑fil med justerbar höjd i C# +url: /sv/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Så skapar du en streckkod PNG-fil med justerbar höjd i C# + +Om du behöver skapa en **barcode PNG file** i C#, visar den här guiden exakt hur du gör. Du får se ett komplett, körbart exempel som demonstrerar **how to generate barcode**‑bilder och hur du **adjust barcode height** för olika användningsfall. + +Att generera en streckkod PNG‑fil är ett vanligt krav för lagerhanteringssystem, kassasystem och alla applikationer som måste skriva ut eller visa maskinläsbara data. När du är klar med den här tutorialen kan du ändra streckkodens höjd, spara flera PNG‑filer och förstå hur höjden påverkar skanningspålitligheten. + +## Förutsättningar + +Innan du börjar, se till att du har: + +* .NET 6.0 SDK eller senare installerat +* Visual Studio 2022 (eller någon IDE som stödjer .NET) +* **Aspose.BarCode for .NET** NuGet‑paketet (kodexemplet använder detta bibliotek) + +Du kan lägga till paketet från kommandoraden: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro tip:** Den fria utvärderingsversionen av Aspose.BarCode fungerar för utveckling och testning. För produktion, skaffa en licensnyckel. + +## Installera streckkodsbiblioteket + +Det första steget är att referera biblioteket i ditt projekt. Lägg till följande `using`‑direktiv högst upp i din C#‑fil: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Dessa namnrymder ger dig åtkomst till `BarcodeGenerator`, `EncodeTypes` och `BarCodeImageFormat`. + +## Skapa streckkod PNG‑filen + +Nu skapar vi en `BarcodeGenerator`‑instans som kommer att producera en **barcode PNG file**. Exemplet använder Databar OmniDirectional‑symbologi, men du kan ersätta `EncodeTypes.DatabarOmniDirectional` med vilken stödjande typ som helst. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Strängen `"(01)12345678901231"` följer GS1 Application Identifier‑formatet för ett 14‑siffrigt GTIN. Anpassa datan så att den matchar dina egna produktidentifierare. + +## Ställ in X‑dimension (valfritt) + +X‑dimensionen definierar bredden på en enskild streckkodmodul. Ett pixel‑baserat värde ger dig exakt kontroll över bildstorleken. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Ett värde på `2` pixlar fungerar bra för de flesta skärmar. Öka det om du behöver en större streckkod vid utskrift. + +## Justera streckkodshöjd och spara streckkod PNG‑filen + +`BarHeight`‑egenskapen styr den vertikala storleken på staplarna. Genom att ändra detta värde kan du **adjust barcode height** utan att påverka den kodade datan. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +Filen `DatabarBarHeight30Pixels.png` är nu en **barcode PNG file** som är 30 pixlar hög. + +För att **change barcode height** och skapa en andra bild, tilldela helt enkelt ett nytt värde och anropa `Save` igen: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Du har nu två PNG‑filer—en på 30 px och en på 60 px—som demonstrerar hur du **adjust barcode height** i farten. + +### Varför stapelhöjden är viktig + +* **Readability:** Skannrar förväntar sig en minsta höjd för pålitlig detektering. En för kort streckkod kan missas, särskilt med lågupplösta kameror. +* **Aesthetics:** Att matcha streckkodshöjden med omgivande designelement ger ett renare UI. +* **Print constraints:** Vissa etikettskrivare har fasta höjdluckor; genom att justera streckkodshöjden säkerställer du att den får plats. + +**Best practice:** Håll höjden som en multipel av X‑dimensionen (t.ex. 30 px när X‑dimensionen är 2 px) för att behålla proportionerna och undvika distortion. + +## Komplett exempel + +Nedan är det fullständiga, självständiga programmet som du kan klistra in i en konsolapplikation och köra direkt. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Förväntad output** + +När programmet körs skapas två filer i den körbara filens arbetskatalog: + +* `DatabarBarHeight30Pixels.png` – en 30‑pixel‑hög streckkod PNG‑fil +* `DatabarBarHeight60Pixels.png` – en 60‑pixel‑hög streckkod PNG‑fil + +Öppna någon av PNG‑filerna med en bildvisare; du kommer att se en tydlig Databar OmniDirectional‑streckkod redo för skanning. + +## Edge cases and troubleshooting + +| Situation | What to check | Recommended fix | +|-----------|---------------|-----------------| +| Barcode appears blurry | X‑dimension too low for chosen height | Increase `XDimension.Pixels` (e.g., from 2 to 3) | +| Scanner fails on low‑height barcode | Height below scanner’s minimum | Set `BarHeight.Pixels` to at least 30 px (or per scanner specs) | +| PNG file is empty or corrupted | Output path invalid or write permission denied | Use an absolute path or ensure the app has write access | +| Need a different symbology | Current `EncodeTypes` not suitable | Replace `EncodeTypes.DatabarOmniDirectional` with another enum value (e.g., `EncodeTypes.Code128`) | + +## Vanliga frågor + +**Q: Kan jag generera andra bildformat (JPEG, BMP)?** +A: Ja. Ersätt `BarCodeImageFormat.Png` med `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` osv. + +**Q: Hur bäddar jag in PNG‑filen i en webbsida?** +A: Servera den genererade PNG‑filen via en HTTP‑endpoint eller konvertera den till en Base64‑sträng och placera den i ett ``‑tags `src`‑attribut. + +**Q: Finns det ett sätt att sätta bakgrundsfärgen?** +A: Använd `generator.Parameters.Image.BackgroundColor = Color.White;` (eller någon `System.Drawing.Color`). + +## Slutsats + +Du vet nu hur du **generate a barcode PNG file** i C# och exakt **adjust barcode height** för att möta skannings‑ eller designkrav. Genom att ändra `BarHeight.Pixels`‑egenskapen kan du **change barcode height** i farten och producera flera PNG‑tillgångar från en enda kodbas. + +Nästa steg är att utforska andra anpassningsalternativ såsom förgrundsfärg, marginaler och att lägga till mänskligt läsbar text. Du kan också experimentera med olika symbologier (`EncodeTypes.Code128`, `EncodeTypes.QR`) för att bredda det datautbud du kan koda. + +Lycka till med kodningen, och må dina streckkoder alltid skannas på första försöket! + +## Vad bör du lära dig härnäst? + +De följande tutorialerna behandlar närliggande ämnen som bygger vidare på teknikerna som demonstrerats 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/swedish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..892e526ae --- /dev/null +++ b/barcode/swedish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Skapa databar‑PNG‑filer i C# med Aspose.BarCode. Lär dig hur du genererar + databar‑bilder, konfigurerar databar‑parametrar och sparar PNG‑utdata. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: sv +lastmod: 2026-08-19 +og_description: Skapa databar PNG-filer i C# med Aspose.BarCode. Denna handledning + guidar dig genom hur du genererar databar‑bilder, konfigurerar databar‑parametrar + såsom X‑dimension och bildförhållande, och sparar högkvalitativa PNG-filer för utskrift + eller webbbruk. +og_image_alt: create databar PNG example +og_title: Skapa databar PNG‑bilder i C# – steg‑för‑steg‑guide +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Hur man skapar databar PNG-bilder med C# och Aspose.BarCode +url: /sv/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hur man skapar databar PNG‑bilder med C# och Aspose.BarCode + +Om du behöver **skapa databar PNG**‑filer i en .NET‑applikation visar den här guiden exakt hur du gör. Du får se ett komplett, körbart exempel som genererar staplade omnidirektionella DataBar‑koder, konfigurerar nyckelparametrar och sparar två PNG‑filer med olika bildförhållanden. + +Att generera en DataBar‑bild handlar inte bara om att anropa en enda metod. Du måste också **konfigurera databar‑parametrar** som X‑dimension (modulbredd) och bildförhållandet för att uppfylla utskrifts‑ eller skanningsspecifikationer. I slutet av den här handledningen förstår du **hur man genererar databar**‑grafik som fungerar pålitligt i verkliga scenarier. + +## Förutsättningar + +- .NET 6.0 eller senare (koden fungerar även med .NET Framework 4.7+) +- Visual Studio 2022 eller någon C#‑kompatibel IDE +- En giltig licens för **Aspose.BarCode for .NET** (den fria utvärderingsversionen fungerar för test) +- Grundläggande kunskap om C#‑syntax + +> **Pro tip:** Om du ännu inte har en licens kan du begära en tillfällig utvärderingsnyckel från Aspose‑portalen. API‑et beter sig likadant; endast vattenstämpeln ändras. + +## Steg 1: Installera Aspose.BarCode‑NuGet‑paketet + +Öppna ditt projekt i Visual Studio, högerklicka på lösningen och välj **Manage NuGet Packages**. Sök efter `Aspose.BarCode` och installera den senaste stabila versionen. + +```bash +dotnet add package Aspose.BarCode +``` + +Detta kommando lägger till `Aspose.BarCode`‑assemblyn i ditt projekt och gör klassen `BarcodeGenerator` tillgänglig. + +## Steg 2: Initiera streckkodsgeneratorn för en staplad omnidirektionell DataBar + +Konstruktorn för `BarcodeGenerator` tar två argument: streckkodstypen och den råa datasträngen. För en staplad omnidirektionell DataBar använder du `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Varför detta är viktigt:** Konstanten `EncodeTypes.DatabarStackedOmniDirectional` talar om för biblioteket att producera en streckkod som kan läsas från vilken orientering som helst, vilket är idealiskt för hylletiketter i detaljhandeln. + +## Steg 3: Konfigurera X‑dimensionen (modulbredd) i pixlar + +X‑dimensionen styr storleken på det minsta stapel­elementet. Att ange den i pixlar ger dig exakt kontroll över den slutliga bildstorleken. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Ett värde på **2 pixlar** är en bra balans mellan läsbarhet och kompaktitet för de flesta etikett‑skrivare. Justera detta värde om du behöver större eller mindre moduler. + +## Steg 4: Ställ in första bildförhållandet och spara PNG‑filen + +Bildförhållandet påverkar höjden på den staplade DataBar‑koden. Ett bildförhållande på **15** ger en relativt kort streckkod, medan **30** gör den högre. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Metoden `Save` skriver den genererade streckkoden till en PNG‑fil. PNG är förlustfritt, vilket bevarar de skarpa kanterna som behövs för streckkodsläsare. + +## Steg 5: Ändra bildförhållandet och spara en andra PNG‑fil + +Du kan återanvända samma `BarcodeGenerator`‑instans för att skapa variationer genom att helt enkelt ändra bildförhållandet. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Nu har du två PNG‑filer — `DatabarAspectRatio15.png` och `DatabarAspectRatio30.png` — var och en med en annan visuell densitet. + +## Steg 6: Verifiera resultatet + +Öppna de genererade PNG‑filerna i någon bildvisare. Du bör se en ren, högkontrast‑DataBar‑streckkod. Att skanna bilderna med en smartphone‑streckkodsläsare bekräftar att båda bildförhållandena avkodar till det ursprungliga GTIN‑värdet `12345678901231`. + +![exempel på skapad databar PNG](databar_example.png) + +*Bilden ovan visar de två PNG‑filerna sida vid sida. Den vänstra bilden använder bildförhållande 15, den högra använder bildförhållande 30.* + +## Vanliga variationer och kantfall + +| Scenario | Vad som ska ändras | Orsak | +|----------|-------------------|-------| +| **Olika data** | Ersätt strängen `(01)12345678901231` med någon giltig GS1‑applikationsidentifierare och data | Gör det möjligt att koda produkt‑ID:n, serienummer osv. | +| **Högre upplösning** | Öka `XDimension.Pixels` till 3 eller 4 | Krävs när streckkoden ska skrivas ut i stor storlek eller skannas på avstånd. | +| **Andra DataBar‑typer** | Använd `EncodeTypes.DatabarStacked` eller `EncodeTypes.DatabarExpanded` | Välj den typ som bäst passar din etikettlayout. | +| **Transparent bakgrund** | Skicka `BarCodeImageFormat.Png` med `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Användbart för att lägga streckkoden ovanpå färgade etiketter. | + +> **Se upp för:** Att sätta en X‑dimension som är för liten (< 1 pixel) kan leda till en streckkod som blir suddig efter + +## Vad bör du lära dig härnäst? + +De följande handledningarna täcker närbesläktade ämnen som bygger vidare på teknikerna som demonstrerats 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/swedish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..0dfb3415f --- /dev/null +++ b/barcode/swedish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,211 @@ +--- +category: general +date: 2026-08-19 +description: Lär dig hur du genererar poststreckkod i C# med Aspere.BarCode. Denna + steg‑för‑steg‑guide visar hur du genererar streckkod för Planet‑ och RM4SCC‑format. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: sv +lastmod: 2026-08-19 +og_description: Generera poststreckkod i C# med Aspose.BarCode. Följ den här guiden + för att lära dig hur du genererar streckkod för Planet och RM4SCC med anpassade + dimensioner. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Generera poststreckkod i C# – komplett Aspose.BarCode‑guide +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Hur man genererar poststreckkod i C# med Aspose.BarCode +url: /sv/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hur man genererar poststreckkod i C# med Aspose.BarCode + +Om du behöver **generera poststreckkod** för postapplikationer visar den här guiden exakt hur du skapar streckkod med Aspose.BarCode‑biblioteket. Du får ett komplett, körbart exempel som skapar både en Planet‑streckkod (höjden beräknas automatiskt) och en RM4SCC‑streckkod med en explicit stapelhöjd. + +Att generera poststreckkod är ett vanligt krav för logistikprogram, automatiska etikett‑skrivare och massutskickssystem. I slutet av den här handledningen kan du integrera streckkodsgenerering i vilket .NET‑projekt som helst, anpassa X‑dimensionen och styra stapelhöjden när standardformatet tillåter det. + +**Vad du kommer att lära dig** + +* Hur du sätter upp Aspose.BarCode i ett C#‑projekt. +* Hur du genererar Planet‑ och RM4SCC‑poststreckkoder. +* Hur du justerar X‑dimensionen (modulbredd) och stapelhöjden. +* Hur du sparar resultatet som en PNG‑bild. + +Inga externa tjänster krävs – allt körs lokalt efter att du har refererat Aspose.BarCode‑NuGet‑paketet. + +## Förutsättningar + +* .NET 6.0 SDK eller senare (koden fungerar även med .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code eller någon annan C#‑IDE du föredrar. +* Aspose.BarCode for .NET‑paket – installera det via NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Generera poststreckkod med Aspose.BarCode + +Följande avsnitt guidar dig genom varje steg, från att skapa generatorobjekten till att spara de slutgiltiga PNG‑filerna. + +### Steg 1: Skapa en Planet‑streckkod (automatisk höjd) + +Planet är en poststreckkod som används i många länder för postsortering. När du skapar en Planet‑streckkod bestämmer biblioteket automatiskt den optimala stapelhöjden baserat på den kodade datan. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Varför detta fungerar** – `EncodeTypes.Planet` talar om för Aspose.BarCode att använda Planet‑symbologi. `XDimension`‑egenskapen styr bredden på den minsta stapeln (modulen). Eftersom Planet inte kräver en fast stapelhöjd beräknar biblioteket en lämplig höjd automatiskt, vilket förenklar koden. + +### Steg 2: Skapa en RM4SCC‑streckkod med explicit höjd + +RM4SCC är en annan post‑symbologi som ofta kräver en specifik stapelhöjd för scanner‑kompatibilitet. Följande kod visar hur du ställer in den höjden manuellt. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Varför du anger höjden** – Vissa post‑scanners förväntar sig en minsta stapelhöjd. Genom att tilldela `BarHeight.Pixels = 100` garanterar du att den genererade bilden uppfyller dessa krav. X‑dimensionen förblir konsekvent med Planet‑streckkoden så att båda bilderna har samma visuella densitet. + +### Steg 3: Verifiera resultatet + +Efter att du har kört programmet, öppna de två PNG‑filerna i `YOUR_DIRECTORY`. Du bör se två distinkta streckkoder: + +* `PostalPlanetBarHeightNone.png` – en Planet‑streckkod med automatiskt beräknad höjd. +* `PostalRM4SCCBarHeight100Pixels.png` – en RM4SCC‑streckkod med 100‑pixel stapelhöjd. + +Båda bilderna kan matas direkt in i etikett‑skrivare eller visas i en webbapplikation. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*Bildtext:* **Genererad poststreckkod** bild med Aspose.BarCode (visar hur man genererar poststreckkod). + +## Hur man genererar streckkod med anpassade dimensioner (avancerat) + +Om du behöver finjustera andra parametrar – såsom marginaler, textplacering eller färg – erbjuder Aspose.BarCode ett rikt `Parameters`‑objekt. Nedan är ett snabbt exempel som lägger till en vit bakgrund och inaktiverar den mänskligt läsbara texten. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**När du använder detta** – Att inaktivera den mänskligt läsbara texten är vanligt för automatiserad sortering där endast maskinläsbart mönster är relevant. Att sätta en bakgrundsfärg säkerställer att streckkoden skrivs korrekt på transparent media. + +## Vanliga fallgropar och pro‑tips + +| Problem | Varför det händer | Lösning | +|---------|-------------------|---------| +| Streckkoden ser utdragen ut | X‑dimensionen är för stor i förhållande till bildstorleken | Håll `XDimension.Pixels` mellan 2 och 5 för de flesta poststreckkoder | +| Scanner avvisar bilden | Stapelhöjden är under det minimum som posttjänsten kräver | Använd `BarHeight.Pixels` ≥ 80 för RM4SCC om inte specifikationen anger annat | +| PNG‑filen är stor | Bildens upplösning är högre än nödvändigt | Spara som PNG‑8 (`BarCodeImageFormat.Png8`) eller minska pixel‑dimensionerna | + +**Pro‑tips:** Testa alltid den genererade streckkoden med en riktig scanner innan du går i produktion. Små visuella skillnader kan påverka läsbarheten. + +## Fullständig källkod + +Kopiera hela blocket nedan till ett nytt konsolprogram (`Program.cs`). Anpassa utgångssökvägarna till en mapp som ditt program har skrivbehörighet till. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +När du kör programmet skrivs *“Barcodes generated successfully.”* och de två PNG‑filerna skapas i programmets arbetskatalog. + +## Slutsats + +Du vet nu hur du **genererar poststreckkod** i C# med Aspose.BarCode, både för automatiskt höjd‑Planet‑streckkoder och fasta‑höjd‑RM4SCC‑streckkoder. Guiden visade också **hur man genererar streckkod** med anpassad X‑dimension, stapelhöjd och visuella alternativ, vilket ger en solid grund för alla post‑automatiseringsprojekt. + +Nästa steg du kan utforska: + +* Integrera de genererade PNG‑filerna i en PDF‑faktura med Aspose.PDF. +* Byt ut utdataformatet till SVG för skalbara vektorgrafik. +* Använd `BarcodeReader`‑klassen för att programatiskt verifiera den kodade datan. + +Känn dig fri att experimentera med olika symbologier (t.ex. `EncodeTypes.Postnet`) och dela dina resultat med communityn. Lycka till med kodningen! + +## 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 demonstrerats 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. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/thai/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..090d3fff8 --- /dev/null +++ b/barcode/thai/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,250 @@ +--- +category: general +date: 2026-08-19 +description: บทเรียนการสร้างบาร์โค้ดด้วย C# แสดงวิธีสร้างบาร์โค้ด DataBar Expanded + Stacked ปรับขนาดบาร์โค้ด และกำหนดแถวและคอลัมน์ +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: th +lastmod: 2026-08-19 +og_description: บทเรียนการสร้างบาร์โค้ดด้วย C# สอนวิธีสร้างบาร์โค้ด DataBar ปรับขนาดตามต้องการ + และกำหนดแถวและคอลัมน์เพื่อผลลัพธ์ที่แม่นยำ +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: ตัวสร้างบาร์โค้ด C# – คู่มือขั้นตอนต่อขั้นตอนสำหรับบาร์โค้ด DataBar แบบกำหนดเอง +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'ตัวสร้างบาร์โค้ด C#: สร้างบาร์โค้ด DataBar แบบกำหนดเอง' +url: /th/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# ตัวสร้างบาร์โค้ด C#: สร้างบาร์โค้ด DataBar แบบกำหนดเอง + +หากคุณต้องการ **c# barcode generator** ที่สามารถสร้างสัญลักษณ์ DataBar Expanded Stacked ได้ คู่มือนี้จะแสดงให้คุณเห็นอย่างละเอียดว่า如何สร้างภาพบาร์โค้ดด้วยแถวและคอลัมน์ที่กำหนดเอง คุณจะได้เรียนรู้การกำหนดค่าพารามิเตอร์ databar, ปรับขนาดบาร์โค้ด, และบันทึกผลลัพธ์เป็นไฟล์ PNG + +การสร้างบาร์โค้ดโดยโปรแกรมช่วยขจัดขั้นตอนการออกแบบด้วยมือและรับประกันผลลัพธ์ที่สม่ำเสมอข้ามแพลตฟอร์ม ในบทเรียนนี้คุณจะได้ทำ: + +* ติดตั้งและอ้างอิงไลบรารี Aspose.BarCode for .NET (หรือแพคเกจที่เข้ากันได้) +* สร้างตัวสร้างบาร์โค้ดสำหรับสัญลักษณ์ DataBar Expanded Stacked +* **วิธีการสร้างภาพบาร์โค้ด** ด้วยการตั้งค่าคอลัมน์และแถวเฉพาะ +* **ปรับขนาดบาร์โค้ด** โดยควบคุมแถวและคอลัมน์ของ DataBar +* **กำหนดค่าพารามิเตอร์ databar** เช่น ข้อความ, รูปแบบ, และคุณภาพภาพ + +## Prerequisites + +* .NET 6.0 SDK หรือรุ่นที่ใหม่กว่า +* สภาพแวดล้อมการพัฒนา C# (Visual Studio, VS Code, Rider ฯลฯ) +* แพคเกจ NuGet `Aspose.BarCode` (หรือไลบรารีที่เทียบเท่าที่ให้ `BarcodeGenerator`, `EncodeTypes`, และ `BarCodeImageFormat`) + +เพิ่มแพคเกจด้วย .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Using the C# barcode generator to create DataBar barcodes + +ส่วนต่อไปนี้จะพาคุณผ่านแต่ละขั้นตอน จุดเน้นหลักอยู่ที่ API **c# barcode generator** แต่รูปแบบเดียวกันสามารถใช้กับไลบรารีบาร์โค้ดอื่นที่มีคุณสมบัติคล้ายกันได้ + +### Step 1: Initialise the barcode generator with sample text + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*ทำไมต้องทำขั้นตอนนี้?* +`BarcodeGenerator` เป็นจุดเริ่มต้นสำหรับงานสร้างบาร์โค้ดทั้งหมด การระบุ enum `EncodeTypes.DatabarExpandedStacked` บอกไลบรารีว่าจะใช้สัญลักษณ์ประเภทใด ส่วนอาร์กิวเมนต์ข้อความจะกลายเป็นค่าที่มนุษย์อ่านได้ที่ถูกเข้ารหัสในสัญลักษณ์ + +### Step 2: Set the number of columns (default rows are used) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*ทำไมต้องทำขั้นตอนนี้?* +สัญลักษณ์ DataBar Expanded Stacked ประกอบด้วยองค์ประกอบเชิงเส้นที่ซ้อนกัน การปรับคุณสมบัติ `Columns` จะเปลี่ยนความหนาแน่นในแนวนอน ทำให้คุณสามารถใส่ข้อมูลยาวขึ้นโดยไม่ต้องเพิ่มความสูงโดยรวม ซึ่งเป็นการ **customize barcode size** โดยตรง + +### Step 3: Save the barcode image that uses four columns + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*สิ่งที่คุณเห็น:* +ภาพที่บันทึกไว้ `DatabarCols4.png` แสดงบาร์โค้ด DataBar ที่กว้างกว่าค่าปริยาย เนื่องจากมีสี่คอลัมน์ คุณสามารถเปิดไฟล์ด้วยโปรแกรมดูภาพใดก็ได้เพื่อยืนยันผลลัพธ์ + +### Step 4: Re‑initialise the generator for a new configuration + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*ทำไมต้องเริ่มใหม่?* +การเปลี่ยนค่า `Rows` ขณะยังคงใช้การตั้งค่าคอลัมน์เดิมอาจทำให้เกิดการผสมค่าที่ไม่คาดคิด การเริ่มต้นอินสแตนซ์ใหม่ทำให้มั่นใจว่าเฉพาะพารามิเตอร์ที่ตั้งใจ (`Rows`) เท่านั้นที่ส่งผลต่อภาพถัดไป + +### Step 5: Set the number of rows (default columns are used) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*ทำไมต้องทำขั้นตอนนี้?* +คุณสมบัติ `Rows` ควบคุมการซ้อนในแนวตั้ง การเพิ่มจำนวนแถวทำให้บาร์โค้ดสูงขึ้น ซึ่งเป็นประโยชน์เมื่อพื้นที่แนวนอนจำกัดแต่มีพื้นที่แนวตั้งเพียงพอ นี่เป็นอีกวิธีหนึ่งในการ **customize barcode size** + +### Step 6: Save the barcode image that uses three rows + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*ผลลัพธ์:* +`DatabarRows3.png` แสดงบาร์โค้ดที่สูงขึ้นด้วยสามแถวซ้อนกัน แสดงให้เห็นว่า **configure databar parameters** มีผลต่อรูปลักษณ์อย่างไร + +## Full runnable example + +ด้านล่างเป็นโปรแกรมเต็มที่คุณสามารถคัดลอก, วาง, และรันได้ รวมการนำเข้า, การจัดการข้อผิดพลาด, และคอมเมนต์เพื่อความชัดเจน + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**ผลลัพธ์ที่คาดหวัง** + +เมื่อรันโปรแกรมจะสร้างไฟล์ PNG สองไฟล์: + +* `DatabarCols4.png` – บาร์โค้ด DataBar กว้างที่มีสี่คอลัมน์ +* `DatabarRows3.png` – บาร์โค้ด DataBar สูงที่มีสามแถว + +เปิดภาพเพื่อยืนยันว่าขนาดบาร์โค้ดตรงกับพารามิเตอร์ที่กำหนด + +## Common questions and edge‑case handling + +| Question | Answer | +|----------|--------| +| *What if I need both custom rows **and** columns?* | ตั้งค่า `Rows` **และ** `Columns` บนอินสแตนซ์ `BarcodeGenerator` เดียวก่อนเรียก `Save` ไลบรารีจะรวมค่าทั้งสองเพื่อสร้างกริดขนาดที่ต้องการ | +| *Can I change the image format?* | ได้ สามารถแทนที่ `BarCodeImageFormat.Png` ด้วย `Jpeg`, `Bmp`, หรือ `Gif` ตามกระบวนการทำงานของคุณ | +| *What happens when the text is longer than the symbol can hold?* | ตัวสร้างจะโยน `ArgumentException` ให้สั้นข้อความหรือเพิ่ม `Columns`/`Rows` เพื่อเพิ่มความจุ | +| *Is there a way to set DPI or image resolution?* | ใช้ `generator.Parameters.ImageResolution` เพื่อระบุ DPI ที่ต้องการก่อนบันทึก ซึ่งช่วย **customize barcode size** สำหรับการพิมพ์ความละเอียดสูง | +| *Does the library support other DataBar variants?* | มี สามารถเปลี่ยน `EncodeTypes.DatabarExpandedStacked` เป็น `DatabarExpanded`, `DatabarLimited` ฯลฯ โดยคงโครงสร้างพารามิเตอร์เดิม | + +## Tips for reliable barcode generation + +* **Pro tip:** ตรวจสอบภาพที่สร้างด้วยสแกนเนอร์หรือแอปมือถือก่อนนำไปใช้งานจริงเสมอ | +* **Watch out for:** โฟลเดอร์ปลายทางเป็น null หรือว่างเปล่า — `Save` จะโยนข้อยกเว้นหากพาธไม่มีอยู่ สร้างโฟลเดอร์โดยโปรแกรมหากจำเป็น | +* **Performance note:** การใช้อินสแตนซ์ `BarcodeGenerator` เพียงอันเดียวและเปลี่ยนเฉพาะ `Rows` หรือ `Columns` สามารถลดภาระการสร้างอ็อบเจ็กต์เมื่อต้องสร้างบาร์โค้ดหลาย ๆ ตัวในลูป | + +## Conclusion + +ตอนนี้คุณรู้วิธีใช้ **c# barcode generator** เพื่อ **สร้างภาพบาร์โค้ด databar**, **ปรับขนาดบาร์โค้ด**, และ **กำหนดค่าพารามิเตอร์ databar** เช่น แถวและคอลัมน์ ด้วยการปรับตั้งค่าเหล่านี้คุณสามารถทำให้บาร์โค้ดพอดีกับข้อกำหนดการจัดวางใด ๆ ในขณะเดียวกันยังคงความน่าเชื่อถือในการสแกน + +ต่อไปให้สำรวจหัวข้อที่เกี่ยวข้องเช่น **วิธีการสร้างบาร์โค้ด** ในรูปแบบ PDF, การฝังบาร์โค้ดในรายงาน, หรือการเปลี่ยนไปใช้สัญลักษณ์อื่น (QR, Code‑128 ฯลฯ) ทดลองเปลี่ยนค่า `Rows`, `Columns`, และความละเอียดภาพเพื่อหาการกำหนดค่าที่เหมาะสมที่สุดสำหรับกรณีการใช้งานของคุณ + +--- + + +## 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 and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/thai/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..3875bc15e --- /dev/null +++ b/barcode/thai/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,218 @@ +--- +category: general +date: 2026-08-19 +description: เรียนรู้วิธีสร้างไฟล์ PNG ของบาร์โค้ดด้วย C# และปรับความสูงของมัน รวมถึงวิธีสร้างภาพบาร์โค้ดและเปลี่ยนความสูงของบาร์โค้ดได้อย่างง่ายดาย. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: th +lastmod: 2026-08-19 +og_description: สร้างไฟล์ PNG ของบาร์โค้ดใน C# และเรียนรู้วิธีสร้างภาพบาร์โค้ด ปรับความสูงของบาร์โค้ด + และเปลี่ยนความสูงของบาร์โค้ดเพื่อการสแกนที่เหมาะสมที่สุด +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: สร้างไฟล์ PNG ของบาร์โค้ดใน C# – คู่มือแบบขั้นตอนโดยละเอียด +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: วิธีสร้างไฟล์ PNG ของบาร์โค้ดที่สามารถปรับความสูงได้ใน C# +url: /th/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# วิธีสร้างไฟล์ PNG ของบาร์โค้ดที่สามารถปรับความสูงได้ใน C# + +หากคุณต้องการสร้าง **ไฟล์ PNG ของบาร์โค้ด** ใน C# คู่มือนี้จะแสดงให้คุณเห็นอย่างละเอียด คุณจะได้เห็นตัวอย่างที่สมบูรณ์และสามารถรันได้ซึ่งสาธิต **วิธีสร้างภาพบาร์โค้ด** และ **วิธีปรับความสูงของบาร์โค้ด** สำหรับกรณีการใช้งานที่แตกต่างกัน + +การสร้างไฟล์ PNG ของบาร์โค้ดเป็นความต้องการทั่วไปสำหรับระบบสินค้าคงคลัง, จุดขาย, และแอปพลิเคชันใด ๆ ที่ต้องพิมพ์หรือแสดงข้อมูลที่เครื่องอ่านได้ เมื่อจบบทเรียนนี้คุณจะสามารถเปลี่ยนความสูงของบาร์โค้ด, บันทึกไฟล์ PNG หลายไฟล์, และเข้าใจผลกระทบของความสูงต่อความน่าเชื่อถือของการสแกน + +## ข้อกำหนดเบื้องต้น + +ก่อนเริ่มทำงาน โปรดตรวจสอบว่าคุณมี: + +* .NET 6.0 SDK หรือรุ่นใหม่กว่าที่ติดตั้งแล้ว +* Visual Studio 2022 (หรือ IDE ใด ๆ ที่รองรับ .NET) +* แพ็กเกจ **Aspose.BarCode for .NET** จาก NuGet (ตัวอย่างโค้ดใช้ไลบรารีนี้) + +คุณสามารถเพิ่มแพ็กเกจจากบรรทัดคำสั่ง: + +```bash +dotnet add package Aspose.BarCode +``` + +> **เคล็ดลับ:** เวอร์ชันทดลองฟรีของ Aspose.BarCode ใช้ได้สำหรับการพัฒนาและทดสอบ สำหรับการใช้งานจริงให้ขอรับคีย์ลิขสิทธิ์ + +## ติดตั้งไลบรารีบาร์โค้ด + +ขั้นตอนแรกคือการอ้างอิงไลบรารีในโปรเจกต์ของคุณ เพิ่มคำสั่ง `using` ต่อไปนี้ที่ส่วนบนของไฟล์ C# ของคุณ: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +เนมสเปซเหล่านี้ทำให้คุณเข้าถึง `BarcodeGenerator`, `EncodeTypes`, และ `BarCodeImageFormat` + +## สร้างไฟล์ PNG ของบาร์โค้ด + +ตอนนี้เราจะสร้างอ็อบเจกต์ `BarcodeGenerator` ที่จะส่งออก **ไฟล์ PNG ของบาร์โค้ด** ตัวอย่างใช้สัญลักษณ์ Databar OmniDirectional แต่คุณสามารถเปลี่ยน `EncodeTypes.DatabarOmniDirectional` เป็นชนิดที่รองรับอื่นได้ + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +สตริง `"(01)12345678901231"` เป็นรูปแบบ GS1 Application Identifier สำหรับ GTIN 14 หลัก ปรับข้อมูลให้ตรงกับตัวระบุสินค้าของคุณเอง + +## ตั้งค่า X‑dimension (ไม่บังคับ) + +X‑dimension กำหนดความกว้างของโมดูลบาร์โค้ดหนึ่งหน่วย ค่าที่เป็นพิกเซลให้การควบคุมขนาดภาพได้อย่างแม่นยำ + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +ค่าที่ `2` พิกเซลทำงานได้ดีสำหรับการแสดงบนหน้าจอส่วนใหญ่ หากต้องการบาร์โค้ดที่ใหญ่ขึ้นเมื่อพิมพ์ให้เพิ่มค่า + +## ปรับความสูงของบาร์โค้ดและบันทึกไฟล์ PNG + +คุณสมบัติ **BarHeight** ควบคุมขนาดแนวตั้งของบาร์ การเปลี่ยนค่าดังกล่าวทำให้คุณ **ปรับความสูงของบาร์โค้ด** ได้โดยไม่กระทบข้อมูลที่เข้ารหัส + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +ไฟล์ `DatabarBarHeight30Pixels.png` ตอนนี้เป็น **ไฟล์ PNG ของบาร์โค้ด** ที่สูง 30 พิกเซล + +เพื่อ **เปลี่ยนความสูงของบาร์โค้ด** และสร้างภาพที่สอง เพียงกำหนดค่าใหม่แล้วเรียก `Save` อีกครั้ง: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +คุณจะมีไฟล์ PNG สองไฟล์ — หนึ่งไฟล์ที่ 30 px และอีกไฟล์ที่ 60 px — แสดงให้เห็นวิธี **ปรับความสูงของบาร์โค้ด** อย่างรวดเร็ว + +### ทำไมความสูงของบาร์จึงสำคัญ + +* **ความอ่านได้:** เครื่องสแกนคาดหวังความสูงขั้นต่ำเพื่อการตรวจจับที่เชื่อถือได้ บาร์โค้ดสั้นเกินไปอาจพลาดได้ โดยเฉพาะกับกล้องความละเอียดต่ำ +* **ความสวยงาม:** การทำให้ความสูงของบาร์โค้ดสอดคล้องกับองค์ประกอบการออกแบบรอบข้างทำให้ UI ดูเรียบร้อยขึ้น +* **ข้อจำกัดการพิมพ์:** เครื่องพิมพ์ฉลากบางรุ่นมีช่องความสูงคงที่ การปรับความสูงของบาร์โค้ดช่วยให้พอดีกับช่องนั้น + +**แนวทางปฏิบัติที่ดีที่สุด:** ให้ความสูงเป็นหลายเท่าของ X‑dimension (เช่น 30 px เมื่อ X‑dimension เป็น 2 px) เพื่อรักษาสัดส่วนและหลีกเลี่ยงการบิดเบือน + +## ตัวอย่างเต็ม + +ด้านล่างเป็นโปรแกรมเต็มรูปแบบที่คุณสามารถคัดลอกไปวางในแอปพลิเคชันคอนโซลและรันได้ทันที + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**ผลลัพธ์ที่คาดหวัง** + +เมื่อรันโปรแกรมจะสร้างไฟล์สองไฟล์ในไดเรกทอรีทำงานของไฟล์ executable: + +* `DatabarBarHeight30Pixels.png` – ไฟล์ PNG ของบาร์โค้ดที่สูง 30 พิกเซล +* `DatabarBarHeight60Pixels.png` – ไฟล์ PNG ของบาร์โค้ดที่สูง 60 พิกเซล + +เปิดไฟล์ PNG ใดไฟล์หนึ่งด้วยโปรแกรมดูภาพใดก็ได้ คุณจะเห็นบาร์โค้ด Databar OmniDirectional ชัดเจนพร้อมสแกน + +## กรณีขอบและการแก้ไขปัญหา + +| สถานการณ์ | สิ่งที่ต้องตรวจสอบ | วิธีแก้แนะนำ | +|-----------|-------------------|--------------| +| บาร์โค้ดดูเบลอ | X‑dimension ต่ำเกินไปสำหรับความสูงที่เลือก | เพิ่ม `XDimension.Pixels` (เช่น จาก 2 เป็น 3) | +| เครื่องสแกนไม่ทำงานกับบาร์โค้ดความสูงต่ำ | ความสูงต่ำกว่าขั้นต่ำของเครื่องสแกน | ตั้ง `BarHeight.Pixels` อย่างน้อย 30 px (หรือตามสเปคของเครื่องสแกน) | +| ไฟล์ PNG ว่างหรือเสีย | เส้นทางออกไม่ถูกต้องหรือไม่มีสิทธิ์เขียน | ใช้เส้นทางแบบ absolute หรือให้แอปมีสิทธิ์เขียน | +| ต้องการสัญลักษณ์อื่น | `EncodeTypes` ปัจจุบันไม่เหมาะสม | แทนที่ `EncodeTypes.DatabarOmniDirectional` ด้วยค่า enum อื่น (เช่น `EncodeTypes.Code128`) | + +## คำถามที่พบบ่อย + +**Q: ฉันสามารถสร้างรูปแบบภาพอื่นได้หรือไม่ (JPEG, BMP)?** +A: ได้ เพียงเปลี่ยน `BarCodeImageFormat.Png` เป็น `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` เป็นต้น + +**Q: ฉันจะฝัง PNG ลงในหน้าเว็บได้อย่างไร?** +A: ให้ให้บริการ PNG ที่สร้างขึ้นผ่าน endpoint HTTP หรือแปลงเป็นสตริง Base64 แล้วใส่ลงในแอตทริบิวต์ `src` ของแท็ก `` + +**Q: มีวิธีตั้งค่าสีพื้นหลังหรือไม่?** +A: ใช้ `generator.Parameters.Image.BackgroundColor = Color.White;` (หรือ `System.Drawing.Color` ใดก็ได้) + +## สรุป + +คุณได้เรียนรู้วิธี **สร้างไฟล์ PNG ของบาร์โค้ด** ใน C# และ **ปรับความสูงของบาร์โค้ด** อย่างแม่นยำเพื่อให้ตรงกับความต้องการด้านการสแกนหรือการออกแบบ โดยการเปลี่ยนคุณสมบัติ `BarHeight.Pixels` คุณสามารถ **เปลี่ยนความสูงของบาร์โค้ด** ได้ทันทีและสร้างไฟล์ PNG หลายไฟล์จากโค้ดเดียว + +ต่อไปลองสำรวจตัวเลือกการปรับแต่งอื่น ๆ เช่น สีพื้นหน้า, ระยะขอบ, และการเพิ่มข้อความที่อ่านได้โดยมนุษย์ คุณยังสามารถทดลองสัญลักษณ์ต่าง ๆ (`EncodeTypes.Code128`, `EncodeTypes.QR`) เพื่อขยายขอบเขตของข้อมูลที่สามารถเข้ารหัสได้ + +ขอให้เขียนโค้ดอย่างสนุกสนานและบาร์โค้ดของคุณสแกนได้สำเร็จตั้งแต่ครั้งแรก! + +## สิ่งที่คุณควรเรียนต่อไป + +บทแนะนำต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดและต่อยอดจากเทคนิคในคู่มือนี้ ทุกแหล่งข้อมูลมีตัวอย่างโค้ดทำงานเต็มรูปแบบพร้อมคำอธิบายขั้นตอนเพื่อช่วยให้คุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจแนวทางการทำงานอื่น ๆ ในโปรเจกต์ของคุณ + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [How to Generate Barcode - One-Dimensional Barcode Types](/barcode/english/net/one-dimensional-barcode-types/) +- [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/thai/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/thai/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..4f7286a0e --- /dev/null +++ b/barcode/thai/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,156 @@ +--- +category: general +date: 2026-08-19 +description: สร้างไฟล์ PNG ของ databar ใน C# ด้วย Aspose.BarCode เรียนรู้วิธีสร้างภาพ + databar กำหนดค่าพารามิเตอร์ของ databar และบันทึกผลลัพธ์เป็น PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: th +lastmod: 2026-08-19 +og_description: สร้างไฟล์ PNG ของ databar ด้วย C# โดยใช้ Aspose.BarCode บทเรียนนี้จะพาคุณผ่านขั้นตอนการสร้างภาพ + databar, การกำหนดค่าพารามิเตอร์ของ databar เช่น มิติ X และอัตราส่วน, และการบันทึกไฟล์ + PNG คุณภาพสูงสำหรับการพิมพ์หรือใช้บนเว็บ +og_image_alt: create databar PNG example +og_title: สร้างภาพ PNG ของแถบข้อมูลใน C# – คู่มือขั้นตอนโดยละเอียด +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: วิธีสร้างภาพ PNG ของ databar ด้วย C# และ Aspose.BarCode +url: /th/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# วิธีสร้างภาพ PNG ของ DataBar ด้วย C# และ Aspose.BarCode + +หากคุณต้องการ **สร้างไฟล์ PNG ของ databar** ในแอปพลิเคชัน .NET คำแนะนำนี้จะแสดงให้คุณเห็นขั้นตอนอย่างละเอียด คุณจะได้เห็นตัวอย่างที่ทำงานได้เต็มรูปแบบซึ่งสร้างรหัส DataBar แบบ stacked omnidirectional กำหนดค่าพารามิเตอร์สำคัญ และบันทึกไฟล์ PNG สองไฟล์ที่มีอัตราส่วนภาพต่างกัน + +การสร้างภาพ DataBar ไม่ได้เป็นเพียงการเรียกเมธอดเดียวเท่านั้น คุณยังต้อง **กำหนดค่าพารามิเตอร์ของ databar** เช่น X‑dimension (ความกว้างโมดูล) และอัตราส่วนภาพเพื่อให้ตรงตามข้อกำหนดการพิมพ์หรือการสแกน เมื่อจบบทเรียนนี้คุณจะเข้าใจ **วิธีสร้างกราฟิก databar** ที่ทำงานได้อย่างน่าเชื่อถือในสถานการณ์จริง + +## ข้อกำหนดเบื้องต้น + +- .NET 6.0 หรือใหม่กว่า (โค้ดนี้ยังทำงานกับ .NET Framework 4.7+ ด้วย) +- Visual Studio 2022 หรือ IDE ที่รองรับ C# ใด ๆ +- ใบอนุญาตที่ถูกต้องสำหรับ **Aspose.BarCode for .NET** (การประเมินผลแบบฟรีสามารถใช้ทดสอบได้) +- ความคุ้นเคยพื้นฐานกับไวยากรณ์ C# + +> **เคล็ดลับ:** หากคุณยังไม่มีใบอนุญาต คุณสามารถขอคีย์การประเมินผลชั่วคราวจากพอร์ทัลของ Aspose API ทำงานเช่นเดียวกัน; เพียงแต่ลายน้ำจะเปลี่ยนไป + +## ขั้นตอนที่ 1: ติดตั้งแพคเกจ NuGet ของ Aspose.BarCode + +เปิดโปรเจกต์ของคุณใน Visual Studio คลิกขวาที่โซลูชันและเลือก **Manage NuGet Packages** ค้นหา `Aspose.BarCode` แล้วติดตั้งเวอร์ชันเสถียรล่าสุด + +```bash +dotnet add package Aspose.BarCode +``` + +คำสั่งนี้จะเพิ่ม assembly `Aspose.BarCode` ไปยังโปรเจกต์ของคุณและทำให้คลาส `BarcodeGenerator` พร้อมใช้งาน + +## ขั้นตอนที่ 2: เริ่มต้นตัวสร้างบาร์โค้ดสำหรับ DataBar แบบ stacked omnidirectional + +คอนสตรัคเตอร์ `BarcodeGenerator` รับอาร์กิวเมนต์สองค่า: ประเภทบาร์โค้ดและสตริงข้อมูลดิบ สำหรับ DataBar แบบ stacked omnidirectional ให้ใช้ `EncodeTypes.DatabarStackedOmniDirectional` + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**ทำไมจึงสำคัญ:** ค่าคงที่ `EncodeTypes.DatabarStackedOmniDirectional` บอกไลบรารีให้สร้างบาร์โค้ดที่สามารถอ่านได้จากทุกทิศทาง ซึ่งเหมาะอย่างยิ่งสำหรับป้ายชั้นวางสินค้า + +## ขั้นตอนที่ 3: กำหนดค่า X‑dimension (ความกว้างโมดูล) เป็นพิกเซล + +X‑dimension ควบคุมขนาดของบาร์ที่เล็กที่สุด การตั้งค่าเป็นพิกเซลทำให้คุณควบคุมขนาดภาพสุดท้ายได้อย่างแม่นยำ + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +ค่าที่ **2 พิกเซล** เป็นสมดุลที่ดีระหว่างความอ่านง่ายและความกระชับสำหรับเครื่องพิมพ์ป้ายส่วนใหญ่ ปรับค่านี้หากต้องการโมดูลที่ใหญ่หรือเล็กกว่านี้ + +## ขั้นตอนที่ 4: ตั้งค่าอัตราส่วนภาพแรกและบันทึกเป็น PNG + +อัตราส่วนภาพมีผลต่อความสูงของ DataBar แบบ stacked อัตราส่วนภาพ **15** จะให้บาร์โค้ดที่ค่อนข้างสั้น ในขณะที่ **30** จะทำให้บาร์โค้ดสูงขึ้น + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +เมธอด `Save` จะเขียนบาร์โค้ดที่สร้างขึ้นลงในไฟล์ PNG PNG เป็นรูปแบบ lossless ซึ่งรักษาขอบคมที่จำเป็นสำหรับสแกนเนอร์บาร์โค้ด + +## ขั้นตอนที่ 5: เปลี่ยนอัตราส่วนภาพและบันทึก PNG ที่สอง + +คุณสามารถใช้ตัวอย่าง `BarcodeGenerator` เดียวกันเพื่อสร้างรูปแบบที่แตกต่างได้โดยเพียงเปลี่ยนอัตราส่วนภาพ + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +ตอนนี้คุณมีไฟล์ PNG สองไฟล์—`DatabarAspectRatio15.png` และ `DatabarAspectRatio30.png`—แต่ละไฟล์มีความหนาแน่นภาพที่ต่างกัน + +## ขั้นตอนที่ 6: ตรวจสอบผลลัพธ์ + +เปิดไฟล์ PNG ที่สร้างขึ้นในโปรแกรมดูภาพใดก็ได้ คุณควรเห็นบาร์โค้ด DataBar ที่คมชัดและคอนทราสต์สูง การสแกนภาพด้วยแอปสแกนบาร์โค้ดบนสมาร์ทโฟนจะยืนยันว่าอัตราส่วนภาพทั้งสองถอดรหัสได้ค่า GTIN ดั้งเดิม `12345678901231` + +![ตัวอย่างการสร้าง databar PNG](databar_example.png) + +*ภาพด้านบนแสดงไฟล์ PNG สองไฟล์เคียงข้างกัน ภาพซ้ายใช้อัตราส่วนภาพ 15, ภาพขวาใช้อัตราส่วนภาพ 30.* + +## ความแปรผันทั่วไปและกรณีขอบ + +| สถานการณ์ | สิ่งที่ต้องเปลี่ยน | เหตุผล | +|----------|----------------|--------| +| **ข้อมูลต่าง ๆ** | แทนที่สตริง `(01)12345678901231` ด้วย GS1 Application Identifier และข้อมูลที่ถูกต้องใด ๆ | ทำให้คุณสามารถเข้ารหัสรหัสสินค้า, หมายเลขซีเรียล ฯลฯ | +| **ความละเอียดสูงขึ้น** | เพิ่มค่า `XDimension.Pixels` เป็น 3 หรือ 4 | จำเป็นเมื่อบาร์โค้ดจะพิมพ์ขนาดใหญ่หรือสแกนจากระยะไกล | +| **ประเภท DataBar อื่น** | ใช้ `EncodeTypes.DatabarStacked` หรือ `EncodeTypes.DatabarExpanded` | เลือกประเภทที่เหมาะกับการจัดวางป้ายของคุณที่สุด | +| **พื้นหลังโปร่งแสง** | ส่ง `BarCodeImageFormat.Png` พร้อมกับ `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | มีประโยชน์สำหรับการวางบาร์โค้ดบนป้ายสี | + +> **ระวัง:** การตั้งค่า X‑dimension ที่เล็กเกินไป (< 1 pixel) อาจทำให้บาร์โค้ดดูเบลอหลังจาก + +## คุณควรเรียนรู้อะไรต่อไป? + +บทแนะนำต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดและต่อยอดจากเทคนิคที่แสดงในคู่มือนี้ แต่ละแหล่งข้อมูลมีตัวอย่างโค้ดทำงานเต็มรูปแบบพร้อมคำอธิบายทีละขั้นตอน เพื่อช่วยให้คุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจแนวทางการนำไปใช้ทางเลือกในโปรเจกต์ของคุณเอง + +- [วิธีสร้างและปรับความสูงของบาร์โค้ด One-Dimensional Databar ด้วย Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [สร้าง One-Dimensional Databar การเข้ารหัส GS1 ด้วย Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [สร้างบาร์โค้ด Databar ของ Aspose.BarCode ด้วย .NET API – การกำหนดค่าแถวและคอลัมน์](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/thai/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..76c05fb4c --- /dev/null +++ b/barcode/thai/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,210 @@ +--- +category: general +date: 2026-08-19 +description: เรียนรู้วิธีสร้างบาร์โค้ดไปรษณีย์ด้วย C# โดยใช้ Aspere.BarCode คู่มือขั้นตอนนี้แสดงวิธีสร้างบาร์โค้ดสำหรับรูปแบบ + Planet และ RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: th +lastmod: 2026-08-19 +og_description: สร้างบาร์โค้ดไปรษณีย์ใน C# ด้วย Aspose.BarCode. ทำตามคำแนะนำนี้เพื่อเรียนรู้วิธีสร้างบาร์โค้ดสำหรับ + Planet และ RM4SCC ด้วยขนาดที่กำหนดเอง. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: สร้างบาร์โค้ดไปรษณีย์ใน C# – คู่มือ Aspose.BarCode ฉบับสมบูรณ์ +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: วิธีสร้างบาร์โค้ดไปรษณีย์ใน C# ด้วย Aspose.BarCode +url: /th/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# วิธีสร้างรหัสบาร์ไปรษณีย์ใน C# ด้วย Aspose.BarCode + +หากคุณต้องการ **สร้างรหัสบาร์ไปรษณีย์** สำหรับแอปพลิเคชันการส่งจดหมาย คู่มือนี้จะแสดงให้คุณเห็นขั้นตอนการสร้างรหัสบาร์โดยใช้ไลบรารี Aspose.BarCode อย่างละเอียด คุณจะได้เห็นตัวอย่างที่สมบูรณ์และสามารถรันได้ซึ่งสร้างทั้งรหัสบาร์ Planet (ความสูงคำนวณอัตโนมัติ) และรหัสบาร์ RM4SCC พร้อมความสูงที่ระบุอย่างชัดเจน + +การสร้างรหัสบาร์ไปรษณีย์เป็นความต้องการทั่วไปสำหรับซอฟต์แวร์โลจิสติกส์, เครื่องพิมพ์ฉลากอัตโนมัติ, และระบบการส่งจดหมายจำนวนมาก เมื่อจบบทเรียนนี้คุณจะสามารถผสานการสร้างรหัสบาร์เข้าไปในโครงการ .NET ใด ๆ ปรับแต่ง X‑dimension และควบคุมความสูงของบาร์เมื่อรูปแบบมาตรฐานอนุญาต + +**สิ่งที่คุณจะได้เรียนรู้** + +* วิธีตั้งค่า Aspose.BarCode ในโครงการ C# +* วิธีสร้างรหัสบาร์ไปรษณีย์ Planet และ RM4SCC +* วิธีปรับ X‑dimension (ความกว้างโมดูล) และความสูงของบาร์ +* วิธีบันทึกผลลัพธ์เป็นภาพ PNG + +ไม่จำเป็นต้องใช้บริการภายนอก—ทุกอย่างทำงานในเครื่องหลังจากคุณอ้างอิงแพ็กเกจ Aspose.BarCode จาก NuGet. + +## ข้อกำหนดเบื้องต้น + +* .NET 6.0 SDK หรือรุ่นใหม่กว่า (โค้ดนี้ยังทำงานกับ .NET Framework 4.7+) +* Visual Studio 2022, Visual Studio Code หรือ IDE C# ใด ๆ ที่คุณต้องการ +* แพ็กเกจ Aspose.BarCode for .NET – ติดตั้งผ่าน NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## สร้างรหัสบาร์ไปรษณีย์ด้วย Aspose.BarCode + +ส่วนต่อไปนี้จะพาคุณผ่านแต่ละขั้นตอน ตั้งแต่การสร้างอ็อบเจกต์ตัวสร้างจนถึงการบันทึกไฟล์ PNG สุดท้าย. + +### ขั้นตอนที่ 1: สร้างรหัสบาร์ Planet (ความสูงอัตโนมัติ) + +Planet เป็นรหัสบาร์ไปรษณีย์ที่ใช้ในหลายประเทศสำหรับการจัดเรียงจดหมาย เมื่อคุณสร้างรหัสบาร์ Planet ไลบรารีจะกำหนดความสูงของบาร์ที่เหมาะสมโดยอัตโนมัติตามข้อมูลที่เข้ารหัส + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**ทำไมวิธีนี้ถึงได้ผล** – `EncodeTypes.Planet` บอก Aspose.BarCode ให้ใช้สัญลักษณ์ Planet คุณสมบัติ `XDimension` ควบคุมความกว้างของบาร์ที่เล็กที่สุด (โมดูล) เนื่องจาก Planet ไม่ต้องการความสูงบาร์คงที่ ไลบรารีจึงคำนวณความสูงที่เหมาะสมโดยอัตโนมัติ ซึ่งทำให้โค้ดง่ายขึ้น + +### ขั้นตอนที่ 2: สร้างรหัสบาร์ RM4SCC พร้อมความสูงที่ระบุอย่างชัดเจน + +RM4SCC เป็นสัญลักษณ์ไปรษณีย์อีกแบบหนึ่งที่มักต้องการความสูงบาร์เฉพาะเพื่อความเข้ากันได้กับเครื่องสแกน โค้ดต่อไปนี้แสดงวิธีตั้งค่าความสูงนั้นด้วยตนเอง + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**ทำไมคุณต้องตั้งค่าความสูง** – เครื่องสแกนไปรษณีย์บางรุ่นคาดหวังความสูงบาร์ขั้นต่ำ โดยการกำหนด `BarHeight.Pixels = 100` คุณรับประกันว่าภาพที่สร้างขึ้นจะตรงตามข้อกำหนดนั้น X‑dimension จะคงที่เช่นเดียวกับรหัสบาร์ Planet เพื่อให้ทั้งสองภาพมีความหนาแน่นเชิงภาพเท่ากัน + +### ขั้นตอนที่ 3: ตรวจสอบผลลัพธ์ + +หลังจากรันโปรแกรม ให้เปิดไฟล์ PNG สองไฟล์ที่อยู่ใน `YOUR_DIRECTORY` คุณควรเห็นรหัสบาร์สองแบบที่แตกต่างกัน: + +* `PostalPlanetBarHeightNone.png` – รหัสบาร์ Planet ที่คำนวณความสูงโดยอัตโนมัติ +* `PostalRM4SCCBarHeight100Pixels.png` – รหัสบาร์ RM4SCC ที่มีความสูงบาร์ 100 พิกเซล + +ทั้งสองภาพสามารถส่งตรงไปยังเครื่องพิมพ์ฉลากหรือแสดงในแอปพลิเคชันเว็บได้. + +![Generated postal barcode image using Aspose.BarCode](generated-postal-barcode.png) + +*ข้อความแทนภาพ:* **Generated postal barcode** image using Aspose.BarCode (แสดงวิธีสร้างรหัสบาร์ไปรษณีย์). + +## วิธีสร้างรหัสบาร์ด้วยมิติที่กำหนดเอง (ขั้นสูง) + +หากคุณต้องการปรับจูนพารามิเตอร์อื่น ๆ อย่างเช่น ระยะขอบ, การวางข้อความ, หรือสี Aspose.BarCode มีอ็อบเจกต์ `Parameters` ที่ครอบคลุม ตัวอย่างสั้นต่อไปนี้เพิ่มพื้นหลังสีขาวและปิดการแสดงข้อความที่มนุษย์อ่านได้ + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**เมื่อใดควรใช้** – การปิดการแสดงข้อความที่มนุษย์อ่านได้เป็นเรื่องทั่วไปสำหรับการจัดเรียงอัตโนมัติที่ต้องการเพียงรูปแบบที่เครื่องอ่านได้ การตั้งค่าสีพื้นหลังช่วยให้รหัสบาร์พิมพ์ได้อย่างถูกต้องบนสื่อที่โปร่งแสง + +## ข้อผิดพลาดทั่วไปและเคล็ดลับระดับมืออาชีพ + +| Issue | Why it happens | Fix | +|-------|----------------|-----| +| รหัสบาร์แสดงออกยืด | X‑dimension มีค่ามากเกินไปเมื่อเทียบกับขนาดภาพ | ตั้งค่า `XDimension.Pixels` ระหว่าง 2 ถึง 5 สำหรับรหัสบาร์ไปรษณีย์ส่วนใหญ่ | +| เครื่องสแกนปฏิเสธภาพ | ความสูงบาร์ต่ำกว่าขั้นต่ำที่บริการไปรษณีย์กำหนด | ใช้ `BarHeight.Pixels` ≥ 80 สำหรับ RM4SCC เว้นแต่ข้อกำหนดระบุอย่างอื่น | +| ขนาดไฟล์ PNG ใหญ่ | ความละเอียดภาพสูงเกินความจำเป็น | บันทึกเป็น PNG‑8 (`BarCodeImageFormat.Png8`) หรือ ลดขนาดพิกเซล | + +**เคล็ดลับระดับมืออาชีพ:** ควรทดสอบรหัสบาร์ที่สร้างขึ้นด้วยเครื่องสแกนจริงก่อนนำไปใช้ในระบบจริง ความแตกต่างเล็กน้อยในภาพอาจส่งผลต่อการอ่านได้ + +## โค้ดต้นฉบับเต็ม + +คัดลอกบล็อกทั้งหมดด้านล่างไปยังแอปพลิเคชันคอนโซลใหม่ (`Program.cs`). ปรับเส้นทางการบันทึกผลลัพธ์ให้เป็นโฟลเดอร์ที่โปรเซสของคุณสามารถเขียนได้. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +เมื่อรันโปรแกรมจะแสดงข้อความ *“Barcodes generated successfully.”* และสร้างไฟล์ PNG สองไฟล์ในไดเรกทอรีทำงานของไฟล์ executable. + +## สรุป + +ตอนนี้คุณรู้วิธี **สร้างรหัสบาร์ไปรษณีย์** ใน C# ด้วย Aspose.BarCode ครอบคลุมทั้งรหัสบาร์ Planet ที่มีความสูงอัตโนมัติและรหัสบาร์ RM4SCC ที่กำหนดความสูงได้ คู่มือนี้ยังแสดง **วิธีสร้างรหัสบาร์** ด้วย X‑dimension, ความสูงบาร์, และตัวเลือกการแสดงผลที่กำหนดเอง ให้พื้นฐานที่มั่นคงสำหรับโครงการอัตโนมัติการส่งจดหมายใด ๆ + +ขั้นตอนต่อไปที่คุณอาจสำรวจ: + +* ผสานรวม PNG ที่สร้างขึ้นเข้าไปในใบแจ้งหนี้ PDF ด้วย Aspose.PDF. +* เปลี่ยนรูปแบบผลลัพธ์เป็น SVG สำหรับกราฟิกเวกเตอร์ที่ปรับขนาดได้. +* ใช้คลาส `BarcodeReader` เพื่อตรวจสอบข้อมูลที่เข้ารหัสโดยอัตโนมัติ. + +คุณสามารถทดลองใช้สัญลักษณ์ต่าง ๆ (เช่น `EncodeTypes.Postnet`) และแบ่งปันผลลัพธ์ของคุณกับชุมชนได้เลย ขอให้สนุกกับการเขียนโค้ด! + +## สิ่งที่คุณควรเรียนต่อไปคืออะไร? + +บทเรียนต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดและต่อยอดจากเทคนิคที่แสดงในคู่มือนี้ แต่ละแหล่งข้อมูลมีตัวอย่างโค้ดทำงานเต็มรูปแบบพร้อมคำอธิบายทีละขั้นตอน เพื่อช่วยให้คุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจแนวทางการนำไปใช้ทางเลือกในโครงการของคุณ + +- [วิธีสร้างภาพรหัสบาร์พร้อมการปรับแต่งพื้นที่เสริมโดยใช้ Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [วิธีสร้างรหัสบาร์ – การกำหนดค่า Code 39 ด้วย Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [วิธีสร้างรหัสบาร์ DataMatrix (ECC 200) ด้วย Aspose.BarCode สำหรับ .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/turkish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..996bf48fc --- /dev/null +++ b/barcode/turkish/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,253 @@ +--- +category: general +date: 2026-08-19 +description: C# barkod oluşturucu öğreticisi, DataBar Expanded Stacked barkodları + nasıl oluşturacağını, barkod boyutunu özelleştirmeyi ve satır ve sütunları yapılandırmayı + gösterir. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: tr +lastmod: 2026-08-19 +og_description: C# barkod oluşturucu öğreticisi, DataBar barkodları nasıl oluşturacağınızı, + boyutu nasıl özelleştireceğinizi ve hassas çıktı için satır ve sütunları nasıl yapılandıracağınızı + öğretir. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: C# barkod oluşturucu – özelleştirilmiş DataBar barkodları için adım adım + rehber +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'C# barkod oluşturucu: özel DataBar barkodları oluşturun' +url: /tr/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# barkod oluşturucu: özel DataBar barkodları oluşturun + +DataBar Expanded Stacked sembolleri üretebilen bir **c# barcode generator**'a ihtiyacınız varsa, bu kılavuz size özel satır ve sütunlarla barkod görüntüleri oluşturmayı tam olarak gösterir. Databar parametrelerini yapılandırmayı, barkod boyutunu ayarlamayı ve sonucu PNG dosyaları olarak kaydetmeyi öğreneceksiniz. + +Barkodları programlı olarak oluşturmak, manuel tasarım adımlarını ortadan kaldırır ve platformlar arasında tutarlı çıktı garantiler. Bu öğreticide şunları yapacaksınız: + +* Aspose.BarCode for .NET kütüphanesini (veya uyumlu bir paketi) kurun ve referans verin. +* DataBar Expanded Stacked sembolü için bir barkod oluşturucu oluşturun. +* **How to generate barcode** görüntülerini belirli sütun ve satır ayarlarıyla oluşturun. +* **Customize barcode size**'ı DataBar satır ve sütunlarını kontrol ederek özelleştirin. +* **Configure databar parameters**'ı metin, format ve görüntü kalitesi gibi ayarlarla yapılandırın. + +## Ön Koşullar + +* .NET 6.0 SDK veya daha yeni bir sürümünün yüklü olması. +* Bir C# geliştirme ortamı (Visual Studio, VS Code, Rider vb.). +* `Aspose.BarCode` NuGet paketi (veya `BarcodeGenerator`, `EncodeTypes` ve `BarCodeImageFormat` sağlayan eşdeğer bir kütüphane). + +Paketi .NET CLI ile ekleyin: + +```bash +dotnet add package Aspose.BarCode +``` + +## C# barkod oluşturucu kullanarak DataBar barkodları oluşturma + +Aşağıdaki bölümler size her adımı gösterir. Ana odak **c# barcode generator** API'sidir, ancak aynı desen benzer özellikler sunan diğer barkod kütüphanelerine de uygulanabilir. + +### Adım 1: Barkod oluşturucuyu örnek metinle başlatın + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Bu adım neden?* +`BarcodeGenerator` tüm barkod oluşturma görevleri için giriş noktasıdır. `EncodeTypes.DatabarExpandedStacked` enum'ını sağlamak, kütüphaneye hangi sembolü kullanacağını söyler, metin argümanı ise sembolde kodlanan insan‑okunur değeri oluşturur. + +### Adım 2: Sütun sayısını ayarlayın (varsayılan satırlar kullanılır) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Bu adım neden?* +DataBar Expanded Stacked semboller, üst üste yığılmış lineer öğelerden oluşur. `Columns` özelliğini ayarlamak, yatay yoğunluğu değiştirir ve toplam yüksekliği artırmadan daha uzun veri dizilerini sığdırmanıza olanak tanır. Bu doğrudan **barcode size'ı özelleştirir**. + +### Adım 3: Dört sütun kullanan barkod görüntüsünü kaydedin + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Gördükleriniz:* +Kaydedilen `DatabarCols4.png` görüntüsü, dört sütun içerdiği için varsayılandan daha geniş bir DataBar barkodu gösterir. Çıktıyı doğrulamak için dosyayı herhangi bir görüntü görüntüleyicide açabilirsiniz. + +### Adım 4: Yeni yapılandırma için oluşturucuyu yeniden başlatın + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Neden yeniden başlatılıyor?* +Önceki sütun ayarını koruyarak `Rows` özelliğini değiştirmek beklenmedik bir kombinasyon oluşturabilir. Yeni bir örnekle başlamak, yalnızca istenen parametrenin (`Rows`) bir sonraki görüntüyü etkilemesini sağlar. + +### Adım 5: Satır sayısını ayarlayın (varsayılan sütunlar kullanılır) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Bu adım neden?* +`Rows` özelliği dikey yığılmayı kontrol eder. Satır sayısını artırmak barkodu daha uzun yapar; bu, yatayda sınırlı ancak dikeyde bol alan olduğunda faydalıdır. Bu, **barcode size'ı özelleştirmenin** bir başka yoludur. + +### Adım 6: Üç satır kullanan barkod görüntüsünü kaydedin + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Sonuç:* +`DatabarRows3.png` üç yığılmış satırla daha uzun bir barkod gösterir ve **configure databar parameters**'ın görsel görünümü nasıl etkilediğini gösterir. + +## Tam çalıştırılabilir örnek + +Aşağıda kopyalayıp yapıştırıp çalıştırabileceğiniz tam bir program bulunmaktadır. Tüm içe aktarmalar, hata yönetimi ve açıklamalar netlik için eklenmiştir. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Beklenen çıktı** + +Programı çalıştırmak iki PNG dosyası üretir: + +* `DatabarCols4.png` – dört sütunlu geniş bir DataBar barkodu. +* `DatabarRows3.png` – üç satırlı uzun bir DataBar barkodu. + +Barkod boyutlarının yapılandırılmış parametrelerle eşleştiğini doğrulamak için görüntüleri açın. + +## Yaygın sorular ve uç‑durum yönetimi + +| Soru | Cevap | +|----------|--------| +| *Özel satırlar **ve** sütunlar ikisine de ihtiyacım olsaydı ne olur?* | `Save` çağrısından önce aynı `BarcodeGenerator` örneğinde `Rows` **ve** `Columns` ayarlayın. Kütüphane her iki değeri birleştirerek istenen boyutta bir ızgara üretir. | +| *Görüntü formatını değiştirebilir miyim?* | Evet. İş akışınıza uygun olarak `BarCodeImageFormat.Png` yerine `Jpeg`, `Bmp` veya `Gif` kullanın. | +| *Metin sembolün tutabileceğinden daha uzun olduğunda ne olur?* | Oluşturucu bir `ArgumentException` fırlatır. Metni kısaltın veya daha fazla kapasite sağlamak için `Columns`/`Rows` değerlerini artırın. | +| *DPI veya görüntü çözünürlüğü ayarlamanın bir yolu var mı?* | Kaydetmeden önce istediğiniz DPI'yi belirtmek için `generator.Parameters.ImageResolution` kullanın. Bu, yüksek çözünürlüklü baskı için **barcode size'ı daha da özelleştirir**. | +| *Kütüphane diğer DataBar varyantlarını destekliyor mu?* | Evet. Aynı parametre yapısını koruyarak `EncodeTypes.DatabarExpandedStacked` yerine `DatabarExpanded`, `DatabarLimited` vb. kullanın. | + +## Güvenilir barkod oluşturma ipuçları + +* **Pro tip:** Üretilen görüntüyü üretime almadan önce her zaman bir tarayıcı veya mobil uygulama ile doğrulayın. +* **Watch out for:** Boş veya null çıktı dizinleri—`Save` yol mevcut değilse bir istisna fırlatır. Gerekirse klasörü programlı olarak oluşturun. +* **Performance note:** Bir döngüde birçok barkod üretirken tek bir `BarcodeGenerator` örneğini yeniden kullanmak ve sadece `Rows` ya da `Columns` değerlerini değiştirmek nesne oluşturma yükünü azaltabilir. + +## Sonuç + +Artık bir **c# barcode generator** kullanarak **databar barkod** görüntüleri oluşturmayı, **barcode size'ı özelleştirmeyi** ve satır ve sütun gibi **databar parameters'ı yapılandırmayı** biliyorsunuz. Bu ayarları değiştirerek barkodları herhangi bir yerleşim gereksinimine uydurabilir ve tarama güvenilirliğini koruyabilirsiniz. + +Sonra, **how to generate barcode** PDF'leri, raporlara barkod yerleştirme veya diğer sembol tiplerine (QR, Code‑128 vb.) geçiş gibi ilgili konuları keşfedin. Belirli kullanım durumunuz için en uygun yapılandırmayı bulmak amacıyla farklı `Rows`, `Columns` ve görüntü çözünürlükleriyle deneyler yapın. + +--- + + +## Sonra Ne Öğrenmelisiniz? + +Aşağıdaki öğreticiler, bu kılavuzda gösterilen tekniklere dayanan ve 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çıklamalı tam çalışan kod örnekleri içerir. + +- [Aspose.BarCode for .NET kullanarak Tek Boyutlu Databar için Barkod Yüksekliğini Oluşturma ve Ayarlama](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Aspose.BarCode .NET API kullanarak Tek Boyutlu Databar 2D Barkodları Oluşturma](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [.NET API – Satır ve Sütun Yapılandırması ile Aspose.BarCode Databar barkodu oluşturma](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/turkish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..ba3dc6ca6 --- /dev/null +++ b/barcode/turkish/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,222 @@ +--- +category: general +date: 2026-08-19 +description: C# ile bir barkod PNG dosyası oluşturmayı ve yüksekliğini ayarlamayı + öğrenin; barkod görüntülerinin nasıl üretileceğini ve barkod yüksekliğinin kolayca + nasıl değiştirileceğini kapsar. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: tr +lastmod: 2026-08-19 +og_description: C#'ta bir barkod PNG dosyası oluşturun ve barkod görüntüleri oluşturmayı, + barkod yüksekliğini ayarlamayı ve optimal taramalar için barkod yüksekliğini değiştirmeyi + öğrenin. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: C#'ta bir barkod PNG dosyası oluşturma – adım adım rehber +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: C#'ta ayarlanabilir yüksekliğe sahip bir barkod PNG dosyası nasıl oluşturulur +url: /tr/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C#'ta Ayarlanabilir Yüksekliğe Sahip Bir Barkod PNG Dosyası Nasıl Oluşturulur + +Eğer C# ile **barkod PNG dosyası** oluşturmanız gerekiyorsa, bu kılavuz tam olarak nasıl yapılacağını gösterir. **Barkod oluşturma** örneklerini ve **barkod yüksekliğini ayarlama** yöntemlerini içeren tam, çalıştırılabilir bir örnek göreceksiniz. + +Barkod PNG dosyası oluşturmak, envanter sistemleri, satış noktası terminalleri ve makine tarafından okunabilir verileri yazdırması veya görüntülemesi gereken her uygulama için yaygın bir gereksinimdir. Bu öğreticinin sonunda barkod yüksekliğini değiştirebilecek, birden fazla PNG dosyası kaydedebilecek ve yüksekliğin tarama güvenilirliği üzerindeki etkisini anlayacaksınız. + +## Önkoşullar + +Başlamadan önce şunların yüklü olduğundan emin olun: + +* .NET 6.0 SDK veya daha yeni bir sürüm +* Visual Studio 2022 (veya .NET destekleyen herhangi bir IDE) +* **Aspose.BarCode for .NET** NuGet paketi (kod örneği bu kütüphaneyi kullanıyor) + +Paketi komut satırından şu şekilde ekleyebilirsiniz: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Pro ipucu:** Aspose.BarCode'un ücretsiz deneme sürümü geliştirme ve test aşamaları için yeterlidir. Üretim ortamı için lisanslı bir anahtar temin edin. + +## Barkod kütüphanesini kurun + +İlk adım, kütüphaneyi projenize referans vermektir. C# dosyanızın en üstüne aşağıdaki `using` yönergelerini ekleyin: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Bu ad alanları `BarcodeGenerator`, `EncodeTypes` ve `BarCodeImageFormat` sınıflarına erişim sağlar. + +## Barkod PNG dosyasını oluşturun + +Şimdi **barkod PNG dosyası** üretecek bir `BarcodeGenerator` örneği oluşturacağız. Örnek, Databar OmniDirectional sembolojisini kullanıyor, ancak `EncodeTypes.DatabarOmniDirectional` ifadesini desteklenen başka bir türle değiştirebilirsiniz. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +`"(01)12345678901231"` dizesi, 14 haneli bir GTIN için GS1 Uygulama Tanımlayıcısı formatını izler. Kendi ürün tanımlayıcılarınıza göre veriyi ayarlayın. + +## X‑boyutunu ayarlayın (isteğe bağlı) + +X‑boyutu, tek bir barkod modülünün genişliğini tanımlar. Piksel tabanlı bir değer, görüntü boyutu üzerinde kesin kontrol sağlar. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +`2` piksel değeri, çoğu ekran görüntüsü için iyi çalışır. Yazdırıldığında daha büyük bir barkod gerekiyorsa artırın. + +## Barkod yüksekliğini ayarlayın ve barkod PNG dosyasını kaydedin + +**BarHeight** özelliği, çubukların dikey boyutunu kontrol eder. Bu değeri değiştirerek **barkod yüksekliğini ayarlayabilir** ve kodlanmış veriyi etkilemezsiniz. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +`DatabarBarHeight30Pixels.png` dosyası artık **30 piksel yüksekliğinde bir barkod PNG dosyası**dır. + +**Barkod yüksekliğini** değiştirmek ve ikinci bir görüntü oluşturmak için yeni bir değer atayın ve `Save` metodunu tekrar çağırın: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Artık iki PNG dosyanız var—biri 30 px, diğeri 60 px—ve **barkod yüksekliğini** anlık olarak nasıl **ayarlayacağınızı** gösteriyor. + +### Neden çubuk yüksekliği önemlidir + +* **Okunabilirlik:** Tarayıcılar güvenilir algı için minimum bir yüksekliğe ihtiyaç duyar. Çok kısa bir barkod, özellikle düşük çözünürlüklü kameralarda gözden kaçabilir. +* **Estetik:** Barkod yüksekliğini çevredeki tasarım öğeleriyle eşleştirmek daha temiz bir UI sağlar. +* **Baskı kısıtlamaları:** Bazı etiket yazıcıları sabit yükseklik yuvalarına sahiptir; barkod yüksekliğini ayarlamak dosyanın sığmasını garantiler. + +**En iyi uygulama:** Yüksekliği X‑boyutunun katları şeklinde tutun (ör. X‑boyutu 2 px ise 30 px); bu, orantıyı korur ve bozulmayı önler. + +## Tam örnek + +Aşağıda, bir konsol uygulamasına yapıştırıp hemen çalıştırabileceğiniz eksiksiz, bağımsız program yer almaktadır. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Beklenen çıktı** + +Program çalıştırıldığında çalıştırılabilirin çalışma dizininde iki dosya oluşturulur: + +* `DatabarBarHeight30Pixels.png` – 30 piksel yüksekliğinde bir barkod PNG dosyası +* `DatabarBarHeight60Pixels.png` – 60 piksel yüksekliğinde bir barkod PNG dosyası + +Her iki PNG'yi de herhangi bir görüntü görüntüleyicide açın; taramaya hazır net bir Databar OmniDirectional barkod göreceksiniz. + +## Kenar durumları ve sorun giderme + +| Durum | Kontrol Edilecek | Önerilen Çözüm | +|-----------|---------------|-----------------| +| Barkod bulanıktır | X‑boyutu, seçilen yükseklik için çok düşük | `XDimension.Pixels` değerini artırın (ör. 2'den 3'e) | +| Tarayıcı düşük‑yüksekliğe sahip barkodu okuyamıyor | Yükseklik tarayıcının minimumunun altında | `BarHeight.Pixels` değerini en az 30 px (veya tarayıcı özelliklerine göre) yapın | +| PNG dosyası boş veya bozuk | Çıktı yolu geçersiz veya yazma izni yok | Mutlak bir yol kullanın veya uygulamanın yazma izni olduğundan emin olun | +| Farklı bir semboloji gerekiyor | Mevcut `EncodeTypes` uygun değil | `EncodeTypes.DatabarOmniDirectional` ifadesini başka bir enum değeriyle değiştirin (ör. `EncodeTypes.Code128`) | + +## Sıkça Sorulan Sorular + +**S: Başka görüntü formatları (JPEG, BMP) oluşturabilir miyim?** +C: Evet. `BarCodeImageFormat.Png` ifadesini `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp` vb. ile değiştirin. + +**S: PNG'yi bir web sayfasına nasıl gömerim?** +C: Oluşturulan PNG'yi bir HTTP uç noktası üzerinden sunabilir veya Base64 dizesine çevirip `` etiketinin `src` niteliğine yerleştirebilirsiniz. + +**S: Arka plan rengini ayarlamak mümkün mü?** +C: `generator.Parameters.Image.BackgroundColor = Color.White;` (veya herhangi bir `System.Drawing.Color`) ifadesini kullanın. + +## Sonuç + +Artık C# ile **barkod PNG dosyası oluşturmayı** ve tarama ya da tasarım gereksinimlerinize uygun **barkod yüksekliğini ayarlamayı** biliyorsunuz. `BarHeight.Pixels` özelliğini değiştirerek **barkod yüksekliğini** anlık olarak değiştirebilir ve tek bir kod tabanından birden fazla PNG varlığı üretebilirsiniz. + +Sonraki adımda, ön renk, kenar boşlukları ve insan‑okunur metin ekleme gibi diğer özelleştirme seçeneklerini keşfedin. Ayrıca farklı sembolojiler (`EncodeTypes.Code128`, `EncodeTypes.QR`) ile deney yaparak kodlayabileceğiniz veri çeşitliliğini artırabilirsiniz. + +Keyifli kodlamalar ve barkodlarınızın ilk denemede sorunsuz taranmasını dileriz! + + +## Sonraki Öğrenmeniz Gerekenler + +Aşağıdaki öğreticiler, bu kılavuzda gösterilen tekniklere dayanan ve yakın konuları kapsayan içeriklerdir. Her kaynak, ek API özelliklerini öğrenmenize ve projelerinizde alternatif uygulama yaklaşımları keşfetmenize yardımcı olacak tam çalışan kod örnekleri ve adım‑adım açıklamalar içerir. + +- [Aspose.BarCode for .NET kullanarak Tek Boyutlu Databar için Barkod Yüksekliğini Oluşturma ve Ayarlama](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Barkod Oluşturma - Tek Boyutlu Barkod Türleri](/barcode/english/net/one-dimensional-barcode-types/) +- [Aspose.BarCode for .NET ile Aztec barkodunu özel en-boy oranı ile oluşturma](/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/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/turkish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..2d99f82c0 --- /dev/null +++ b/barcode/turkish/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,159 @@ +--- +category: general +date: 2026-08-19 +description: Aspose.BarCode ile C#'ta databar PNG dosyaları oluşturun. Databar görüntülerini + nasıl oluşturacağınızı, databar parametrelerini nasıl yapılandıracağınızı ve PNG + çıktısını nasıl kaydedeceğinizi öğrenin. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: tr +lastmod: 2026-08-19 +og_description: Aspose.BarCode kullanarak C#'ta databar PNG dosyaları oluşturun. Bu + öğretici, databar görüntülerini nasıl oluşturacağınızı, X‑boyutu ve en‑boy oranı + gibi databar parametrelerini nasıl yapılandıracağınızı ve baskı veya web kullanımı + için yüksek kaliteli PNG dosyalarını nasıl kaydedeceğinizi adım adım gösterir. +og_image_alt: create databar PNG example +og_title: C#'ta databar PNG görüntüleri oluşturma – adım adım rehber +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: C# ve Aspose.BarCode ile databar PNG görüntüleri nasıl oluşturulur +url: /tr/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# ve Aspose.BarCode ile databar PNG görüntüleri nasıl oluşturulur + +Bir .NET uygulamasında **databar PNG** dosyaları oluşturmanız gerekiyorsa, bu kılavuz tam olarak nasıl yapılacağını gösterir. Yığılmış çok yönlü DataBar kodları üreten, ana parametreleri yapılandıran ve farklı en‑boy oranlarına sahip iki PNG dosyasını kaydeden eksiksiz, çalıştırılabilir bir örnek göreceksiniz. + +Bir DataBar görüntüsü oluşturmak yalnızca tek bir yöntemi çağırmakla sınırlı değildir. Baskı veya tarama gereksinimlerini karşılamak için X‑boyutu (modül genişliği) ve en‑boy oranı gibi **databar parametrelerini yapılandırmanız** gerekir. Bu öğreticinin sonunda **databar** grafiklerini gerçek dünya senaryolarında güvenilir şekilde nasıl üreteceğinizi anlayacaksınız. + +## Önkoşullar + +- .NET 6.0 veya üzeri (kod .NET Framework 4.7+ ile de çalışır) +- Visual Studio 2022 veya herhangi bir C# uyumlu IDE +- **Aspose.BarCode for .NET** için geçerli bir lisans (ücretsiz değerlendirme testi için yeterlidir) +- C# sözdizimi hakkında temel bilgi + +> **Pro tip:** Henüz lisansınız yoksa, Aspose portalından geçici bir değerlendirme anahtarı talep edebilirsiniz. API aynı şekilde çalışır; sadece filigran değişir. + +## Adım 1: Aspose.BarCode NuGet paketini yükleyin + +Projenizi Visual Studio’da açın, çözüme sağ‑tıklayın ve **Manage NuGet Packages** seçeneğini seçin. `Aspose.BarCode` paketini aratın ve en son kararlı sürümü yükleyin. + +```bash +dotnet add package Aspose.BarCode +``` + +Bu komut `Aspose.BarCode` derlemesini projenize ekler ve `BarcodeGenerator` sınıfını kullanılabilir hâle getirir. + +## Adım 2: Yığılmış çok yönlü DataBar için barkod üreteci başlatın + +`BarcodeGenerator` yapıcı metodu iki argüman alır: barkod tipi ve ham veri dizesi. Yığılmış çok yönlü DataBar için `EncodeTypes.DatabarStackedOmniDirectional` kullanırsınız. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Neden önemli:** `EncodeTypes.DatabarStackedOmniDirectional` sabiti, kütüphaneye herhangi bir yönden okunabilen bir barkod üretmesini söyler; bu, perakende raf etiketleri için idealdir. + +## Adım 3: X‑boyutunu (modül genişliğini) piksel olarak yapılandırın + +X‑boyutu, en küçük çubuk elemanının boyutunu kontrol eder. Piksel cinsinden ayarlamak, son görüntü boyutu üzerinde kesin kontrol sağlar. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +**2 piksel** değeri, çoğu etiket yazıcısı için okunabilirlik ve kompaktlık arasında iyi bir denge sunar. Daha büyük veya daha küçük modüllere ihtiyacınız varsa bu değeri ayarlayın. + +## Adım 4: İlk en‑boy oranını ayarlayın ve PNG olarak kaydedin + +En‑boy oranı, yığılmış DataBar’ın yüksekliğini etkiler. **15** en‑boy oranı nispeten kısa bir barkod üretirken, **30** daha uzun bir barkod oluşturur. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +`Save` metodu, oluşturulan barkodu bir PNG dosyasına yazar. PNG kayıpsızdır, bu da barkod tarayıcıları için gerekli keskin kenarların korunmasını sağlar. + +## Adım 5: En‑boy oranını değiştirin ve ikinci bir PNG kaydedin + +Aynı `BarcodeGenerator` örneğini yeniden kullanarak sadece en‑boy oranını değiştirerek farklı varyasyonlar üretebilirsiniz. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Artık iki PNG dosyanız var—`DatabarAspectRatio15.png` ve `DatabarAspectRatio30.png`—her biri farklı bir görsel yoğunluğa sahip. + +## Adım 6: Çıktıyı doğrulayın + +Oluşturulan PNG dosyalarını herhangi bir görüntüleyicide açın. Temiz, yüksek kontrastlı bir DataBar barkodu görmelisiniz. Akıllı telefon barkod tarayıcısıyla görüntüleri taradığınızda, her iki en‑boy oranının da orijinal GTIN değeri `12345678901231`i çözdüğünü doğrulayabilirsiniz. + +![create databar PNG example](databar_example.png) + +*Yukarıdaki görüntü, iki PNG dosyasını yan yana gösterir. Sol görüntü en‑boy oranı 15, sağ görüntü en‑boy oranı 30 kullanır.* + +## Yaygın varyasyonlar ve kenar durumları + +| Senaryo | Ne değiştirilmeli | Nedeni | +|----------|-------------------|--------| +| **Farklı veri** | `(01)12345678901231` dizesini geçerli bir GS1 Uygulama Tanımlayıcısı ve veri ile değiştirin | Ürün kimlikleri, seri numaraları vb. kodlamanızı sağlar | +| **Daha yüksek çözünürlük** | `XDimension.Pixels` değerini 3 veya 4’e yükseltin | Barkod büyük boyutlarda basılacak ya da uzaktan taranacaksa gerekir | +| **Diğer DataBar tipleri** | `EncodeTypes.DatabarStacked` veya `EncodeTypes.DatabarExpanded` kullanın | Etiket düzeninize en uygun tipi seçin | +| **Şeffaf arka plan** | `BarCodeImageFormat.Png` ile `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` geçirin | Barkodu renkli etiketlerin üzerine bindirirken faydalıdır | + +> **Dikkat edilmesi gereken:** Çok küçük bir X‑boyutu (< 1 piksel) ayarlamak, barkodun bulanık görünmesine neden olabilir. + +## Sonra Ne Öğrenmelisiniz? + + +Aşağıdaki öğreticiler, bu kılavuzda gösterilen tekniklere dayanarak yakından ilgili konuları kapsar. Her kaynak, ek API özelliklerini ustalaşmanız ve kendi projelerinizde alternatif uygulama yaklaşımlarını keşfetmeniz için adım‑adım açıklamalar içeren tam çalışan kod örnekleri sunar. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Create One-Dimensional Databar GS1 Encoding with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/turkish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..9ed35932a --- /dev/null +++ b/barcode/turkish/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,210 @@ +--- +category: general +date: 2026-08-19 +description: C# kullanarak Aspere.BarCode ile posta barkodu oluşturmayı öğrenin. Bu + adım adım rehber, Planet ve RM4SCC formatları için barkod oluşturmayı gösterir. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: tr +lastmod: 2026-08-19 +og_description: C# ile Aspose.BarCode kullanarak posta barkodu oluşturun. Bu kılavuzu + izleyerek Planet ve RM4SCC için özel boyutlarda barkod nasıl oluşturulacağını öğrenin. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: C#'de posta barkodu oluşturma – tam Aspose.BarCode rehberi +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Aspose.BarCode ile C#'ta posta barkodu nasıl oluşturulur +url: /tr/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# C# ile Aspose.BarCode kullanarak posta barkodu oluşturma + +Posta gönderim uygulamaları için **posta barkodu oluşturmanız** gerektiğinde, bu kılavuz Aspose.BarCode kütüphanesini kullanarak barkod nasıl oluşturulacağını adım adım gösterir. Otomatik yüksekliği hesaplanan bir Planet barkodu ve sabit bir çubuk yüksekliğine sahip bir RM4SCC barkodu oluşturan tam, çalıştırılabilir bir örnek göreceksiniz. + +Posta barkodu oluşturma, lojistik yazılımları, otomatik etiket yazıcıları ve toplu posta sistemleri için yaygın bir gereksinimdir. Bu öğreticinin sonunda, .NET projenize barkod oluşturmayı entegre edebilecek, X‑boyutunu özelleştirebilecek ve standart format izin veriyorsa çubuk yüksekliğini kontrol edebileceksiniz. + +**Öğrenecekleriniz** + +* C# projesinde Aspose.BarCode kurulumunu nasıl yapacağınız. +* Planet ve RM4SCC posta barkodlarını nasıl oluşturacağınız. +* X‑boyutunu (modül genişliği) ve çubuk yüksekliğini nasıl ayarlayacağınız. +* Sonucu PNG görüntüsü olarak nasıl kaydedeceğiniz. + +Harici hizmetlere gerek yok—Aspose.BarCode NuGet paketini referans ettikten sonra her şey yerel olarak çalışır. + +## Önkoşullar + +* .NET 6.0 SDK veya daha yenisi (kod .NET Framework 4.7+ ile de çalışır). +* Visual Studio 2022, Visual Studio Code veya tercih ettiğiniz herhangi bir C# IDE. +* Aspose.BarCode for .NET paketi – NuGet üzerinden kurun: + +```bash +dotnet add package Aspose.BarCode +``` + +## Aspose.BarCode ile posta barkodu oluşturma + +Aşağıdaki bölümler, oluşturucu nesneleri yaratmaktan son PNG dosyalarını kaydetmeye kadar her adımı size gösterir. + +### Adım 1: Planet barkodu oluşturma (otomatik yükseklik) + +Planet, birçok ülkede posta sıralaması için kullanılan bir posta barkodudur. Planet barkodu oluşturduğunuzda, kütüphane kodlanmış veriye göre optimal çubuk yüksekliğini otomatik olarak belirler. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Neden bu şekilde çalışır** – `EncodeTypes.Planet` Aspose.BarCode’a Planet sembolojisini kullanmasını söyler. `XDimension` özelliği en küçük çubuğun (modül) genişliğini kontrol eder. Planet sabit bir çubuk yüksekliği gerektirmediği için kütüphane uygun bir yüksekliği otomatik olarak hesaplar; bu da kodu basitleştirir. + +### Adım 2: RM4SCC barkodu oluşturma (belirli yükseklik) + +RM4SCC, tarayıcı uyumluluğu için genellikle belirli bir çubuk yüksekliği gerektiren bir başka posta sembolojisidir. Aşağıdaki kod, bu yüksekliği manuel olarak nasıl ayarlayacağınızı gösterir. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Neden yüksekliği ayarlarsınız** – Bazı posta tarayıcıları minimum çubuk yüksekliği bekler. `BarHeight.Pixels = 100` atayarak, oluşturulan görüntünün bu gereksinimleri karşıladığından emin olursunuz. X‑boyutu, her iki görüntünün aynı görsel yoğunluğa sahip olmasını sağlamak için Planet barkodu ile tutarlı kalır. + +### Adım 3: Çıktıyı doğrulama + +Programı çalıştırdıktan sonra `YOUR_DIRECTORY` içinde bulunan iki PNG dosyasını açın. Şu iki farklı barkodu görmelisiniz: + +* `PostalPlanetBarHeightNone.png` – otomatik olarak hesaplanan yüksekliğe sahip bir Planet barkodu. +* `PostalRM4SCCBarHeight100Pixels.png` – 100 piksel çubuk yüksekliğine sahip bir RM4SCC barkodu. + +Her iki görüntü de doğrudan etiket yazıcılarına beslenebilir veya bir web uygulamasında gösterilebilir. + +![Aspose.BarCode kullanılarak oluşturulan posta barkodu resmi](generated-postal-barcode.png) + +*Resim alt metni:* **Oluşturulan posta barkodu** Aspose.BarCode kullanılarak (posta barkodu oluşturmayı gösterir). + +## Özel boyutlarla barkod oluşturma (ileri seviye) + +Diğer parametreleri—kenar boşlukları, metin konumu veya renk gibi—ince ayarlamanız gerekiyorsa, Aspose.BarCode zengin bir `Parameters` nesnesi sunar. Aşağıda beyaz bir arka plan ekleyen ve insan‑okunur metni devre dışı bırakan hızlı bir örnek yer alıyor. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Ne zaman kullanılır** – İnsan‑okunur metni devre dışı bırakmak, yalnızca makine‑okunur desenin önemli olduğu otomatik sıralama senaryolarında yaygındır. Arka plan rengi ayarlamak, barkodun şeffaf medyada doğru şekilde basılmasını sağlar. + +## Yaygın tuzaklar ve uzman ipuçları + +| Sorun | Neden olur | Çözüm | +|-------|------------|------| +| Barkod uzatılmış görünüyor | X‑boyutu, görüntü boyutuna göre çok büyük | Çoğu posta barkodu için `XDimension.Pixels` değerini 2‑5 arasında tutun | +| Tarayıcı görüntüyü reddediyor | Çubuk yüksekliği posta hizmetinin minimum gereksinğinin altında | RM4SCC için `BarHeight.Pixels` ≥ 80 kullanın, aksi belirtilmedikçe | +| PNG dosya boyutu büyük | Görüntü çözünürlüğü gereğinden yüksek | PNG‑8 (`BarCodeImageFormat.Png8`) olarak kaydedin veya piksel boyutlarını azaltın | + +**Uzman ipucu:** Üretim ortamına geçmeden önce gerçek bir tarayıcıyla oluşturulan barkodu mutlaka test edin. Küçük görsel farklar okunabilirliği etkileyebilir. + +## Tam kaynak kodu + +Aşağıdaki bloğu yeni bir konsol uygulamasına (`Program.cs`) kopyalayın. Çıktı yollarını, işleminizin yazma izni olan bir klasöre göre ayarlayın. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Programı çalıştırdığınızda *“Barcodes generated successfully.”* mesajı basılır ve iki PNG dosyası çalıştırılabilirin çalışma dizinine oluşturulur. + +## Sonuç + +Artık C# ile Aspose.BarCode kullanarak **posta barkodu oluşturmayı** biliyorsunuz; hem otomatik‑yüksekliğe sahip Planet barkodlarını hem de sabit‑yüksekliğe sahip RM4SCC barkodlarını kapsadık. Kılavuz ayrıca **barkod oluşturmayı** özel X‑boyutu, çubuk yüksekliği ve görsel seçeneklerle nasıl yapacağınızı göstererek herhangi bir posta‑otomasyon projesi için sağlam bir temel sundu. + +İleride keşfedebileceğiniz adımlar: + +* Oluşturulan PNG’leri Aspose.PDF ile bir PDF faturaya entegre edin. +* Çıktı formatını SVG’ye değiştirerek ölçeklenebilir vektör grafikleri elde edin. +* `BarcodeReader` sınıfını kullanarak kodlanmış veriyi programatik olarak doğrulayın. + +Farklı sembolojelerle (ör. `EncodeTypes.Postnet`) denemeler yapın ve sonuçlarınızı toplulukla paylaşın. Mutlu kodlamalar! + +## Bir Sonraki Öğrenmeniz Gerekenler + +Aşağıdaki öğreticiler, bu kılavuzda gösterilen tekniklere dayanarak yakından ilgili konuları kapsar. Her kaynak, ek API özelliklerini öğrenmenize ve projelerinizde alternatif uygulama yaklaşımlarını keşfetmenize yardımcı olacak tam çalışan kod örnekleri ve adım adım açıklamalar içerir. + +- [Aspose.BarCode kullanarak Ekstra Boşluk Özelleştirmeli Barkod Görüntüsü Oluşturma](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Aspose.BarCode ile Barkod – Code 39 Yapılandırması](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [Aspose.BarCode for .NET ile DataMatrix Barkodları (ECC 200) Oluşturma](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md b/barcode/vietnamese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md new file mode 100644 index 000000000..d131b6620 --- /dev/null +++ b/barcode/vietnamese/python-java/general/c-barcode-generator-create-custom-databar-barcodes/_index.md @@ -0,0 +1,252 @@ +--- +category: general +date: 2026-08-19 +description: Hướng dẫn tạo mã vạch bằng C# cho thấy cách tạo mã vạch DataBar Expanded + Stacked, tùy chỉnh kích thước mã vạch và cấu hình hàng và cột. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- c# barcode generator +- how to generate barcode +- create databar barcode +- customize barcode size +- configure databar parameters +language: vi +lastmod: 2026-08-19 +og_description: Hướng dẫn tạo mã vạch C# dạy bạn cách tạo mã vạch DataBar, tùy chỉnh + kích thước và cấu hình hàng và cột để có đầu ra chính xác. +og_image_alt: Screenshot of a DataBar Expanded Stacked barcode generated with C# +og_title: Trình tạo mã vạch C# – hướng dẫn chi tiết từng bước cho mã vạch DataBar + tùy chỉnh +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + headline: 'C# barcode generator: create custom DataBar barcodes' + type: TechArticle +- description: C# barcode generator tutorial shows how to generate DataBar Expanded + Stacked barcodes, customize barcode size, and configure rows and columns. + name: 'C# barcode generator: create custom DataBar barcodes' + steps: + - name: Initialise the barcode generator with sample text + text: '```csharp using Aspose.BarCode.Generation;' + - name: Set the number of columns (default rows are used) + text: '```csharp // Configure the DataBar to use four columns. barcodeGenerator.Parameters.Barcode.DataBar.Columns + = 4; ```' + - name: Save the barcode image that uses four columns + text: '```csharp // Save the barcode as a PNG file. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", + BarCodeImageFormat.Png); ```' + - name: Re‑initialise the generator for a new configuration + text: '```csharp // Create a new generator instance for the same symbology and + text. barcodeGenerator = new BarcodeGenerator( EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); ```' + - name: Set the number of rows (default columns are used) + text: '```csharp // Configure the DataBar to use three rows. barcodeGenerator.Parameters.Barcode.DataBar.Rows + = 3; ```' + - name: Save the barcode image that uses three rows + text: '```csharp // Save the barcode with three rows. barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", + BarCodeImageFormat.Png); ```' + type: HowTo +tags: +- barcode +- csharp +- databar +title: 'Trình tạo mã vạch C#: tạo mã vạch DataBar tùy chỉnh' +url: /vi/python-java/general/c-barcode-generator-create-custom-databar-barcodes/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Trình tạo mã vạch C#: tạo mã DataBar tùy chỉnh + +Nếu bạn cần một **c# barcode generator** có thể tạo các ký hiệu DataBar Expanded Stacked, hướng dẫn này sẽ chỉ cho bạn cách tạo hình ảnh mã vạch với các hàng và cột tùy chỉnh. Bạn sẽ học cách cấu hình các tham số databar, điều chỉnh kích thước mã vạch và lưu kết quả dưới dạng tệp PNG. + +Việc tạo mã vạch bằng chương trình loại bỏ các bước thiết kế thủ công và đảm bảo đầu ra nhất quán trên mọi nền tảng. Trong tutorial này bạn sẽ: + +* Cài đặt và tham chiếu thư viện Aspose.BarCode cho .NET (hoặc bất kỳ gói nào tương thích). +* Tạo một trình tạo mã vạch cho ký hiệu DataBar Expanded Stacked. +* **Cách tạo hình ảnh mã vạch** với cài đặt cột và hàng cụ thể. +* **Tùy chỉnh kích thước mã vạch** bằng cách kiểm soát các hàng và cột DataBar. +* **Cấu hình các tham số databar** như văn bản, định dạng và chất lượng hình ảnh. + +## Yêu cầu trước + +* .NET 6.0 SDK hoặc phiên bản mới hơn đã được cài đặt. +* Môi trường phát triển C# (Visual Studio, VS Code, Rider, v.v.). +* Gói NuGet `Aspose.BarCode` (hoặc một thư viện tương đương cung cấp `BarcodeGenerator`, `EncodeTypes` và `BarCodeImageFormat`). + +Thêm gói bằng .NET CLI: + +```bash +dotnet add package Aspose.BarCode +``` + +## Sử dụng trình tạo mã vạch C# để tạo mã DataBar + +Các phần sau sẽ hướng dẫn bạn qua từng bước. Mục tiêu chính là **c# barcode generator** API, nhưng cùng một mẫu có thể áp dụng cho các thư viện mã vạch khác có các thuộc tính tương tự. + +### Bước 1: Khởi tạo trình tạo mã vạch với văn bản mẫu + +```csharp +using Aspose.BarCode.Generation; + +// Create a generator for DataBar Expanded Stacked with sample text. +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Tại sao cần bước này?* +`BarcodeGenerator` là điểm vào cho mọi tác vụ tạo mã vạch. Cung cấp enum `EncodeTypes.DatabarExpandedStacked` cho thư viện biết sẽ sử dụng ký hiệu nào, trong khi đối số văn bản sẽ trở thành giá trị có thể đọc được được mã hoá trong ký hiệu. + +### Bước 2: Đặt số cột (số hàng mặc định được sử dụng) + +```csharp +// Configure the DataBar to use four columns. +barcodeGenerator.Parameters.Barcode.DataBar.Columns = 4; +``` + +*Tại sao cần bước này?* +Các ký hiệu DataBar Expanded Stacked bao gồm các phần tử tuyến tính xếp chồng. Điều chỉnh thuộc tính `Columns` thay đổi mật độ theo chiều ngang, cho phép bạn chứa chuỗi dữ liệu dài hơn mà không tăng chiều cao tổng thể. Điều này trực tiếp **tùy chỉnh kích thước mã vạch**. + +### Bước 3: Lưu hình ảnh mã vạch sử dụng bốn cột + +```csharp +// Save the barcode as a PNG file. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarCols4.png", BarCodeImageFormat.Png); +``` + +*Bạn sẽ thấy gì:* +Hình ảnh `DatabarCols4.png` được lưu hiển thị một mã vạch DataBar rộng hơn mặc định vì nó chứa bốn cột. Bạn có thể mở tệp trong bất kỳ trình xem ảnh nào để xác nhận đầu ra. + +### Bước 4: Khởi tạo lại trình tạo cho cấu hình mới + +```csharp +// Create a new generator instance for the same symbology and text. +barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); +``` + +*Tại sao phải khởi tạo lại?* +Thay đổi thuộc tính `Rows` trong khi giữ lại cài đặt cột trước đó có thể tạo ra một sự kết hợp không mong muốn. Bắt đầu với một thể hiện mới đảm bảo chỉ có tham số dự định (`Rows`) ảnh hưởng đến hình ảnh tiếp theo. + +### Bước 5: Đặt số hàng (số cột mặc định được sử dụng) + +```csharp +// Configure the DataBar to use three rows. +barcodeGenerator.Parameters.Barcode.DataBar.Rows = 3; +``` + +*Tại sao cần bước này?* +Thuộc tính `Rows` kiểm soát việc xếp chồng theo chiều dọc. Tăng số hàng làm cho mã vạch cao hơn, hữu ích khi không gian ngang hạn chế nhưng không gian dọc phong phú. Đây là một cách khác để **tùy chỉnh kích thước mã vạch**. + +### Bước 6: Lưu hình ảnh mã vạch sử dụng ba hàng + +```csharp +// Save the barcode with three rows. +barcodeGenerator.Save("YOUR_DIRECTORY/DatabarRows3.png", BarCodeImageFormat.Png); +``` + +*Kết quả:* +`DatabarRows3.png` cho thấy một mã vạch cao hơn với ba hàng xếp chồng, minh họa cách **cấu hình các tham số databar** ảnh hưởng đến giao diện trực quan. + +## Ví dụ đầy đủ có thể chạy + +Dưới đây là một chương trình hoàn chỉnh mà bạn có thể sao chép, dán và chạy. Nó bao gồm tất cả các import, xử lý lỗi và chú thích để dễ hiểu. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // Define output folder (adjust as needed). + string outputFolder = @"C:\Barcodes"; + + // ----------------------------------------------------------------- + // Create barcode with custom column count. + // ----------------------------------------------------------------- + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 4 columns – this widens the symbol. + generator.Parameters.Barcode.DataBar.Columns = 4; + + // Save the first image. + string colsPath = System.IO.Path.Combine(outputFolder, "DatabarCols4.png"); + generator.Save(colsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 4 columns to: {colsPath}"); + + // ----------------------------------------------------------------- + // Create barcode with custom row count. + // ----------------------------------------------------------------- + generator = new BarcodeGenerator( + EncodeTypes.DatabarExpandedStacked, + "Databar Expanded Stacked long"); + + // Set 3 rows – this makes the symbol taller. + generator.Parameters.Barcode.DataBar.Rows = 3; + + // Save the second image. + string rowsPath = System.IO.Path.Combine(outputFolder, "DatabarRows3.png"); + generator.Save(rowsPath, BarCodeImageFormat.Png); + Console.WriteLine($"Saved barcode with 3 rows to: {rowsPath}"); + } +} +``` + +**Kết quả mong đợi** + +Chạy chương trình sẽ tạo hai tệp PNG: + +* `DatabarCols4.png` – một mã vạch DataBar rộng với bốn cột. +* `DatabarRows3.png` – một mã vạch DataBar cao với ba hàng. + +Mở các hình ảnh để xác nhận rằng kích thước mã vạch khớp với các tham số đã cấu hình. + +## Các câu hỏi thường gặp và xử lý trường hợp đặc biệt + +| Câu hỏi | Trả lời | +|----------|--------| +| *Nếu tôi cần cả hàng **và** cột tùy chỉnh thì sao?* | Đặt `Rows` **và** `Columns` trên cùng một thể hiện `BarcodeGenerator` trước khi gọi `Save`. Thư viện sẽ kết hợp cả hai giá trị để tạo ra lưới kích thước yêu cầu. | +| *Tôi có thể thay đổi định dạng ảnh không?* | Có. Thay `BarCodeImageFormat.Png` bằng `Jpeg`, `Bmp` hoặc `Gif` tùy theo quy trình làm việc của bạn. | +| *Điều gì xảy ra khi văn bản dài hơn khả năng chứa của ký hiệu?* | Trình tạo sẽ ném ra `ArgumentException`. Hãy rút ngắn văn bản hoặc tăng `Columns`/`Rows` để cung cấp dung lượng lớn hơn. | +| *Có cách nào để đặt DPI hoặc độ phân giải ảnh không?* | Sử dụng `generator.Parameters.ImageResolution` để chỉ định DPI mong muốn trước khi lưu. Điều này còn **tùy chỉnh kích thước mã vạch** cho việc in độ phân giải cao. | +| *Thư viện có hỗ trợ các biến thể DataBar khác không?* | Có. Thay `EncodeTypes.DatabarExpandedStacked` bằng `DatabarExpanded`, `DatabarLimited`, v.v., trong khi vẫn giữ cấu trúc tham số giống nhau. | + +## Mẹo để tạo mã vạch đáng tin cậy + +* **Mẹo chuyên nghiệp:** Luôn kiểm tra hình ảnh đã tạo bằng máy quét hoặc ứng dụng di động trước khi đưa vào sản xuất. +* **Cẩn thận với:** Thư mục đầu ra rỗng hoặc không tồn tại—`Save` sẽ ném ra ngoại lệ nếu đường dẫn không tồn tại. Tạo thư mục bằng mã nếu cần. +* **Lưu ý về hiệu năng:** Tái sử dụng một thể hiện `BarcodeGenerator` duy nhất và chỉ thay đổi `Rows` hoặc `Columns` có thể giảm chi phí tạo đối tượng khi tạo nhiều mã vạch trong vòng lặp. + +## Kết luận + +Bây giờ bạn đã biết cách sử dụng **c# barcode generator** để **tạo hình ảnh mã vạch databar**, **tùy chỉnh kích thước mã vạch**, và **cấu hình các tham số databar** như hàng và cột. Bằng cách điều chỉnh các thiết lập này, bạn có thể đưa mã vạch vào bất kỳ bố cục nào mà vẫn duy trì độ tin cậy khi quét. + +Tiếp theo, hãy khám phá các chủ đề liên quan như **cách tạo mã vạch** dưới dạng PDF, nhúng mã vạch vào báo cáo, hoặc chuyển sang các ký hiệu khác (QR, Code‑128, v.v.). Thử nghiệm với các giá trị `Rows`, `Columns` và độ phân giải ảnh khác nhau để tìm cấu hình tối ưu cho trường hợp sử dụng cụ thể của bạn. + +--- + + +## Bạn Nên Học Gì Tiếp Theo? + + +Các tutorial dưới đây đề cập đến 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 bao gồm các ví dụ mã đầy đủ hoạt động cùng các 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. + +- [How to Generate and Adjust Barcode Height for One-Dimensional Databar using Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Generate One-Dimensional Databar 2D Barcodes Using Aspose.BarCode .NET API](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-2d-component-configuration/) +- [Generate Aspose.BarCode Databar barcode using .NET API – Row & Column Configuration](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md b/barcode/vietnamese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md new file mode 100644 index 000000000..c207c6915 --- /dev/null +++ b/barcode/vietnamese/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/_index.md @@ -0,0 +1,219 @@ +--- +category: general +date: 2026-08-19 +description: Học cách tạo tệp PNG mã vạch trong C# và điều chỉnh chiều cao của nó, + bao gồm cách tạo hình ảnh mã vạch và thay đổi chiều cao mã vạch một cách dễ dàng. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- barcode png file +- how to generate barcode +- adjust barcode height +- change barcode height +language: vi +lastmod: 2026-08-19 +og_description: Tạo tệp PNG mã vạch bằng C# và học cách tạo hình ảnh mã vạch, điều + chỉnh chiều cao mã vạch, và thay đổi chiều cao mã vạch để quét tối ưu. +og_image_alt: barcode PNG file showing Databar OmniDirectional barcode at two heights +og_title: Tạo tệp PNG mã vạch trong C# – hướng dẫn từng bước +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate a barcode PNG file in C# and adjust its height, + covering how to generate barcode images and change barcode height easily. + headline: How to create a barcode PNG file with adjustable height in C# + type: TechArticle +- questions: + - answer: Yes. Replace `BarCodeImageFormat.Png` with `BarCodeImageFormat.Jpeg`, + `BarCodeImageFormat.Bmp`, etc. + question: Can I generate other image formats (JPEG, BMP)? + - answer: Serve the generated PNG via an HTTP endpoint or convert it to a Base64 + string and place it in an `` tag’s `src` attribute. + question: How do I embed the PNG in a web page? + - answer: 'Use `generator.Parameters.Image.BackgroundColor = Color.White;` (or any + `System.Drawing.Color`). ## Conclusion You now know how to **generate a barcode + PNG file** in C# and precisely **adjust barcode height** to meet scanning or + design requirements. By changing the `BarHeight.Pixels` property you ca' + question: Is there a way to set the background color? + type: FAQPage +tags: +- barcode +- C# +- image generation +title: Cách tạo tệp PNG mã vạch với chiều cao có thể điều chỉnh trong C# +url: /vi/python-java/general/how-to-create-a-barcode-png-file-with-adjustable-height-in-c/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cách tạo file PNG barcode với chiều cao có thể điều chỉnh trong C# + +Nếu bạn cần tạo một **file PNG barcode** trong C#, hướng dẫn này sẽ chỉ cho bạn cách thực hiện. Bạn sẽ thấy một ví dụ hoàn chỉnh, có thể chạy được, minh họa **cách tạo ảnh barcode** và **cách điều chỉnh chiều cao barcode** cho các trường hợp sử dụng khác nhau. + +Việc tạo file PNG barcode là yêu cầu phổ biến cho các hệ thống quản lý tồn kho, máy POS và bất kỳ ứng dụng nào phải in hoặc hiển thị dữ liệu có thể máy đọc được. Khi kết thúc tutorial này, bạn sẽ có thể thay đổi chiều cao barcode, lưu nhiều file PNG, và hiểu được ảnh hưởng của chiều cao đến độ tin cậy khi quét. + +## Các điều kiện tiên quyết + +Trước khi bắt đầu, hãy chắc chắn rằng bạn đã có: + +* .NET 6.0 SDK hoặc phiên bản mới hơn được cài đặt +* Visual Studio 2022 (hoặc bất kỳ IDE nào hỗ trợ .NET) +* Gói NuGet **Aspose.BarCode for .NET** (mẫu code sử dụng thư viện này) + +Bạn có thể thêm gói này từ dòng lệnh: + +```bash +dotnet add package Aspose.BarCode +``` + +> **Mẹo chuyên nghiệp:** Phiên bản dùng thử miễn phí của Aspose.BarCode hoạt động cho việc phát triển và thử nghiệm. Đối với môi trường sản xuất, hãy mua key bản quyền. + +## Cài đặt thư viện barcode + +Bước đầu tiên là tham chiếu thư viện vào dự án của bạn. Thêm các chỉ thị `using` sau vào đầu file C#: + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; +``` + +Các namespace này cung cấp quyền truy cập tới `BarcodeGenerator`, `EncodeTypes`, và `BarCodeImageFormat`. + +## Tạo file PNG barcode + +Bây giờ chúng ta sẽ tạo một thể hiện `BarcodeGenerator` sẽ xuất ra một **file PNG barcode**. Ví dụ sử dụng symbology Databar OmniDirectional, nhưng bạn có thể thay `EncodeTypes.DatabarOmniDirectional` bằng bất kỳ loại nào được hỗ trợ. + +```csharp +// Step 1: Create a DataBar Omnidirectional generator with the desired data +BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); +``` + +Chuỗi `"(01)12345678901231"` tuân theo định dạng GS1 Application Identifier cho GTIN 14 chữ số. Hãy điều chỉnh dữ liệu sao cho phù hợp với mã sản phẩm của bạn. + +## Đặt X‑dimension (tùy chọn) + +X‑dimension xác định độ rộng của một mô-đun barcode. Giá trị dựa trên pixel cho phép bạn kiểm soát kích thước ảnh một cách chính xác. + +```csharp +// Optional: Set the pixel size of the X‑dimension (module width) +barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Giá trị `2` pixel thường phù hợp cho hầu hết các màn hình. Tăng lên nếu bạn cần barcode lớn hơn khi in. + +## Điều chỉnh chiều cao barcode và lưu file PNG barcode + +Thuộc tính **BarHeight** điều khiển kích thước chiều dọc của các thanh. Thay đổi giá trị này cho phép bạn **điều chỉnh chiều cao barcode** mà không ảnh hưởng tới dữ liệu đã mã hoá. + +```csharp +// Step 2: Generate a 30‑pixel‑high barcode and save it as PNG +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 30; +barcodeGenerator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); +``` + +File `DatabarBarHeight30Pixels.png` hiện là một **file PNG barcode** có chiều cao 30 pixel. + +Để **thay đổi chiều cao barcode** và tạo ảnh thứ hai, chỉ cần gán giá trị mới và gọi lại `Save`: + +```csharp +// Step 3: Change the height to 60 pixels and save the new image +barcodeGenerator.Parameters.Barcode.BarHeight.Pixels = 60; +barcodeGenerator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); +``` + +Bây giờ bạn có hai file PNG — một có chiều cao 30 px và một còn 60 px — thể hiện cách **điều chỉnh chiều cao barcode** một cách linh hoạt. + +### Vì sao chiều cao thanh lại quan trọng + +* **Độ đọc:** Máy quét yêu cầu chiều cao tối thiểu để phát hiện chính xác. Barcode quá ngắn có thể bị bỏ lỡ, đặc biệt trên camera độ phân giải thấp. +* **Thẩm mỹ:** Điều chỉnh chiều cao barcode sao cho phù hợp với các yếu tố thiết kế xung quanh tạo ra giao diện sạch sẽ hơn. +* **Ràng buộc in:** Một số máy in nhãn có khe cố định; việc điều chỉnh chiều cao barcode giúp nó vừa vặn. + +**Thực hành tốt:** Giữ chiều cao là bội số của X‑dimension (ví dụ, 30 px khi X‑dimension là 2 px) để duy trì tỉ lệ và tránh biến dạng. + +## Ví dụ hoàn chỉnh + +Dưới đây là chương trình đầy đủ, tự chứa, bạn có thể dán vào một ứng dụng console và chạy ngay. + +```csharp +using System; +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +class Program +{ + static void Main() + { + // 1️⃣ Create the generator with Databar OmniDirectional data + BarcodeGenerator generator = new BarcodeGenerator( + EncodeTypes.DatabarOmniDirectional, "(01)12345678901231"); + + // 2️⃣ Set a reasonable X‑dimension (module width) + generator.Parameters.Barcode.XDimension.Pixels = 2; + + // 3️⃣ First height: 30 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 30; + generator.Save("DatabarBarHeight30Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 30‑pixel barcode as DatabarBarHeight30Pixels.png"); + + // 4️⃣ Second height: 60 pixels → save as PNG + generator.Parameters.Barcode.BarHeight.Pixels = 60; + generator.Save("DatabarBarHeight60Pixels.png", BarCodeImageFormat.Png); + Console.WriteLine("Saved 60‑pixel barcode as DatabarBarHeight60Pixels.png"); + } +} +``` + +**Kết quả mong đợi** + +Chạy chương trình sẽ tạo hai file trong thư mục làm việc của executable: + +* `DatabarBarHeight30Pixels.png` – file PNG barcode cao 30 pixel +* `DatabarBarHeight60Pixels.png` – file PNG barcode cao 60 pixel + +Mở bất kỳ file PNG nào bằng trình xem ảnh; bạn sẽ thấy một barcode Databar OmniDirectional rõ ràng, sẵn sàng để quét. + +## Các trường hợp đặc biệt và khắc phục sự cố + +| Tình huống | Kiểm tra | Giải pháp đề xuất | +|-----------|----------|-------------------| +| Barcode bị mờ | X‑dimension quá thấp so với chiều cao đã chọn | Tăng `XDimension.Pixels` (ví dụ, từ 2 lên 3) | +| Máy quét không nhận barcode thấp | Chiều cao dưới mức tối thiểu của máy quét | Đặt `BarHeight.Pixels` ít nhất 30 px (hoặc theo thông số máy quét) | +| File PNG rỗng hoặc hỏng | Đường dẫn xuất không hợp lệ hoặc không có quyền ghi | Dùng đường dẫn tuyệt đối hoặc đảm bảo ứng dụng có quyền ghi | +| Cần symbology khác | `EncodeTypes` hiện tại không phù hợp | Thay `EncodeTypes.DatabarOmniDirectional` bằng giá trị enum khác (ví dụ, `EncodeTypes.Code128`) | + +## Câu hỏi thường gặp + +**H: Tôi có thể tạo các định dạng ảnh khác (JPEG, BMP) không?** +Đ: Có. Thay `BarCodeImageFormat.Png` bằng `BarCodeImageFormat.Jpeg`, `BarCodeImageFormat.Bmp`, v.v. + +**H: Làm sao để nhúng PNG vào trang web?** +Đ: Phục vụ PNG đã tạo qua một endpoint HTTP hoặc chuyển nó thành chuỗi Base64 và đặt vào thuộc tính `src` của thẻ ``. + +**H: Có cách nào đặt màu nền không?** +Đ: Dùng `generator.Parameters.Image.BackgroundColor = Color.White;` (hoặc bất kỳ `System.Drawing.Color` nào). + +## Kết luận + +Bây giờ bạn đã biết cách **tạo file PNG barcode** trong C# và **điều chỉnh chiều cao barcode** một cách chính xác để đáp ứng yêu cầu quét hoặc thiết kế. Bằng cách thay đổi thuộc tính `BarHeight.Pixels` bạn có thể **thay đổi chiều cao barcode** ngay lập tức và tạo ra nhiều tài sản PNG từ cùng một mã nguồn. + +Tiếp theo, khám phá các tùy chỉnh khác như màu foreground, lề, và thêm văn bản có thể đọc được bằng người. Bạn cũng có thể thử các symbology khác (`EncodeTypes.Code128`, `EncodeTypes.QR`) để mở rộng phạm vi dữ liệu có thể mã hoá. + +Chúc lập trình vui vẻ, và hy vọng barcode của bạn luôn được quét thành công ngay lần đầu! + +## 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ẽ, 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ụ code hoàn chỉnh với 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. + +- [Cách tạo và điều chỉnh chiều cao Barcode cho Databar một chiều bằng Aspose.BarCode for .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Cách tạo Barcode - Các loại Barcode một chiều](/barcode/english/net/one-dimensional-barcode-types/) +- [Cách tạo barcode Aztec với tỷ lệ khung tùy chỉnh bằng 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/vietnamese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md b/barcode/vietnamese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md new file mode 100644 index 000000000..2f52a0aad --- /dev/null +++ b/barcode/vietnamese/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/_index.md @@ -0,0 +1,157 @@ +--- +category: general +date: 2026-08-19 +description: Tạo tệp PNG databar trong C# với Aspose.BarCode. Tìm hiểu cách tạo hình + ảnh databar, cấu hình các tham số databar và lưu đầu ra PNG. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create databar png +- how to generate databar +- configure databar parameters +language: vi +lastmod: 2026-08-19 +og_description: Tạo các tệp PNG databar trong C# bằng Aspose.BarCode. Hướng dẫn này + sẽ chỉ cho bạn cách tạo hình ảnh databar, cấu hình các tham số databar như kích + thước X và tỷ lệ khung hình, và lưu các tệp PNG chất lượng cao để in hoặc sử dụng + trên web. +og_image_alt: create databar PNG example +og_title: Tạo hình ảnh PNG dạng databar trong C# – hướng dẫn từng bước +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Create databar PNG files in C# with Aspose.BarCode. Learn how to generate + databar images, configure databar parameters, and save PNG output. + headline: How to create databar PNG images with C# and Aspose.BarCode + type: TechArticle +tags: +- barcode +- databar +- C# +- PNG +- Aspose.BarCode +title: Cách tạo hình ảnh PNG dạng databar bằng C# và Aspose.BarCode +url: /vi/python-java/general/how-to-create-databar-png-images-with-c-and-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cách tạo hình ảnh databar PNG với C# và Aspose.BarCode + +Nếu bạn cần **tạo databar PNG** trong một ứng dụng .NET, hướng dẫn này sẽ chỉ cho bạn cách thực hiện. Bạn sẽ thấy một ví dụ đầy đủ, có thể chạy được, tạo ra các mã DataBar xếp chồng omnidirectional, cấu hình các tham số chính, và lưu hai tệp PNG với tỷ lệ khung hình khác nhau. + +Việc tạo hình ảnh DataBar không chỉ đơn giản là gọi một phương thức duy nhất. Bạn cũng phải **cấu hình các tham số databar** như X‑dimension (độ rộng mô-đun) và tỷ lệ khung hình để đáp ứng các yêu cầu in ấn hoặc quét. Khi kết thúc tutorial này, bạn sẽ hiểu **cách tạo đồ họa databar** hoạt động đáng tin cậy trong các tình huống thực tế. + +## Yêu cầu trước + +- .NET 6.0 trở lên (mã cũng hoạt động với .NET Framework 4.7+) +- Visual Studio 2022 hoặc bất kỳ IDE nào hỗ trợ C# +- Giấy phép hợp lệ cho **Aspose.BarCode for .NET** (phiên bản dùng thử miễn phí hoạt động để thử nghiệm) +- Kiến thức cơ bản về cú pháp C# + +> **Mẹo chuyên nghiệp:** Nếu bạn chưa có giấy phép, bạn có thể yêu cầu một khóa đánh giá tạm thời từ cổng thông tin Aspose. API hoạt động như bình thường; chỉ có watermark thay đổi. + +## Bước 1: Cài đặt gói NuGet Aspose.BarCode + +Mở dự án của bạn trong Visual Studio, nhấp chuột phải vào solution và chọn **Manage NuGet Packages**. Tìm kiếm `Aspose.BarCode` và cài đặt phiên bản ổn định mới nhất. + +```bash +dotnet add package Aspose.BarCode +``` + +Lệnh này sẽ thêm assembly `Aspose.BarCode` vào dự án của bạn và cho phép sử dụng lớp `BarcodeGenerator`. + +## Bước 2: Khởi tạo trình tạo mã vạch cho DataBar xếp chồng omnidirectional + +Constructor của `BarcodeGenerator` nhận hai đối số: loại mã vạch và chuỗi dữ liệu thô. Đối với DataBar xếp chồng omnidirectional, bạn sử dụng `EncodeTypes.DatabarStackedOmniDirectional`. + +```csharp +using Aspose.BarCode.Generation; +using Aspose.BarCode; + +namespace DatabarPngDemo +{ + class Program + { + static void Main(string[] args) + { + // Step 2: Initialize the generator with the desired DataBar type + BarcodeGenerator barcodeGenerator = new BarcodeGenerator( + EncodeTypes.DatabarStackedOmniDirectional, + "(01)12345678901231"); // GS1 Application Identifier for a 14‑digit GTIN +``` + +**Tại sao điều này quan trọng:** Hằng số `EncodeTypes.DatabarStackedOmniDirectional` thông báo cho thư viện tạo ra một mã vạch có thể đọc được từ bất kỳ hướng nào, rất phù hợp cho nhãn kệ bán lẻ. + +## Bước 3: Cấu hình X‑dimension (độ rộng mô-đun) bằng pixel + +X‑dimension kiểm soát kích thước của phần tử thanh nhỏ nhất. Đặt giá trị bằng pixel cho phép bạn kiểm soát chính xác kích thước hình ảnh cuối cùng. + +```csharp + // Step 3: Define the X‑dimension (module width) in pixels + barcodeGenerator.Parameters.Barcode.XDimension.Pixels = 2; +``` + +Giá trị **2 pixel** là sự cân bằng tốt giữa khả năng đọc và độ gọn cho hầu hết các máy in nhãn. Điều chỉnh giá trị này nếu bạn cần mô-đun lớn hơn hoặc nhỏ hơn. + +## Bước 4: Đặt tỷ lệ khung hình đầu tiên và lưu PNG + +Tỷ lệ khung hình ảnh hưởng đến chiều cao của DataBar xếp chồng. Tỷ lệ **15** tạo ra một mã vạch tương đối ngắn, trong khi **30** làm nó cao hơn. + +```csharp + // Step 4: Set an aspect ratio of 15 and save the image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 15; + barcodeGenerator.Save("DatabarAspectRatio15.png", BarCodeImageFormat.Png); +``` + +Phương thức `Save` ghi mã vạch đã tạo ra vào tệp PNG. PNG là định dạng không mất dữ liệu, giữ được các cạnh sắc nét cần thiết cho máy quét mã vạch. + +## Bước 5: Thay đổi tỷ lệ khung hình và lưu PNG thứ hai + +Bạn có thể tái sử dụng cùng một đối tượng `BarcodeGenerator` để tạo các biến thể chỉ bằng cách thay đổi tỷ lệ khung hình. + +```csharp + // Step 5: Change the aspect ratio to 30 and save a new image + barcodeGenerator.Parameters.Barcode.DataBar.AspectRatio = 30; + barcodeGenerator.Save("DatabarAspectRatio30.png", BarCodeImageFormat.Png); + } + } +} +``` + +Bây giờ bạn có hai tệp PNG—`DatabarAspectRatio15.png` và `DatabarAspectRatio30.png`—mỗi tệp có mật độ hình ảnh khác nhau. + +## Bước 6: Kiểm tra kết quả + +Mở các tệp PNG đã tạo trong bất kỳ trình xem ảnh nào. Bạn sẽ thấy một mã DataBar sạch sẽ, độ tương phản cao. Quét các hình ảnh bằng ứng dụng quét mã vạch trên điện thoại thông minh xác nhận rằng cả hai tỷ lệ khung hình đều giải mã được giá trị GTIN gốc `12345678901231`. + +![create databar PNG example](databar_example.png) + +*Hình ảnh trên hiển thị hai tệp PNG cạnh nhau. Hình bên trái sử dụng tỷ lệ 15, hình bên phải sử dụng tỷ lệ 30.* + +## Các biến thể phổ biến và trường hợp biên + +| Scenario | What to change | Reason | +|----------|----------------|--------| +| **Dữ liệu khác** | Thay thế chuỗi `(01)12345678901231` bằng bất kỳ GS1 Application Identifier và dữ liệu hợp lệ nào | Cho phép bạn mã hoá ID sản phẩm, số serial, v.v. | +| **Độ phân giải cao hơn** | Tăng `XDimension.Pixels` lên 3 hoặc 4 | Cần thiết khi mã vạch sẽ được in ở kích thước lớn hoặc quét từ khoảng cách xa. | +| **Các loại DataBar khác** | Sử dụng `EncodeTypes.DatabarStacked` hoặc `EncodeTypes.DatabarExpanded` | Chọn loại phù hợp nhất với bố cục nhãn của bạn. | +| **Nền trong suốt** | Truyền `BarCodeImageFormat.Png` cùng với `barcodeGenerator.Save(..., BarCodeImageFormat.Png, new ImageOptions { BackgroundColor = Color.Transparent })` | Hữu ích khi đặt mã vạch lên nhãn màu. | + +> **Cẩn thận:** Đặt X‑dimension quá nhỏ (< 1 pixel) có thể tạo ra mã vạch bị mờ sau + +## Bạn nên học gì tiếp theo? + +Các tutorial 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 được 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 đủ, có hướng dẫn 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 và điều chỉnh chiều cao mã vạch One-Dimensional Databar bằng Aspose.BarCode cho .NET](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-barcode-height-adjustment/) +- [Tạo mã One-Dimensional Databar GS1 Encoding với Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-gs1-encoding/) +- [Tạo mã Databar Aspose.BarCode bằng .NET API – Cấu hình hàng & cột](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-databar-row-column-configuration/) + +{{< /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/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md b/barcode/vietnamese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md new file mode 100644 index 000000000..819086991 --- /dev/null +++ b/barcode/vietnamese/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/_index.md @@ -0,0 +1,212 @@ +--- +category: general +date: 2026-08-19 +description: Học cách tạo mã vạch bưu chính trong C# bằng Aspere.BarCode. Hướng dẫn + từng bước này chỉ ra cách tạo mã vạch cho các định dạng Planet và RM4SCC. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- generate postal barcode +- how to generate barcode +language: vi +lastmod: 2026-08-19 +og_description: Tạo mã vạch bưu chính trong C# với Aspose.BarCode. Hãy theo hướng + dẫn này để học cách tạo mã vạch cho Planet và RM4SCC với kích thước tùy chỉnh. +og_image_alt: Generated postal barcode image using Aspose.BarCode +og_title: Tạo mã vạch bưu chính trong C# – hướng dẫn đầy đủ Aspose.BarCode +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + headline: How to generate postal barcode in C# with Aspose.BarCode + type: TechArticle +- description: Learn how to generate postal barcode in C# using Aspere.BarCode. This + step‑by‑step guide shows how to generate barcode for Planet and RM4SCC formats. + name: How to generate postal barcode in C# with Aspose.BarCode + steps: + - name: Create a Planet barcode (automatic height) + text: Planet is a postal barcode used in many countries for mail sorting. When + you create a Planet barcode, the library automatically determines the optimal + bar height based on the encoded data. + - name: Create an RM4SCC barcode with explicit height + text: RM4SCC is another postal symbology that often requires a specific bar height + for scanner compatibility. The following code shows how to set that height manually. + - name: Verify the output + text: 'After running the program, open the two PNG files located in `YOUR_DIRECTORY`. + You should see two distinct barcodes:' + type: HowTo +tags: +- barcode +- Aspose.BarCode +- C# +title: Cách tạo mã vạch bưu chính trong C# bằng Aspose.BarCode +url: /vi/python-java/general/how-to-generate-postal-barcode-in-c-with-aspose-barcode/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cách tạo mã vạch bưu chính trong C# với Aspose.BarCode + +Nếu bạn cần **tạo mã vạch bưu chính** cho các ứng dụng gửi thư, hướng dẫn này sẽ chỉ cho bạn cách tạo mã vạch bằng thư viện Aspose.BarCode. Bạn sẽ thấy một ví dụ hoàn chỉnh, có thể chạy được, tạo cả mã vạch Planet (chiều cao được tính tự động) và mã vạch RM4SCC với chiều cao thanh được chỉ định rõ ràng. + +Việc tạo mã vạch bưu chính là yêu cầu phổ biến cho phần mềm logistics, máy in nhãn tự động và hệ thống gửi thư hàng loạt. Khi kết thúc tutorial này, bạn sẽ có thể tích hợp việc tạo mã vạch vào bất kỳ dự án .NET nào, tùy chỉnh kích thước X‑dimension và kiểm soát chiều cao thanh khi định dạng chuẩn cho phép. + +**Bạn sẽ học được** + +* Cách thiết lập Aspose.BarCode trong dự án C#. +* Cách tạo mã vạch Planet và RM4SCC cho bưu chính. +* Cách điều chỉnh X‑dimension (độ rộng mô-đun) và chiều cao thanh. +* Cách lưu kết quả dưới dạng ảnh PNG. + +Không cần dịch vụ bên ngoài—tất cả chạy cục bộ sau khi bạn tham chiếu gói Aspose.BarCode NuGet. + +## Yêu cầu trước + +* .NET 6.0 SDK hoặc mới hơn (mã cũng hoạt động với .NET Framework 4.7+). +* Visual Studio 2022, Visual Studio Code, hoặc bất kỳ IDE C# nào bạn thích. +* Gói Aspose.BarCode for .NET – cài đặt qua NuGet: + +```bash +dotnet add package Aspose.BarCode +``` + +## Tạo mã vạch bưu chính với Aspose.BarCode + +Các phần sau sẽ hướng dẫn bạn từng bước, từ tạo đối tượng tạo mã đến lưu các tệp PNG cuối cùng. + +### Bước 1: Tạo mã vạch Planet (chiều cao tự động) + +Planet là một mã vạch bưu chính được dùng ở nhiều quốc gia để phân loại thư. Khi bạn tạo mã vạch Planet, thư viện sẽ tự động xác định chiều cao thanh tối ưu dựa trên dữ liệu đã mã hoá. + +```csharp +using Aspose.BarCode.Generation; + +// Create a Planet barcode generator with the data you want to encode. +BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + +// Define the X‑dimension (module width) in pixels. A value of 4 pixels is a good default. +planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + +// Save the barcode as a PNG image. The height is calculated automatically. +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); +``` + +**Tại sao cách này hoạt động** – `EncodeTypes.Planet` báo cho Aspose.BarCode sử dụng ký hiệu Planet. Thuộc tính `XDimension` điều khiển độ rộng của thanh nhỏ nhất (mô-đun). Vì Planet không yêu cầu chiều cao thanh cố định, thư viện sẽ tự tính chiều cao phù hợp, giúp code ngắn gọn hơn. + +### Bước 2: Tạo mã vạch RM4SCC với chiều cao cụ thể + +RM4SCC là một ký hiệu bưu chính khác thường yêu cầu chiều cao thanh nhất định để tương thích với máy quét. Đoạn code dưới đây cho thấy cách đặt chiều cao đó một cách thủ công. + +```csharp +// Create an RM4SCC barcode generator. +BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + +// Set the X‑dimension (module width) and the desired bar height in pixels. +rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; +rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + +// Save the barcode as a PNG image. +rm4sccGenerator.Save("YOUR_DIRECTORY/PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); +``` + +**Tại sao bạn cần đặt chiều cao** – Một số máy quét bưu chính yêu cầu chiều cao tối thiểu. Bằng cách gán `BarHeight.Pixels = 100`, bạn đảm bảo hình ảnh tạo ra đáp ứng yêu cầu này. X‑dimension vẫn giữ nhất quán với mã vạch Planet để cả hai ảnh có mật độ hình ảnh tương đồng. + +### Bước 3: Kiểm tra kết quả + +Sau khi chạy chương trình, mở hai tệp PNG nằm trong `YOUR_DIRECTORY`. Bạn sẽ thấy hai mã vạch riêng biệt: + +* `PostalPlanetBarHeightNone.png` – mã vạch Planet với chiều cao được tính tự động. +* `PostalRM4SCCBarHeight100Pixels.png` – mã vạch RM4SCC với chiều cao thanh 100 pixel. + +Cả hai ảnh đều có thể được gửi trực tiếp tới máy in nhãn hoặc hiển thị trong ứng dụng web. + +![Hình ảnh mã vạch bưu chính được tạo bằng Aspose.BarCode](generated-postal-barcode.png) + +*Văn bản thay thế hình ảnh:* **Generated postal barcode** image using Aspose.BarCode (minh họa cách tạo mã vạch bưu chính). + +## Cách tạo mã vạch với kích thước tùy chỉnh (nâng cao) + +Nếu bạn cần tinh chỉnh các tham số khác—như lề, vị trí văn bản, hoặc màu sắc—Aspose.BarCode cung cấp một đối tượng `Parameters` phong phú. Dưới đây là ví dụ nhanh thêm nền trắng và tắt văn bản có thể đọc được bởi con người. + +```csharp +planetGenerator.Parameters.Barcode.BackColor = System.Drawing.Color.White; +planetGenerator.Parameters.Barcode.CodeTextVisible = false; +planetGenerator.Save("YOUR_DIRECTORY/PostalPlanetNoText.png", BarCodeImageFormat.Png); +``` + +**Khi nào nên dùng** – Tắt văn bản có thể đọc được thường được áp dụng cho việc phân loại tự động, nơi chỉ cần mẫu máy đọc. Đặt màu nền giúp mã vạch in đúng trên vật liệu trong suốt. + +## Những lỗi thường gặp và mẹo chuyên nghiệp + +| Vấn đề | Nguyên nhân | Cách khắc phục | +|-------|------------|----------------| +| Mã vạch bị kéo dài | X‑dimension quá lớn so với kích thước ảnh | Giữ `XDimension.Pixels` trong khoảng 2 đến 5 cho hầu hết các mã vạch bưu chính | +| Máy quét từ chối ảnh | Chiều cao thanh dưới mức tối thiểu yêu cầu của dịch vụ bưu chính | Dùng `BarHeight.Pixels` ≥ 80 cho RM4SCC trừ khi tiêu chuẩn quy định khác | +| Kích thước tệp PNG lớn | Độ phân giải ảnh cao hơn mức cần thiết | Lưu dưới dạng PNG‑8 (`BarCodeImageFormat.Png8`) hoặc giảm kích thước pixel | + +**Mẹo pro:** Luôn kiểm tra mã vạch đã tạo bằng máy quét thực tế trước khi đưa vào môi trường sản xuất. Những khác biệt nhỏ về hình ảnh có thể ảnh hưởng đến khả năng đọc. + +## Toàn bộ mã nguồn + +Sao chép toàn bộ khối dưới đây vào một ứng dụng console mới (`Program.cs`). Điều chỉnh đường dẫn xuất ra tới thư mục mà tiến trình của bạn có quyền ghi. + +```csharp +using System; +using Aspose.BarCode.Generation; + +class Program +{ + static void Main() + { + // ------------------------------ + // Generate Planet barcode (auto height) + // ------------------------------ + BarcodeGenerator planetGenerator = new BarcodeGenerator(EncodeTypes.Planet, "123456"); + planetGenerator.Parameters.Barcode.XDimension.Pixels = 4; + planetGenerator.Save("PostalPlanetBarHeightNone.png", BarCodeImageFormat.Png); + + // ------------------------------ + // Generate RM4SCC barcode (explicit height) + // ------------------------------ + BarcodeGenerator rm4sccGenerator = new BarcodeGenerator(EncodeTypes.RM4SCC, "123456"); + rm4sccGenerator.Parameters.Barcode.XDimension.Pixels = 4; + rm4sccGenerator.Parameters.Barcode.BarHeight.Pixels = 100; + rm4sccGenerator.Save("PostalRM4SCCBarHeight100Pixels.png", BarCodeImageFormat.Png); + + Console.WriteLine("Barcodes generated successfully."); + } +} +``` + +Chạy chương trình sẽ in *“Barcodes generated successfully.”* và tạo hai tệp PNG trong thư mục làm việc của thực thi. + +## Kết luận + +Bây giờ bạn đã biết cách **tạo mã vạch bưu chính** trong C# với Aspose.BarCode, bao gồm cả mã vạch Planet với chiều cao tự động và mã vạch RM4SCC với chiều cao cố định. Hướng dẫn cũng đã chỉ ra **cách tạo mã vạch** với X‑dimension, chiều cao thanh và các tùy chọn hiển thị tùy chỉnh, cung cấp nền tảng vững chắc cho bất kỳ dự án tự động gửi thư nào. + +Các bước tiếp theo bạn có thể khám phá: + +* Tích hợp các PNG đã tạo vào hoá đơn PDF bằng Aspose.PDF. +* Chuyển định dạng xuất sang SVG để có đồ họa vector có thể mở rộng. +* Sử dụng lớp `BarcodeReader` để xác minh dữ liệu đã mã hoá một cách lập trình. + +Hãy thoải mái thử nghiệm các ký hiệu khác (ví dụ, `EncodeTypes.Postnet`) và chia sẻ kết quả của bạn với cộng đồng. Chúc lập trình vui vẻ! + + +## 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ẽ, 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 bao gồm các ví dụ mã đầy đủ, kèm theo 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. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode – Code 39 Configuration with Aspose.BarCode](/barcode/english/net/one-dimensional-barcode-types/one-dimensional-code-39-configuration/) +- [How to Generate DataMatrix Barcodes (ECC 200) with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-ecc-200-configuration/) + +{{< /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