You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ej2-asp-core-mvc/barcode/qrcodegenerator.md
+24-7Lines changed: 24 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -88,29 +88,46 @@ The dimension of the QR Code can be changed using the height and width propertie
88
88
{% endif %}
89
89
90
90
91
+
## Enhancing QR Codes with Icons
91
92
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.
93
94
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
+

95
112
96
113
{% if page.publishingplatform == "aspnet-core" %}
97
114
98
115
{% tabs %}
99
116
{% highlight cshtml tabtitle="CSHTML" %}
100
-
{% include code-snippet/barcode/qrcode/text/tagHelper %}
117
+
{% include code-snippet/barcode/qrcode/logo/tagHelper %}
Copy file name to clipboardExpand all lines: ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/open-pdf-file/from-azure-blob-storage.md
+91-2Lines changed: 91 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
layout: post
3
-
title: Azure Blob Storage in ##Platform_Name## PDF Viewer Component
3
+
title: Open PDF from Azure Blob Storage in ##Platform_Name## PdfViewer | Syncfusion
4
4
description: Learn here all about how to Open PDF files from Azure Blob Storage in ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more.
5
5
platform: ej2-asp-core-mvc
6
6
control: PDF Viewer
@@ -10,6 +10,95 @@ documentation: ug
10
10
11
11
# Open PDF file from Azure Blob Storage
12
12
13
+
PDF Viewer allows to load PDF file from Azure Blob Storage using either the Standalone or Server-backed PDF Viewer. Below are the steps and a sample to demonstrate how to open a PDF from Azure Blob Storage.
14
+
15
+
## Using Standalone PDF Viewer
16
+
17
+
To load a PDF file from Azure Blob Storage in a PDF Viewer, you can follow the steps below
18
+
19
+
**Step 1:** Create the Azure Blob Storage account
20
+
21
+
Log in to the Azure Portal. Create a new Storage Account with preferred settings. Note access keys during the setup. Within the Storage Account, create a Blob Container following the steps in this [link](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=azure-portal).
22
+
23
+
**Step 2:** Create PDF Viewer Sample in ASP.NET MVC
24
+
25
+
Follow instructions provided in the Syncfusion PDF Viewer Getting Started [Guide](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started-with-server-backed#integrate-pdf-viewer-into-an-aspnet-mvc-application) to create a simple PDF Viewer sample in ASP.NET MVC.
26
+
27
+
**Step 3:** Modify the `Views/Home/index.cshtml` File in the Project
28
+
29
+
1. Add the following properties to the `Views/Home/index.cshtml`, and assign the values from the configuration to the corresponding properties
30
+
31
+
N> Replace **Your account name in Azure** with the actual account name for your Azure Blob Storage account and **Your container name in Azure** with the actual container name and **Your Blob name in Azure** with the actual container name.
32
+
33
+
```csharp
34
+
varaccountName="*Your account name in Azure*";
35
+
varcontainerName="*Your container name in Azure*";
36
+
varblobName="*Your Blob name in Azure*";
37
+
```
38
+
39
+
2. Constructs the URL to the PDF in Azure Blob Storage. Calls fetchAndConvertToBase64 to fetch the PDF and convert it to a base64 string. Then Loads the base64 string into the PDF Viewer.
[View sample in GitHub](https://github.com/SyncfusionExamples/open-save-pdf-documents-in-azure-blob-storage/tree/master/Open%20and%20Save%20PDF%20in%20Azure%20Blob%20Storage%20using%20Standalone).
99
+
100
+
## Using Server-Backed PDF Viewer
101
+
13
102
To load a PDF file from Azure Blob Storage in a PDF Viewer, you can follow the steps below
14
103
15
104
**Step 1:** Create the Azure Blob Storage account
@@ -95,4 +184,4 @@ Set the `documentPath` property of the PDF viewer component to the desired name
0 commit comments