Streaming EAN-13 Image into Your ASP.NET Web Pages
- Under downloaded trial package, copy barcode folder and its contents to your IIS, and create a new virtual directory, named "barcode".
- Restart IIS, navigate to http://YourDomain:Port/barcode/linear.aspx?DATA=012345678912&TYPE=15.
- To create barcode image in html or aspx pages, you can insert a image tag (img) into your web pages.
For example, <img src="http://YourDomain:Port/barcode/linear.aspx?DATA=012345678912&TYPE=15" />
Generate EAN-13 into Your ASP.NET Web Forms
- Install ASP.NET Barcode Generator Control.
- Add ASP.NET Barcode Generator Control to your Visual Studio ToolBox.
- Copy "linear.aspx" and "linear.aspx.cs" to the folder where your aspx pages are generating barcodes.
- Drag and drop "LinearWebForm" to your ASPX web forms.
- Run the website to view the barcodes generated. To customize EAN-13 settings, view EAN-13 barcode settings.
Generate EAN-13 Barcodes in ASP.NET Class
If you need generate EAN-13 barcodes in your ASP.NET class using C# or VB.NET, we provides complete barcode generation source code for EAN-13 in C# and EAN-13 in VB.NET.
EAN-13 Barcode Add-on Symbol in ASP.NET
EAN‑13 supports optional 2‑digit or 5‑digit add‑on symbols (used for coupons, weight, or price).
The add‑on appears after the main barcode's quiet zone.
- Set Type to BarcodeType.EAN13_2 (2 digits) or EAN13_5 (5 digits)
- Set main data in Data
- Set add‑on data in SupData
EAN-13 Human Readable Text (HRI) Customization
GS1 standard recommends OCR‑B font for EAN‑13 text display. You can customize font, size, and spacing in ASP.NET.
Note: If OCR‑B is not installed on the Hosting server, the barcode library will use a default font to render text. Include the font in your ASP.NET Publish package.
- TextFont: Set font to OCR‑B
- TextMargin: Space between bars and text (minimum 0.5X, recommended 1X)
Note: If OCR‑B is not installed on the Hosting server, the barcode library will use a default font to render text. Include the font in your ASP.NET Publish package.
Advanced EAN-13 Customization in ASP.NET
You can enhance EAN‑13 barcodes for better readability and compliance in your ASP.NET application.
Quiet Zone Indicator
Control the quiet zone marker visibility:
barcode.ShowQuietZoneIndicator = false;
barcode.ShowQuietZoneIndicator = false;
First & Last Digit Spacing
Adjust spacing for better scanning:
barcode.UPCEANLeadDigitSpace = 10;
barcode.UPCEANTrailDigitSpace = 10;
These settings are often used in ASP.NET View Component or Partial View for retail dashboards.
barcode.UPCEANLeadDigitSpace = 10;
barcode.UPCEANTrailDigitSpace = 10;
These settings are often used in ASP.NET View Component or Partial View for retail dashboards.
Summary
This guide follows enterprise ASP.NET best practices and integrates natively with MVC, Razor Pages, Web API, and Blazor.
Key Topics:
Key Topics:
- Supports 12/13 digit input with automatic check‑digit calculation
- Supports 2‑digit and 5‑digit retail add‑on symbols
- Fully customizable text, font, margins, and spacing
- Advanced properties for quiet zone and digit layout
- Compatible with Kestrel, IIS, Production Environment, and Deployment pipelines
