React Pdf Js

screenshot of React Pdf Js
react
vite

A React component to wrap PDF.js

Overview:

React-pdf-js is a component that utilizes PDF.js to render PDF documents in a React application. It provides functionalities for loading and displaying PDF files with various customization options.

Features:

  • PDF Rendering: Render PDF documents using PDF.js in a React application.
  • UsePdf Hook: Utilize the usePdf hook to integrate PDF functionality into the app easily.
  • Customization Options: Scale, rotate, and specify callback functions for document and page loading/rendering events.
  • Error Handling: Specify callbacks for handling errors during document and page loading/rendering.
  • CMap Configuration: Customize the cmap URL and specify whether cmaps are packed or not.
  • Worker Configuration: Specify custom PDF worker URL for rendering PDF files.
  • Credential Handling: Add the withCredentials flag for handling credentials during PDF operations.
react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

vite
Vite

Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.