Category / Section
How to initialize PDF viewer in new browser window on button click?
1 min read
PDF viewer can be initialized in new browser window on a button click. Refer to the following code for the same,
HTML:
<div style="width:30% ">
<button onclick="initializePdfviewer (arguments)">Initialize PDF Viewer</button>
</div>
JS:
function initalizePdfviewer(arguments) {
//Initializes the PDF Viewer control in new window
var ws = window.open("", '_blank', "width=1000,height=600,location=no,menubar=no,status=no,titilebar=no,resizable=no")
ws.document.write('<!DOCTYPE html><html><head><title>PdfViewer</title><link rel="stylesheet" type="text/css" href="../themes/default-theme/ej.web.all.min.css"><script src="../scripts/jquery-2.1.4.min.js">
Find the working sample from the following link
Didn't find an answer?
Contact Support