This sample loads a PDF in which all occurrences of the word "wetlands" are associated with a link annotation that invokes the Bing search for that word. Clicking any underlined instance of the word "wetlands" will open the Bing search page for that word in a new browser tab.
window.onload = function() {
//DsPdfViewer.LicenseKey = "***key***";
const viewer = new DsPdfViewer("#viewer", {
workerSrc: "/document-solutions/javascript-pdf-viewer/demos/product-bundles/build/dspdfviewer.worker.js",
supportApi: getSupportApiSettings(),
externalLinkTarget: "blank"
});
viewer.addDefaultPanels();
viewer.addAnnotationEditorPanel();
viewer.toolbarLayout.annotationEditor = {
default: ["edit-select","$split","edit-link","$split","edit-undo","edit-redo","save"],
mobile: ["edit-select","$split","edit-link","$split","edit-undo","edit-redo","save"],
fullscreen: ["$fullscreen", "edit-select","$split","edit-link","$split","edit-undo","edit-redo","save"]
};
viewer.applyToolbarLayout();
viewer.open("/document-solutions/javascript-pdf-viewer/demos/product-bundles/assets/pdf/viewer-link-search-bing.pdf");
}