$npx -y skills add DevExpress/agent-skills --skill devexpress-office-file-api-barcodeBuild .NET applications with the DevExpress Barcode Generation API for generating barcode images programmatically. Use when generating QR codes, Data Matrix, Code 128, EAN, UPC, PDF417, Aztec, GS1 barcodes, or any 1D/2D barcode type. Also use when someone mentions "DevExpress Bar
| 1 | # DevExpress Barcode Generation API |
| 2 | |
| 3 | The Barcode Generation API is a non-visual .NET library for generating barcode images programmatically. It supports over 30 barcode symbologies — 1D and 2D — and can export barcode images to PNG, BMP, JPEG, TIFF, GIF, and PDF formats. The primary namespace is `DevExpress.Docs.Barcode`; a legacy namespace `DevExpress.BarCodes` is also available but is not recommended for new development. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Use this skill when you need to: |
| 8 | |
| 9 | - Generate QR Code images from URLs, text, or binary data |
| 10 | - Generate Data Matrix barcodes for product labeling or manufacturing |
| 11 | - Generate PDF417 barcodes for transport, ID cards, and inventory |
| 12 | - Generate Aztec Code barcodes for ticketing and logistics |
| 13 | - Generate EAN-13, EAN-8, UPC-A, or UPC-E barcodes for retail |
| 14 | - Generate GS1 QR Code or GS1 Data Matrix for GS1-compliant workflows |
| 15 | - Generate EPC QR Codes for SEPA credit transfers |
| 16 | - Generate Code 128, Code 39, or Code 93 linear barcodes |
| 17 | - Export barcode images to PNG, BMP, JPEG, TIFF, GIF, or PDF |
| 18 | - Customize barcode appearance (colors, module size, DPI, quiet zone, border) |
| 19 | - Display or embed barcodes in ASP.NET, Blazor, WinForms, WPF, or MAUI apps |
| 20 | |
| 21 | ## Prerequisites & Installation |
| 22 | |
| 23 | ### NuGet Packages |
| 24 | |
| 25 | | Package | Purpose | |
| 26 | |---------|---------| |
| 27 | | `DevExpress.Document.Processor` | Full Office File API suite (includes `DevExpress.Docs.Barcode`) | |
| 28 | | `DevExpress.Docs.Barcode` | Barcode-only package — use when you don't need Word/Excel/PDF APIs | |
| 29 | |
| 30 | ### .NET (8/9/10+) |
| 31 | |
| 32 | ```bash |
| 33 | # Full Office File API (recommended if you also use Word, Excel, or PDF) |
| 34 | dotnet add package DevExpress.Document.Processor |
| 35 | |
| 36 | # Barcode-only (smaller footprint) |
| 37 | dotnet add package DevExpress.Docs.Barcode |
| 38 | ``` |
| 39 | |
| 40 | ### .NET Framework (4.6.2+) |
| 41 | |
| 42 | ``` |
| 43 | Install-Package DevExpress.Document.Processor |
| 44 | # or for barcode-only: |
| 45 | Install-Package DevExpress.Docs.Barcode |
| 46 | ``` |
| 47 | |
| 48 | **Important**: All DevExpress packages in a project must share the same version number. A valid DevExpress license is required. |
| 49 | |
| 50 | ### Non-Windows Development (Linux, macOS, Docker, Cloud) |
| 51 | |
| 52 | Barcode image export (`ExportToImage`, `DXImage`) uses the same platform-specific drawing engine as the rest of Office File API: GDI+ on Windows, SkiaSharp elsewhere. The SkiaSharp-based engine is enabled **automatically** on non-Windows platforms. |
| 53 | |
| 54 | See [references/getting-started.md](references/getting-started.md#non-windows-platform-support-linux-macos-docker-cloud) for the full non-Windows setup and troubleshooting guide. |
| 55 | |
| 56 | ## Before You Start — Ask the Developer |
| 57 | |
| 58 | If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's `AskUserQuestion` tool or GitHub Copilot's `askQuestions` tool. If no such tool is available, ask the questions directly in the chat response before generating code. |
| 59 | |
| 60 | Before generating code, ask these questions to avoid rework: |
| 61 | |
| 62 | ### General Questions |
| 63 | 1. **Target framework**: Are you using .NET 8+ or .NET Framework 4.x? |
| 64 | 2. **New or existing project?**: Are you creating a new project or adding to an existing one? |
| 65 | 3. **Hosting model**: Console app, ASP.NET Core, Blazor, MAUI, WinForms, WPF, or something else? |
| 66 | |
| 67 | ### Barcode-Specific Questions |
| 68 | 4. **Barcode type**: QR Code / Data Matrix / Code 128 / EAN-13 / UPC-A / PDF417 / Aztec / GS1 / other? |
| 69 | 5. **Output format**: Save as PNG/BMP/JPEG/TIFF image file / get as Stream / embed in Word/Excel/PDF document? |
| 70 | 6. **Special requirements**: GS1 encoding / EPC QR Code / quiet zone size / module size / colors / human-readable text? |
| 71 | |
| 72 | > **Rule**: If the developer's answer is ambiguous or missing, ask before generating code. Do not guess. |
| 73 | |
| 74 | ## Component Overview |
| 75 | |
| 76 | The Barcode Generation API provides: |
| 77 | |
| 78 | - **Barcode creation**: Instantiate `BarcodeGenerator` with a symbology-specific options object (`QRCodeOptions`, `Code128Options`, `DataMatrixOptions`, etc.) |
| 79 | - **Common options**: Configure appearance and layout via `BarcodeOptions` properties (colors, DPI, module size, rotation, border, text) |
| 80 | - **Symbology-specific options**: Each barcode type exposes its own options class with symbology-specific properties |
| 81 | - **Export**: Write to `Stream` as image or PDF, or get a `DXImage` object, via `BarcodeGenerator.Export()`, `ExportToImage()`, `ExportToPdf()` |
| 82 | - **Fluent API**: Some symbologies expose |