WebViewer is a powerful JavaScript-based PDF Library that's part of the PDFTron PDF SDK. 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.
You can explore all of the functionality in our showcase.
Before you begin, make sure your development environment includes .NET 5 SDK and Node.js.
git clone https://github.com/PDFTron/webviewer-blazor-sample.git
cd webviewer-blazor-sample
npm install
npm start
Navigate to https://localhost:5001/webviewer
See API documentation.
PDFNetJS Full is a complete browser side PDF SDK, unlocking viewing, parsing and editing of PDF files. To enable full API, you can modify 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
+ fullAPI: true
}, viewerElement).then((instance) => {
// call APIs here
})
}
You can refer to this guide for more information
See license.