- Home
- Forum
- ASP.NET MVC - EJ 2
- Customized toolbar with default option.
Customized toolbar with default option.
Hi,
I've set up pdf viewer with customized toolbar, taking help from document. It's working fine. But now I want to add some default options like, comment, undo-redo and search text. It should be like default.
In short I want default toolbar, in which I may able to do customization like adding or removing new custom(may be not predefined) tools, Change tooltip text, etc.
In short I want default toolbar, in which I may able to do customization like adding or removing new custom(may be not predefined) tools, Change tooltip text, etc.
SIGN IN To post a reply.
4 Replies
1 reply marked as answer
VS
Vasugi Sivajothi
Syncfusion Team
January 18, 2021 01:20 PM UTC
Hi Chetan,
Thanks for contacting Syncfusion support.
We have created a simple sample to add the comment, undo-redo and search text from code behind in custom toolbar. Please refer to that sample and code snippet.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Custom_Sample___MVC-1636433856
Code Snippet:
|
Undo |
<button type="button" onclick="undoFunction()">Undo</button>
function undoFunction() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.undo();
}
|
|
redo |
<button type="button" onclick="redoFunction()">Redo</button>
function redoFunction() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.redo();
} |
|
comment |
<button type="button" onclick="addComment()">Comment</button>
function addComment() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.annotation.setAnnotationMode("Rectangle");
pdfViewer.annotationAdd = function (args) {
pdfViewer.annotationModule.selectAnnotation(pdfViewer.annotationCollection[0].annotationId);
pdfViewer.annotationCollection[0].commentType = "add";
pdfViewer.annotationCollection[0].replyComment = ["add1", "add2", "add3", "add4"];
pdfViewer.annotationCollection[0].note = "annotation";
pdfViewer.annotation.editAnnotation(pdfViewer.annotationCollection[0]);
};
} |
|
Search Text |
<button type="button" onclick="searchText()">Search</button>
function searchText() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.textSearch.searchText("Text", false);
} |
Please let us know if you have any concerns about this.
Regards,
Vasugi
Marked as answer
CS
Chetan Soni
January 20, 2021 07:53 AM UTC
For annotation, which mode should be apply for normal comment. Comment symbol should come. I tried stickynotes, but not working.
VS
Vasugi Sivajothi
Syncfusion Team
January 21, 2021 12:24 PM UTC
Hi Chetan,
Currently, we do not have support for adding sticky notes annotation programmatically in our PDF Viewer. However we will analyze further on this and update you with more details on January 25, 2021
Regards,
Vasugi
VS
Vasugi Sivajothi
Syncfusion Team
January 27, 2021 07:22 AM UTC
Hi Chetan,
Thank you for your patience.
We have analyzed your requirement and the implementation will be included in our 2021 Volume 1 release, which is expected to be rolled out at the end of March 2021. You can track the implementation using the below link,
Regards,
Vasugi
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
- Marked answer
-
CS Chetan Soni
- Jan 16, 2021 08:38 AM UTC
- Jan 27, 2021 07:22 AM UTC