Skip to content

Commit a5de1a7

Browse files
SaravanaPriya31SaravanaPriya31
SaravanaPriya31
authored and
SaravanaPriya31
committed
875662: commit
1 parent c2a513b commit a5de1a7

File tree

5 files changed

+96
-46
lines changed

5 files changed

+96
-46
lines changed

ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/accessibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Accessibility with EJ2 ASP.NET MVC PDF Viewer | Syncfusion
44
description: Learn here all about accessibility in ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more.
55
platform: ej2-asp-core-mvc
66
control: PDF Viewer
7-
publishingplatform: ej2-asp-core-mvc
7+
publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010

ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/custom-context-menu.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The following code shows how to add custom option in context menu.
2222
{
2323
text: 'Search In Google',
2424
id: 'search_in_google',
25-
iconCss: 'e-icons e-de-ctnr-find'
25+
iconCss: 'e-icons e-search'
2626
},
2727
{
2828
text: 'Lock Annotation',
@@ -63,7 +63,7 @@ The PDF Viewer feature enables customization of custom options and the ability t
6363
{
6464
text: 'Search In Google',
6565
id: 'search_in_google',
66-
iconCss: 'e-icons e-de-ctnr-find'
66+
iconCss: 'e-icons e-search'
6767
},
6868
{
6969
text: 'Lock Annotation',
@@ -104,7 +104,7 @@ The following code shows how to hide/show added custom option in context menu us
104104
{
105105
text: 'Search In Google',
106106
id: 'search_in_google',
107-
iconCss: 'e-icons e-de-ctnr-find'
107+
iconCss: 'e-icons e-search'
108108
},
109109
{
110110
text: 'Lock Annotation',
@@ -170,7 +170,7 @@ The following code shows how to hide/show added custom option in context menu us
170170
}
171171
};
172172
173-
function customContextMenuBeforeOpen(args) {
173+
function customContextMenuBeforeOpen(args) {
174174
for (var i = 0; i < args.ids.length; i++) {
175175
var search = document.getElementById(args.ids[i]);
176176
var pdfviewer = document.getElementById('pdfviewer').ej2_instances[0];
@@ -205,6 +205,7 @@ The following code shows how to hide/show added custom option in context menu us
205205
}
206206
}
207207
};
208+
208209
</script>
209210
```
210211

@@ -214,26 +215,17 @@ The following is the output of custom context menu with customization.
214215
215216
@using Syncfusion.EJ2
216217
217-
@section ControlsSection{
218-
<div class="col-lg-9 control-section">
219-
<div class="flex-container">
220-
<label class="switchLabel" for="checked">Standalone PDF Viewer</label>
221-
<div class="e-message render-mode-info">
222-
<span class="e-msg-icon render-mode-info-icon" title="Turn OFF to render the PDF Viewer as server-backed"></span>
223-
</div>
224-
<div>
225-
@Html.EJS().Switch("checked").Checked(true).Change("change").CssClass("buttonSwitch").Render()
226-
</div>
227-
</div>
228-
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").ResourceUrl("https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib").DocumentLoad("documentLoad").CustomContextMenuSelect("customContextMenuSelect").CustomContextMenuBeforeOpen("customContextMenuBeforeOpen").Render()
218+
<div>
219+
<div style="height:500px;width:100%;">
220+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").ResourceUrl("https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib").CustomContextMenuSelect("customContextMenuSelect").CustomContextMenuBeforeOpen("customContextMenuBeforeOpen").DocumentLoad("documentLoaded").Render()
229221
</div>
230-
}
222+
</div>
231223
<script type="text/javascript">
232224
var menuItems = [
233225
{
234226
text: 'Search In Google',
235227
id: 'search_in_google',
236-
iconCss: 'e-icons e-de-ctnr-find'
228+
iconCss: 'e-icons e-search'
237229
},
238230
{
239231
text: 'Lock Annotation',
@@ -246,17 +238,16 @@ The following is the output of custom context menu with customization.
246238
id: 'unlock_annotation'
247239
},
248240
{
249-
text: 'Lock Form Fields',
241+
text: 'Lock Form Field',
250242
iconCss: 'e-icons e-lock',
251243
id: 'read_only_true'
252244
},
253245
{
254-
text: 'Unlock Form Fields',
246+
text: 'Unlock Form Field',
255247
iconCss: 'e-icons e-unlock',
256248
id: 'read_only_false'
257249
},
258250
];
259-
260251
function documentLoaded(arg) {
261252
var pdfviewer = document.getElementById('pdfviewer').ej2_instances[0];
262253
pdfviewer.addCustomMenu(menuItems, false, false);
@@ -387,6 +378,10 @@ The following is the output of custom context menu with customization.
387378
}
388379
}
389380
381+
function contextmenuHelper(args) {
382+
var pdfviewer = document.getElementById('pdfviewer').ej2_instances[0];
383+
pdfviewer.addCustomMenu(menuItems, enable.checked, position.checked);
384+
}
390385
391386
</script>
392387

ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/open-bookmark.md

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,72 @@ The following steps are used to open the Bookmark.
1818

1919
**Step 2:** Insert the following code snippet to implement the functionality for opening the Bookmark pane:
2020

21-
```html
21+
{% tabs %}
22+
{% highlight cshtml tabtitle="Standalone" %}
23+
2224
<button type="button" onclick="openBookmark()">Open Bookmark Pane</button>
25+
<div style="width:100%;height:600px">
26+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").Render()
27+
</div>
28+
29+
<script>
30+
function openBookmark() {
31+
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
32+
pdfViewer.bookmarkViewModule.openBookmarkPane();
33+
}
34+
</script>
35+
{% endhighlight %}
36+
{% highlight cshtml tabtitle="Server-Backed" %}
37+
38+
<button type="button" onclick="openBookmark()">Open Bookmark Pane</button>
39+
40+
<div style="width:100%;height:600px">
41+
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/api/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").Render()
42+
</div>
2343

2444
<script>
2545
function openBookmark() {
26-
var viewer = document.getElementById('pdfViewer').ej2_instances[0];
27-
// Open Bookmark pane
28-
viewer.bookmarkViewModule.openBookmarkPane();
46+
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
47+
pdfViewer.bookmarkViewModule.openBookmarkPane();
2948
}
3049
</script>
31-
```
50+
51+
{% endhighlight %}
52+
{% endtabs %}
3253

3354
Similarly, to close the Bookmark pane programmatically, employ the following code snippet:
3455

35-
```html
36-
<button type="button" closeBookmark="openBookmark()">Close Bookmark Pane</button>
56+
{% tabs %}
57+
{% highlight cshtml tabtitle="Standalone" %}
58+
59+
<button type="button" onclick="closeBookmark()">Close Bookmark Pane</button>
60+
<div style="width:100%;height:600px">
61+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").Render()
62+
</div>
63+
64+
<script>
65+
function closeBookmark() {
66+
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
67+
// close Bookmark pane
68+
pdfViewer.bookmarkViewModule.closeBookmarkPane();
69+
}
70+
</script>
71+
{% endhighlight %}
72+
{% highlight cshtml tabtitle="Server-Backed" %}
73+
74+
<button type="button" onclick="closeBookmark()">Close Bookmark Pane</button>
75+
76+
<div style="width:100%;height:600px">
77+
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/api/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").Render()
78+
</div>
3779

3880
<script>
3981
function closeBookmark() {
40-
var viewer = document.getElementById('pdfViewer').ej2_instances[0];
41-
// Open Bookmark pane
42-
viewer.bookmarkViewModule.closeBookmarkPane();
82+
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
83+
// close Bookmark pane
84+
pdfViewer.bookmarkViewModule.closeBookmarkPane();
4385
}
4486
</script>
45-
```
87+
88+
{% endhighlight %}
89+
{% endtabs %}

ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/pagerenderstarted-pagerendercompleted.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,42 +20,53 @@ The `pageRenderInitiate` event is triggered when the rendering of a page in the
2020

2121
The `pageRenderComplete` event is triggered when the rendering of a page in the PDF document is completed. This event allows developers to perform cleanup tasks or finalize rendering-related processes after the rendering of the page content finishes. It can be used to release resources, finalize rendering settings, or handle any post-rendering tasks necessary for the application.
2222

23-
2423
{% tabs %}
2524
{% highlight html tabtitle="Standalone" %}
26-
\
25+
26+
@{
27+
ViewBag.Title = "Home Page";
28+
}
29+
2730
<div style="width:100%;height:600px">
28-
@Html.EJS().PdfViewer("pdfviewer").DocumentLoad("download").EnableDownload(true).DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").pageRenderInitiate("pageRenderInitiate").pageRenderComplete("pageRenderComplete").Render()
31+
@Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").PageRenderInitiate("pageRenderInitiate").PageRenderComplete("pageRenderComplete").Render()
2932
</div>
3033

3134
<script>
32-
pdfviewer.pageRenderStart = args => {
35+
function pageRenderInitiate(args) {
3336
// This method is called when the page rendering starts
34-
console.log('Rendering of pages started' + args);
37+
console.log('Rendering of pages started');
38+
console.log(args);
3539
};
3640

37-
pdfviewer.pageRenderComplete = args => {
41+
function pageRenderComplete(args) {
3842
// This method is called when the page rendering completes
39-
console.log('Rendering of pages completed' + args);
43+
console.log('Rendering of pages completed');
44+
console.log(args);
4045
};
4146
</script>
4247

4348
{% endhighlight %}
4449
{% highlight html tabtitle="Server-Backed" %}
4550

51+
@{
52+
ViewBag.Title = "Home Page";
53+
}
54+
4655
<div style="width:100%;height:600px">
47-
@Html.EJS().PdfViewer("pdfviewer").DocumentLoad("download")..ServiceUrl(VirtualPathUtility.ToAbsolute("~/api/PdfViewer/")).EnableDownload(true).DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").pageRenderInitiate("pageRenderInitiate").pageRenderComplete("pageRenderComplete").Render()
56+
@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/api/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/hive-succinctly.pdf").PageRenderInitiate("pageRenderInitiate").PageRenderComplete("pageRenderComplete").Render()
4857
</div>
4958

5059
<script>
51-
pdfviewer.pageRenderStart = args => {
60+
function pageRenderInitiate(args) {
5261
// This method is called when the page rendering starts
53-
console.log('Rendering of pages started' + args);
62+
console.log('Rendering of pages started');
63+
console.log(args);
5464
};
5565

56-
pdfviewer.pageRenderComplete = args => {
66+
function pageRenderComplete(args) {
5767
// This method is called when the page rendering completes
58-
console.log('Rendering of pages completed' + args);
68+
console.log('Rendering of pages completed');
69+
console.log(args);
5970
};
6071
</script>
6172

ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/accessibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Accessibility with EJ2 ASP.NET Core PDF Viewer | Syncfusion
44
description: Learn here all about accessibility in ASP.NET Core Pdfviewer component of Syncfusion Essential JS 2 and more.
55
platform: ej2-asp-core-mvc
66
control: PDF Viewer
7-
publishingplatform: ej2-asp-core-mvc
7+
publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010
# Accessibility in Syncfusion PDF Viewer components

0 commit comments

Comments
 (0)