Skip to content

Commit c2a513b

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

File tree

2 files changed

+44
-40
lines changed

2 files changed

+44
-40
lines changed

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

Lines changed: 7 additions & 5 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',
@@ -64,7 +64,7 @@ The PDF Viewer feature enables customization of custom options and the ability t
6464
{
6565
text: 'Search In Google',
6666
id: 'search_in_google',
67-
iconCss: 'e-icons e-de-ctnr-find'
67+
iconCss: 'e-icons e-search'
6868
},
6969
{
7070
text: 'Lock Annotation',
@@ -106,7 +106,7 @@ The following code shows how to hide/show added custom option in context menu us
106106
{
107107
text: 'Search In Google',
108108
id: 'search_in_google',
109-
iconCss: 'e-icons e-de-ctnr-find'
109+
iconCss: 'e-icons e-search'
110110
},
111111
{
112112
text: 'Lock Annotation',
@@ -165,7 +165,7 @@ The following code shows how to hide/show added custom option in context menu us
165165
}
166166
};
167167
168-
function customContextMenuBeforeOpen(args) {
168+
function customContextMenuBeforeOpen(args) {
169169
for (var i = 0; i < args.ids.length; i++) {
170170
var search = document.getElementById(args.ids[i]);
171171
var pdfviewer = document.getElementById('pdfviewer').ej2_instances[0];
@@ -201,6 +201,7 @@ The following code shows how to hide/show added custom option in context menu us
201201
}
202202
}
203203
};
204+
204205
</script>
205206
```
206207

@@ -214,7 +215,7 @@ The following is the output of custom context menu with customization.
214215
{
215216
text: 'Search In Google',
216217
id: 'search_in_google',
217-
iconCss: 'e-icons e-de-ctnr-find'
218+
iconCss: 'e-icons e-search'
218219
},
219220
{
220221
text: 'Lock Annotation',
@@ -284,6 +285,7 @@ The following is the output of custom context menu with customization.
284285
search.style.display = 'block';
285286
} else if (args.ids[i] === "lock_annotation" || args.ids[i] === "unlock_annotation") {
286287
var isLockOption = args.ids[i] === "lock_annotation";
288+
287289
for (var j = 0; j < pdfviewer.selectedItems.annotations.length; j++) {
288290
var selectedAnnotation = pdfviewer.selectedItems.annotations[j];
289291
if (selectedAnnotation && selectedAnnotation.annotationSettings) {

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

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,27 @@ The `pageRenderComplete` event is triggered when the rendering of a page in the
2727
ViewData["Title"] = "Home page";
2828
}
2929

30-
<div class="text-center">
31-
<ejs-pdfviewer
32-
id="pdfviewer"
33-
style="height:600px"
34-
pageRenderInitiate="pageRenderInitiate"
35-
pageRenderComplete="pageRenderComplete"
36-
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf">
30+
<div style="width:100%;height:600px">
31+
<ejs-pdfviewer id="pdfviewer"
32+
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
33+
resourceUrl="https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib"
34+
pageRenderInitiate="pageRenderInitiate"
35+
pageRenderComplete="pageRenderComplete">
3736
</ejs-pdfviewer>
3837
</div>
39-
<script>
40-
pdfviewer.pageRenderInitiate = args => {
41-
// This method is called when the page rendering starts
42-
console.log('Rendering of pages started' + args);
43-
};
44-
45-
pdfviewer.pageRenderComplete = args => {
46-
// This method is called when the page rendering completes
47-
console.log('Rendering of pages completed' + args);
48-
};
38+
<script type="text/javascript">
39+
40+
function pageRenderInitiate(args) {
41+
// This method is called when the page rendering starts
42+
console.log('Rendering of pages started');
43+
console.log(args);
44+
}
45+
function pageRenderComplete(args) {
46+
// This method is called when the page rendering completes
47+
console.log('Rendering of pages completed');
48+
console.log(args);
49+
};
50+
4951
</script>
5052

5153
{% endhighlight %}
@@ -55,27 +57,27 @@ pdfviewer.pageRenderComplete = args => {
5557
ViewData["Title"] = "Home page";
5658
}
5759

58-
<div class="text-center">
59-
<ejs-pdfviewer
60-
id="pdfviewer"
61-
style="height:600px"
62-
serviceUrl="/Index"
63-
pageRenderInitiate="pageRenderInitiate"
64-
pageRenderComplete="pageRenderComplete"
65-
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf">
60+
<div style="width:100%;height:600px">
61+
<ejs-pdfviewer id="pdfviewer"
62+
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
63+
serviceUrl="/Index"
64+
pageRenderInitiate="pageRenderInitiate"
65+
pageRenderComplete="pageRenderComplete">
6666
</ejs-pdfviewer>
6767
</div>
68+
<script type="text/javascript">
69+
70+
function pageRenderInitiate(args) {
71+
// This method is called when the page rendering starts
72+
console.log('Rendering of pages started');
73+
console.log(args);
74+
}
75+
function pageRenderComplete(args) {
76+
// This method is called when the page rendering completes
77+
console.log('Rendering of pages completed');
78+
console.log(args);
79+
};
6880

69-
<script>
70-
pdfviewer.pageRenderInitiate = args => {
71-
// This method is called when the page rendering starts
72-
console.log('Rendering of pages started' + args);
73-
};
74-
75-
pdfviewer.pageRenderComplete = args => {
76-
// This method is called when the page rendering completes
77-
console.log('Rendering of pages completed' + args);
78-
};
7981
</script>
8082
{% endhighlight %}
8183
{% endtabs %}

0 commit comments

Comments
 (0)