Skip to content

Commit 6b20f84

Browse files
Merge pull request #3771 from syncfusion-content/930943-Merge
930943: Cleared the conflicts
2 parents bda6814 + c3ac418 commit 6b20f84

File tree

27 files changed

+1291
-84
lines changed

27 files changed

+1291
-84
lines changed

ej2-asp-core-mvc/chips/customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,4 @@ The [`Template`](https://help.syncfusion.com/cr/aspnetmvc-js2/syncfusion.ej2.but
201201
{% endif %}
202202

203203

204-
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Chips/ChipsSample).
204+
N> [View Sample in GitHub](https://github.com/SyncfusionExamples/ASP-NET-Core-UG-Examples/tree/main/Chips/ChipsSample).

ej2-asp-core-mvc/code-snippet/chart/series/box/dasharray/dasharray.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

ej2-asp-core-mvc/code-snippet/chart/series/box/dasharray/razor

Lines changed: 0 additions & 12 deletions
This file was deleted.

ej2-asp-core-mvc/code-snippet/chart/series/box/dasharray/tagHelper

Lines changed: 0 additions & 10 deletions
This file was deleted.

ej2-asp-core-mvc/code-snippet/grid/accessibility/ensuring-accessibility/tagHelper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
cols.Add(new { field = "OrderID", direction = "Ascending" });
44
cols.Add(new { field = "ShipCity", direction = "Descending" });
55
}
6-
6+
77
<ejs-grid id="Grid" dataSource="@ViewBag.DataSource" toolbar="@(new List<string>() {"Add", "Edit", "Delete", "Update", "Cancel","Search","ColumnChooser"})" allowPaging="true" allowReordering="true" allowGrouping="true" allowSorting="true" allowFiltering="true" showColumnChooser="true" allowRowDragAndDrop="true" height="400">
88
<e-grid-editSettings allowEditing="true" allowAdding="true" allowDeleting="true" mode="Normal"></e-grid-editSettings>
99
<e-grid-filterSettings type="Excel"></e-grid-filterSettings>

ej2-asp-core-mvc/code-snippet/spreadsheet/enable-context-menu/tagHelper

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
function createdHandler() {
3131
//To enable / disable context menu items.
3232
this.enableContextMenuItems(['Rename'], false, false); // Contextmenu Items that needs to be enabled / disabled, Set true / false to enable / disable the menu items, Set true if the given text is a unique id.
33+
3334
}
3435
</script>
3536

ej2-asp-core-mvc/code-snippet/spreadsheet/image/tagHelper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@
150150
this.setBorder({ border: '1px solid #1167b1' }, 'B2:D9', 'Outer');
151151
this.setBorder({ border: '1px solid #1167b1' }, 'B11:D18', 'Outer');
152152
}
153-
</script>
153+
</script>
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<div class="control-section">
2-
@Html.EJS().TextBox("success").Placeholder("success").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Auto).CssClass("e-success").Render()
3-
@Html.EJS().TextBox("Warning").Placeholder("Warning").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Auto).CssClass("e-warning").Render()
4-
</div>
5-
6-
<style>
7-
/* For Success state */
8-
.e-float-input.e-input-group.e-success label.e-float-text,
9-
.e-float-input.e-input-group.e-success input:focus ~ label.e-float-text,
10-
.e-float-input.e-input-group.e-success input:valid ~ label.e-float-text {
11-
color: #22b24b;
12-
}
2+
@Html.EJS().TextBox("success").Placeholder("success").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Auto).CssClass("e-success").Render()
3+
@Html.EJS().TextBox("Warning").Placeholder("Warning").FloatLabelType(Syncfusion.EJ2.Inputs.FloatLabelType.Auto).CssClass("e-warning").Render()
4+
</div>
135

14-
/* For Warning state */
15-
.e-float-input.e-input-group.e-warning label.e-float-text,
16-
.e-float-input.e-input-group.e-warning input:focus ~ label.e-float-text,
17-
.e-float-input.e-input-group.e-warning input:valid ~ label.e-float-text {
18-
color: #ffca1c;
19-
}
20-
</style>
6+
<style>
7+
/* For Success state */
8+
.e-float-input.e-input-group.e-success label.e-float-text,
9+
.e-float-input.e-input-group.e-success input:focus ~ label.e-float-text,
10+
.e-float-input.e-input-group.e-success input:valid ~ label.e-float-text {
11+
color: #22b24b;
12+
}
13+
14+
/* For Warning state */
15+
.e-float-input.e-input-group.e-warning label.e-float-text,
16+
.e-float-input.e-input-group.e-warning input:focus ~ label.e-float-text,
17+
.e-float-input.e-input-group.e-warning input:valid ~ label.e-float-text {
18+
color: #ffca1c;
19+
}
20+
</style>

ej2-asp-core-mvc/context-menu/template-and-multilevel-nesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ The Multiple level nesting supports in ContextMenu. It can be achieved by mappin
115115

116116
## See Also
117117

118-
* [Populate menu items with data source](./how-to#data-binding)
118+
* [Populate menu items with data source](./how-to#data-binding)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
layout: post
3+
title: Get Page Info in EJ2 ASP.NET MVC PDF Viewer | Syncfusion
4+
description: Learn here all about Get Page Info in ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more.
5+
platform: ej2-asp-core-mvc
6+
control: PDF Viewer
7+
publishingplatform: ##Platform_Name##
8+
documentation: ug
9+
---
10+
11+
# Get Page Info from PDF document
12+
13+
The PDF Viewer library allows you to retrieves the information of a specified page in the viewer using the **getPageInfo()** method.This provides essential information such as the height, width and rotation.
14+
15+
The following steps are used to getPageInfo.
16+
17+
**Step 1:** Follow the steps provided in the [link](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started/) to create a simple PDF Viewer sample.
18+
19+
**Step 2:** The following code snippet to implement the functionality for retrieving height, width and rotation of a specified page in the viewer.
20+
21+
{% tabs %}
22+
{% highlight cshtml tabtitle="Standalone" %}
23+
24+
@using Syncfusion.EJ2
25+
@{
26+
ViewBag.Title = "Home Page";
27+
}
28+
29+
<div>
30+
<div style="height:500px;width:100%;">
31+
<!-- Button to trigger Page Info retrieval -->
32+
<button id="getPageInfo">GetPageInfo</button>
33+
<!-- Render PDF Viewer -->
34+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render()
35+
</div>
36+
</div>
37+
38+
<!-- Ensure necessary Syncfusion scripts and styles are included -->
39+
<script src="https://cdn.syncfusion.com/ej2/27.2.4/dist/ej2.min.js"></script>
40+
<script type="text/javascript">
41+
window.onload = function () {
42+
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
43+
// Add event listener for retrieving page information
44+
document.getElementById('getPageInfo').addEventListener('click', function () {
45+
retrievePageInfo();
46+
});
47+
function retrievePageInfo() {
48+
if (viewer) {
49+
// Set the page index for which info is required
50+
const pageIndex = 0;
51+
// To Retrieve and log the page information
52+
console.log(viewer.getPageInfo(pageIndex));
53+
// To Log the specific page information details to the console
54+
var pageInfo = viewer.getPageInfo(pageIndex);
55+
if (pageInfo) {
56+
console.log(`Page Info for Page Index ${pageIndex}:`);
57+
console.log(`Height: ${pageInfo.height}`);
58+
console.log(`Width: ${pageInfo.width}`);
59+
console.log(`Rotation: ${pageInfo.rotation}`);
60+
}
61+
}
62+
}
63+
};
64+
</script>
65+
66+
{% endhighlight %}
67+
{% endtabs %}
68+
69+
By following these steps, you can successfully integrate and use the get page info API in the EJ2 PDF Viewer.
70+
71+
[View Sample in GitHub](https://github.com/SyncfusionExamples/mvc-pdf-viewer-examples/tree/master/How%20to)
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
layout: post
3+
title: Retrieving Base64 Value in EJ2 ASP.NET MVC PdfViewer | Syncfusion
4+
description: Learn how to retrieve the Base64 value in the Syncfusion ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more.
5+
platform: ej2-asp-core-mvc
6+
control: How to retrieve Base64
7+
publishingplatform: ##Platform_Name##
8+
documentation: ug
9+
---
10+
11+
# Retrieving Base64 Value from a PDF in PDF Viewer
12+
### Overview
13+
14+
This guide demonstrates how to fetch the base64-encoded value of a PDF document loaded in the Syncfusion PDF Viewer using ASP.NET MVC. This feature is beneficial for transferring the PDF data as a Base64 string or performing client-side processing.
15+
16+
### How to Retrieve Base64 Value
17+
18+
**Step 1:** Set Up the PdfViewer in Your ASP.NET MVC Project
19+
20+
Follow the steps provided in the [link](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started) to create a simple PDF Viewer sample.
21+
22+
**Step 2:** Add Button and Function for Fetching Base64 Value
23+
24+
Incorporate a button in your view to enable users to start the process of converting the loaded PDF document into a Base64 string.
25+
26+
```html
27+
<div>
28+
<div style="height:500px;width:100%;">
29+
<!-- Button to trigger Base64 conversion -->
30+
<button id="getBase64">Get Base64</button>
31+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render()
32+
</div>
33+
</div>
34+
35+
<!-- Ensure necessary Syncfusion scripts and styles are included -->
36+
<script src="https://cdn.syncfusion.com/ej2/27.2.4/dist/ej2.min.js"></script>
37+
38+
<script type="text/javascript">
39+
window.onload = function () {
40+
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
41+
// Add an event listener to the button to get Base64 string of the loaded document
42+
document.getElementById('getBase64').addEventListener('click', function () {
43+
getBase64EncodedDocument(); // Call the function to get the Base64 string
44+
});
45+
46+
// Function to get Base64 of the loaded document
47+
function getBase64EncodedDocument() {
48+
viewer.saveAsBlob().then(function (blob) {
49+
var reader = new FileReader();
50+
reader.readAsDataURL(blob);
51+
reader.onload = function () {
52+
var base64data = reader.result;
53+
console.log(base64data);
54+
// You can handle the base64data as needed, e.g., sending it to a server or displaying it
55+
};
56+
}).catch(function (error) {
57+
console.error('Error converting PDF to Base64:', error);
58+
});
59+
}
60+
};
61+
</script>
62+
63+
```
64+
### Conclusion
65+
66+
By following these steps, you can easily convert and retrieve a PDF document's Base64 string. This conversion is particularly useful for transmitting PDF data or integrating with systems that require Base64 encoding.
67+
68+
[View sample in GitHub](https://github.com/SyncfusionExamples/mvc-pdf-viewer-examples/tree/master/How%20to)
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
layout: post
3+
title: Displaying Custom stamp Item in EJ2 ASP.NET MVC PdfViewer | Syncfusion
4+
description: Learn how to display custom stamp items in the custom stamp in the Syncfusion ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more.
5+
platform: ej2-asp-core-mvc
6+
control: PDF Viewer
7+
publishingplatform: ##Platform_Name##
8+
documentation: ug
9+
---
10+
11+
# Displaying Custom Items in Custom Stamp Dropdown
12+
13+
### Overview
14+
15+
This guide explains how to add and display custom items in the custom stamp dropdown menu of Syncfusion's PDF Viewer using ASP.NET MVC. This feature allows users to easily access and apply custom stamps to their PDF documents.
16+
17+
### Steps to Show Custom Items in Custom Stamp Dropdown
18+
19+
**Step 1:** Set Up the PdfViewer in Your ASP.NET MVC Project
20+
21+
Follow the steps provided in the [link](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started) to create a simple PDF Viewer sample.
22+
23+
**Step 2:** Configure Custom Stamp Settings
24+
25+
Within the PDF Viewer setup, utilize `PdfViewerCustomStampSettings` to specify the custom stamps that should appear in the dropdown menu.
26+
27+
```cs
28+
@using Syncfusion.EJ2.PdfViewer
29+
@{
30+
ViewBag.Title = "Home Page";
31+
}
32+
@{
33+
ViewData["Title"] = "Home page";
34+
35+
List<Object> customStamp = new List<Object>();
36+
37+
customStamp.Add(new
38+
{
39+
customStampName = "Image1",
40+
customStampImageSource="data:image/png;base64,...' // Provide a valid base64 or URL for the image"
41+
});
42+
customStamp.Add(new
43+
{
44+
customStampName = "Image2",
45+
customStampImageSource ="data:image/png;base64,...' // Provide a valid base64 or URL for the image"
46+
});
47+
PdfViewerCustomStampSettings CustomStampsSettings = new PdfViewerCustomStampSettings()
48+
{
49+
IsAddToMenu = true,
50+
CustomStamps = customStamp,
51+
EnableCustomStamp = true,
52+
Opacity = 1,
53+
};
54+
55+
}
56+
57+
<div>
58+
<div style="height:500px;width:100%;">
59+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").CustomStampSettings(CustomStampsSettings).Render()
60+
</div>
61+
</div>
62+
63+
```
64+
65+
By following these instructions, you can successfully configure to display custom items in the custom stamp dropdown, allowing users to easily apply personalized stamps to their documents.
66+
67+
[View sample in GitHub](https://github.com/SyncfusionExamples/mvc-pdf-viewer-examples/tree/master/How%20to)

0 commit comments

Comments
 (0)