Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions Document-Processing/PDF/PDF-Viewer/asp-net-core/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,51 +167,6 @@ Multiple modifiers can be combined using the bitwise OR operator (`|`).
}
</script>

{% endhighlight %}
{% highlight cshtml tabtitle="Server-Backed" %}

<div style="width:100%;height:600px">
<ejs-pdfviewer id="pdfviewer"
serviceUrl='/Index'
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
commandManager="commandManager">
</ejs-pdfviewer>
</div>

<script type="text/javascript">
function commandManager() {
keyboardCommand: [{
name: 'customCopy',
gesture: {
pdfKeys: PdfKeys.G,
modifierKeys: ModifierKeys.Shift | ModifierKeys.Alt
}
},
{
name: 'customPaste',
gesture: {
pdfKeys: PdfKeys.H,
modifierKeys: ModifierKeys.Shift | ModifierKeys.Alt
}
},
{
name: 'customCut',
gesture: {
pdfKeys: PdfKeys.Z,
modifierKeys: ModifierKeys.Control
}
},
{
name: 'customSelectAll',
gesture: {
pdfKeys: PdfKeys.E,
modifierKeys: ModifierKeys.Control
}
},
]
}
</script>

{% endhighlight %}
{% endtabs %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,44 +118,6 @@ window.onload = function() {
</script>
{% endraw %}
{% endhighlight %}
{% highlight cshtml tabtitle="Server-Backed" %}
{% raw %}
<div>
<div style="display:flex;gap:8px;margin-bottom:12px">
<button id="addComment">Add Comments</button>
<button id="addReply">Add Reply</button>
</div>
<ejs-pdfviewer id="container" style="height:650px" resourceUrl="https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib" documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" serviceUrl="YOUR_SERVICE_URL">

</ejs-pdfviewer>
</div>
<script>
window.onload = function() {
var viewer = document.getElementById('container').ej2_instances[0];
document.getElementById('addComment').onclick = function() {
if (!viewer) return;
var annot = (viewer.annotationCollection && viewer.annotationCollection[0]) || null;
if (annot) {
annot.commentType = 'add';
annot.note = 'New Comment';
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection && viewer.annotationCollection[0]);
}
};
document.getElementById('addReply').onclick = function() {
if (!viewer) return;
var annot = (viewer.annotationCollection && viewer.annotationCollection[0]) || null;
if (annot) {
annot.commentType = 'add';
annot.replyComment = ['Reply Comment'];
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection && viewer.annotationCollection[0]);
}
};
};
</script>
{% endraw %}
{% endhighlight %}
{% endtabs %}

### Edit comments and replies programmatically
Expand Down Expand Up @@ -201,43 +163,6 @@ window.onload = function() {
</script>
{% endraw %}
{% endhighlight %}
{% highlight cshtml tabtitle="Server-Backed" %}
{% raw %}
<div>
<div style="display:flex;gap:8px;margin-bottom:12px">
<button id="editComment">Edit Comments</button>
<button id="editReply">Edit Reply</button>
</div>
<ejs-pdfviewer id="container" style="height:650px" resourceUrl="https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib" documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf" serviceUrl="YOUR_SERVICE_URL">
</ejs-pdfviewer>
</div>
<script>
window.onload = function() {
var viewer = document.getElementById('container').ej2_instances[0];
document.getElementById('editComment').onclick = function() {
if (!viewer) return;
var annot = (viewer.annotationCollection && viewer.annotationCollection[0]) || null;
if (annot) {
annot.commentType = 'edit';
annot.note = 'Edited Comment';
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection && viewer.annotationCollection[0]);
}
};
document.getElementById('editReply').onclick = function() {
if (!viewer) return;
var annot = (viewer.annotationCollection && viewer.annotationCollection[0]) || null;
if (annot) {
annot.commentType = 'edit';
annot.replyComment = ['Edited Reply Comment'];
viewer.annotation.editAnnotation(annot);
console.log(viewer.annotationCollection && viewer.annotationCollection[0]);
}
};
};
</script>
{% endraw %}
{% endhighlight %}
{% endtabs %}

### Read comments added by users
Expand Down
Loading