Skip to content

pdfjs-express/pdfjs-express-blazor-sample

Repository files navigation

PDF.js Express - Blazor sample

PDF.js Express is a powerful JavaScript-based PDF Library that leverages PDF.js and adds additional features such as annotations, form support, and digitial signatures. It provides a slick out-of-the-box responsive UI that interacts with the core library to view, annotate and manipulate PDFs that can be embedded into any web project.

This repo is specifically designed for any users interested in integrating WebViewer into a Blazor project. This project was integrated using the Blazor server-sided application template.

Initial setup

Before you begin, make sure your development environment includes .NET Core 3.0 SDK and Node.js.

Install

git clone https://github.com/pdfjs-express/pdfjs-express-blazor-sample.git
cd pdfjs-express-blazor-sample
npm install

Run

npm start

Navigate to https://localhost:5001/webviewer

PDF.js Express APIs

See API documentation.

Calling APIs

PDF.js Express is a complete browser side PDF SDK, unlocking viewing, parsing and editing of PDF files. You can modify the constructor in wwwroot/js/webviewerScripts.js:

initWebViewer: function () {
    const viewerElement = document.getElementById('viewer');
    WebViewer({
        path: 'lib',
        initialDoc: 'https://pdftron.s3.amazonaws.com/downloads/pl/demo-annotated.pdf', // replace with your own PDF file
    }, viewerElement).then((instance) => {
        // call APIs here
    })
}

You can refer to this guide for more information

License

See license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published