Socket
Socket
Sign inDemoInstall

react-files-viewer

Package Overview
Dependencies
113
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-files-viewer

Viewer for different files (pdf, other)


Version published
Weekly downloads
29
decreased by-6.45%
Maintainers
2
Install size
47.0 MB
Created
Weekly downloads
 

Readme

Source

react-files-viewer

Viewer for differents files (pdf, other)

NPM JavaScript Style Guide

📦 Install

npm install --save react-files-viewer

🔨 General Usage

import React from 'react'
import { PdfContainer } from 'react-files-viewer'

const App = () => {
  return (
    <PdfContainer
      // your pdf url
      url="http://www.africau.edu/images/default/sample.pdf"
      // your page number
      pageNumber={1}
    />
  )
}

export default App

PdfContainer

This component provides access to a PDF viewer with control over it (zoom, print, etc.).

<PdfContainer
      // your pdf url
      url="http://www.africau.edu/images/default/sample.pdf"
      // your page number
      pageNumber={1}
      // get number of pages
      getNumPages={(numPages) => console.log("numPages", numPages)}
/>

PdfViewer

This component provides access ti a Mozilla PDF viewer with custom setting

<PdfViewer
      // your pdf url
      url="http://www.africau.edu/images/default/sample.pdf"
      // your page number
      pageNumber={1}
      // get number of pages
      getNumPages={(numPages) => console.log("numPages", numPages)}
      // container style
      containerStyle={}
      // viewer style
      viewerStyle={}
/>

License

MIT © vladimirevstratov

Keywords

FAQs

Last updated on 17 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc