Free Version

You can use GemBox.PdfViewer as a standalone JavaScript library or with an ASP.NET Core wrapper.

Get it on NPMInstall NuGet package

Limitations

GemBox.PdfViewer Free delivers the same performance and features as the Professional version but displays a watermark after the first two pages.

JavaScript

You can either install GemBox.PdfViewer from NPM, or you can include it using script tag.

NPM

First, install the package from NPM:

npm install @gembox/pdfviewer
# or
yarn add @gembox/pdfviewer

Then you can initialize the PDF viewer:

<div id="viewer" style="width: 600px; height: 350px"></div>

<script type="module">
    import { GemBoxPdfViewer} from '@gembox/pdfviewer';
    import '@gembox/pdfviewer/dist/es/pdfviewer.css';

    GemBoxPdfViewer.setLicense("FREE-LIMITED-KEY");
    GemBoxPdfViewer.create({ container: "#viewer" });
</script>

Using script tag

You can use jsdelivr CDN to include GemBox.PdfViewer in your project:

<link href="https://cdn.jsdelivr.net/npm/@gembox/pdfviewer/dist/iife/pdfviewer.css" rel="stylesheet" type="text/css"/>
<script src="https://cdn.jsdelivr.net/npm/@gembox/pdfviewer/dist/iife/pdfviewer.js"></script>

After that, you can initialize the PDF viewer:

<div id="viewer" style="width: 600px; height: 350px"></div>

<script>
    GemBoxPdfViewer.setLicense("FREE-LIMITED-KEY");
    GemBoxPdfViewer.create({ container: "#viewer" });
</script>

ASP.NET Core

To use GemBox.PdfViewer from ASP.NET Core applications, add the NuGet package to your project.

dotnet add package GemBox.PdfViewer

After that, you can use tag helper to initialize the PDF viewer:

<gembox-pdfviewer 
    style="width:600px;height:350px;" 
    license-key="FREE-LIMITED-KEY">
</gembox-pdfviewer>