You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-files-viewer

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-files-viewer

Viewer for different files (pdf, other)

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
57
119.23%
Maintainers
2
Weekly downloads
 
Created
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

pdf

FAQs

Package last updated on 17 Apr 2021

Did you know?

Socket

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