Skip to content

Commit e8b4281

Browse files
committed
Merge branch 'EJ2-897352-UgRedisMDocs' of https://github.com/syncfusion-content/ej2-asp-core-mvc-docs into EJ2-897352-UgRedisMDocs
2 parents e513f0d + fa117f4 commit e8b4281

File tree

20 files changed

+1572
-29
lines changed

20 files changed

+1572
-29
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
3+
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
4+
platform: ej2-asp-core-mvc
5+
documentation: ug
6+
---
7+
8+
# Essential Studio for ##Platform_Name## Release Notes
9+
10+
{% include release-info.html date="July 30, 2024" version="v26.2.7" %}
11+
12+
{% directory path: _includes/release-notes/v26.2.7 %}
13+
14+
{% include {{file.url}} %}
15+
16+
{% enddirectory %}
2.67 KB
Loading

ej2-asp-core-mvc/barcode/qrcodegenerator.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,29 +88,46 @@ The dimension of the QR Code can be changed using the height and width propertie
8888
{% endif %}
8989

9090

91+
## Enhancing QR Codes with Icons
9192

92-
## Customizing the text
93+
The EJ2 Barcode Generator allows you to add a [`logo`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.BarcodeGenerator.QRCodeGenerator.html#Syncfusion_EJ2_BarcodeGenerator_QRCodeGenerator_Logo) or icon to your QR codes, enhancing their visual appeal, clarity, and even security. Adding a recognizable icon can make it easier for users to identify the source and help prevent tampering.
9394

94-
In QR Code generators, you can customize the QR Code text by using display text property.
95+
### Supported Image Sources
96+
97+
The `imageSource` property of the `QRCodeLogo` class supports the following image sources:
98+
99+
- **Local image path**: Specify the path to the image file relative to your project's root directory (e.g., `images/syncfusion.png`) or as an absolute path (e.g., `/assets/icons/logo.svg`).
100+
- **Remote image URL**: Provide the web address of the image file (e.g., `https://example.com/image.jpg`).
101+
- **Base64 encoded image data**: Embed the image data directly in the code using a Base64-encoded string (e.g., `data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...`).
102+
103+
### Logo Dimensions
104+
105+
The `width` and `height` properties of the `QRCodeLogo` class define the dimensions of the logo in pixels. If not specified, both default to 30% of the QR code’s size. The maximum allowed size is 30% of the QR code’s dimensions to ensure optimal readability.
106+
107+
**Note:** Always test the readability of your QR code after adding a logo. Depending on the logo size and QR code content, you might need to adjust the [`errorCorrectionLevel`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.BarcodeGenerator.ErrorCorrectionLevel.html) property of the `QRCodeGenerator` to `"Medium"` or `"High"` for better reliability.
108+
109+
The following image illustrates QR code with logo:
110+
111+
![logo](images/logo.png)
95112

96113
{% if page.publishingplatform == "aspnet-core" %}
97114

98115
{% tabs %}
99116
{% highlight cshtml tabtitle="CSHTML" %}
100-
{% include code-snippet/barcode/qrcode/text/tagHelper %}
117+
{% include code-snippet/barcode/qrcode/logo/tagHelper %}
101118
{% endhighlight %}
102119
{% endtabs %}
103120

104121
{% elsif page.publishingplatform == "aspnet-mvc" %}
105122

106123
{% tabs %}
107124
{% highlight razor tabtitle="CSHTML" %}
108-
{% include code-snippet/barcode/qrcode/text/razor %}
125+
{% include code-snippet/barcode/qrcode/logo/razor %}
109126
{% endhighlight %}
110-
{% highlight c# tabtitle="Text.cs" %}
111-
{% include code-snippet/barcode/qrcode/text/text.cs %}
127+
{% highlight c# tabtitle="Logo.cs" %}
128+
{% include code-snippet/barcode/qrcode/logo/logo.cs %}
112129
{% endhighlight %}
113130
{% endtabs %}
114131
{% endif %}
115132

116-
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Barcode/QRCodeandDataMatrixSample).
133+
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Barcode/QRCodeandDataMatrixSample).
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System.Collections.Generic;
2+
using System.Linq;
3+
using System.Web;
4+
using System.Web.Mvc;
5+
using Syncfusion.EJ2.BarcodeGenerator;
6+
7+
namespace EJ2CoreSampleBrowser.Controllers.Barcode
8+
{
9+
public partial class BarcodeController : Controller
10+
{
11+
12+
public ActionResult qrcode()
13+
{
14+
15+
return View();
16+
}
17+
}
18+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@(Html.EJS().QRCodeGenerator("container").
2+
Width("200px").
3+
mode=("SVG").
4+
Height("150px").
5+
logo(s => s.imageSource("https://www.syncfusion.com/web-stories/wp-content/uploads/sites/2/2022/02/cropped-Syncfusion-logo.png")).
6+
Value("SYNCFUSION").Render() )
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<ejs-qrcodegenerator id="container" width="200px" height="150px" mode="SVG" value="Syncfusion">
2+
<e-qrcodegenerator-logo imageSource="https://www.syncfusion.com/web-stories/wp-content/uploads/sites/2/2022/02/cropped-Syncfusion-logo.png"></e-qrcodegenerator-logo>
3+
</ejs-qrcodegenerator>

0 commit comments

Comments
 (0)