View PDF files in the Vanilla JS application
GemBox.PdfViewer is not dependent on any project structure and can be easily used in projects that use pure JavaScript without any additional framework.
The following example shows a code for a simple HTML page that displays a PDF viewer.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.jsdelivr.net/npm/@gembox/pdfviewer/dist/iife/pdfviewer.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@gembox/pdfviewer/dist/iife/pdfviewer.css"/>
</head>
<body>
<div id="viewer" style="width: 600px; height: 350px"></div>
<script>
GemBoxPdfViewer.setLicense("FREE-LIMITED-KEY");
GemBoxPdfViewer.create({
container: "#viewer",
initialDocument: "/document.pdf"
});
</script>
</body>
</html>