Skip to content

Commit 39f00d1

Browse files
Merge pull request #4567 from syncfusion-content/ES-892682-QRCode
Es 892682 qr code
2 parents c12c623 + ab6ee60 commit 39f00d1

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed
3.56 KB
Loading

blazor/barcode/qrcodegenerator.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,48 @@ Error Correction Level Table
8585
```
8686
{% previewsample "https://blazorplayground.syncfusion.com/embed/LNBKCVCzzDcveinV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}
8787

88+
## QR code with logo
89+
90+
The QR Code component supports embedding a logo image using the [ImageSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.QRCodeLogo.html#Syncfusion_Blazor_BarcodeGenerator_QRCodeLogo_ImageSource) property within the [QRCodeLogo](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.QRCodeLogo.html) element. This property sets the logo image in the center of the QR code. By default, the logo image is positioned at one-third of the QR code's size. Therefore, adjusting the size of the QR code will proportionally scale the logo image.
91+
92+
Advantages of Image QR Codes
93+
94+
* Enhanced Brand Identity: A QR code with an image allows businesses to integrate their logos or brand elements directly into the QR code. This enhances brand consistency and recognition, making it more memorable for users when they interact with the QR code.
95+
96+
* Increased User Interaction: An image QR code can convey messages, showcase products, or provide information more effectively than plain text or URLs. This visual approach can significantly boost user engagement and make the content more compelling and memorable.
97+
98+
* Comprehensive Visual Content: An image QR code generator enables the sharing of high-resolution images, infographics, diagrams, or product photos. This is particularly beneficial in art-related contexts where visual content is crucial for effective communication.
99+
100+
These benefits illustrate how an image QR code converter can enhance the effectiveness and impact of QR codes in various domains, from marketing to education and beyond.
101+
102+
The following code example demonstrates how to generate a QR barcode with a logo positioned at the center of it.
103+
104+
```cshtml
105+
@using Syncfusion.Blazor.BarcodeGenerator
106+
107+
<SfQRCodeGenerator Width="200px" Height="150px" Value="https://www.syncfusion.com/blazor-components/blazor-barcode">
108+
<QRCodeGeneratorDisplayText Visibility="false"></QRCodeGeneratorDisplayText>
109+
<QRCodeLogo ImageSource="images/barcode/syncfusion.png"></QRCodeLogo>
110+
</SfQRCodeGenerator>
111+
```
112+
113+
![QR barcode with logo in Blazor Barcode](images/blazor-barcode-qrcode-with-logo.png)
114+
115+
>**Note:** The [Error correction level](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.ErrorCorrectionLevel.html) is not taken into account when rendering the logo image inside the QR code.
116+
117+
### Customizing the logo size
118+
119+
The size of the logo can be changed using the [Height](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.QRCodeLogo.html#Syncfusion_Blazor_BarcodeGenerator_QRCodeLogo_Height) and [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.QRCodeLogo.html#Syncfusion_Blazor_BarcodeGenerator_QRCodeLogo_Width) properties of the QR code generator. The image size should be equal to or less than 30% of the QR code's size. If the specified size exceeds 30% of the QR code's size, the QR code may not be scanned properly. Therefore, the lesser value between 30% of the QR code's size and the specified size will be used for rendering.
120+
121+
```cshtml
122+
@using Syncfusion.Blazor.BarcodeGenerator
123+
124+
<SfQRCodeGenerator Width="200px" Height="200px" Value="https://www.syncfusion.com/blazor-components/blazor-barcode">
125+
<QRCodeLogo Width="30" Height="30" ImageSource="images/barcode/syncfusion.png"></QRCodeLogo>
126+
</SfQRCodeGenerator>
127+
```
128+
>**Note:** The default value is one-third of the QR code size.
129+
88130
## Event
89131

90132
[OnValidationFailed](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.SfQRCodeGenerator.html#Syncfusion_Blazor_BarcodeGenerator_SfQRCodeGenerator_OnValidationFailed) event in the [SfQRCodeGenerator](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.BarcodeGenerator.SfQRCodeGenerator.html) is used to trigger when the input is an invalid string.
@@ -101,4 +143,4 @@ Error Correction Level Table
101143
}
102144
}
103145
104-
```
146+
```

0 commit comments

Comments
 (0)