0.0.1 • Published 1 year ago

next-pdf-viewer v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

PDF Viewer

A simple and efficient PDF viewer web component built with Kit and PDF.js. This component allows you to display and navigate through PDF documents within your application seamlessly.

Warning: This component is still in development and may not work as expected.

Features

  • Easy Integration: Quickly integrate the PDF viewer into your application.
  • Responsive Design: Adapts to different screen sizes.
  • Navigation: Supports page navigation (next, previous, specific page).
  • Zoom: Ability to zoom in and out of pages.
  • Performance: Optimized for performance with large PDF files.

Installation

To install the PDF Viewer Web Component, run:

npm install nex-pdf-viewer

Usage

Here's how to use the PDF Viewer Web Component in your application:

Import the Component

First, import the PDF Viewer Web Component into your application:

import PDFViewer from 'next-pdf-viewer';

Use the Component

Then, use the component in your render method:

function App() {
  return (
    <div className="App">
      <next-pdf-viewer url="/path/to/your/pdf/document.pdf" />
    </div>
  );
}

export default App;

Props

PropTypeDescription
urlStringThe URL of the PDF document to display.
scaleNumberThe initial zoom level (default: 1).

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thanks to PDF.js for providing a powerful PDF rendering library.
  • Thanks to the Kit framework for providing an excellent foundation.
  • Inspiration and code snippets were taken from various open-source projects.
0.0.1

1 year ago