You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

react-doc-viewer-plus

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-doc-viewer-plus

A powerful document viewer component for React that supports various file formats including images, PDF, Office documents, OFD files and videos

1.0.4
latest
Source
npm
Version published
Weekly downloads
92
-2.13%
Maintainers
0
Weekly downloads
 
Created
Source

React Doc Viewer Plus

A powerful document viewer component for React that supports various file formats including images, PDF, Office documents, OFD files and videos.

Features

  • 📷 Image preview support (jpg, jpeg, png, gif)
  • 📄 PDF viewer
  • 📊 Microsoft Office documents preview (doc, docx, xls, xlsx, ppt, pptx)
  • 📑 OFD document preview
  • 🎥 Video player support (mp4)
  • 💾 Download support for office documents
  • 🎨 Beautiful and responsive UI
  • 🔧 Easy to integrate and customize

Installation

npm install react-doc-viewer-plus
# or
yarn add react-doc-viewer-plus

Usage

import { DocViewerPlus } from 'react-doc-viewer-plus';

function App() {
  const [visible, setVisible] = useState(false);

  return (
    <DocViewerPlus
      previewFile={{
        fileUrl: 'https://example.com/sample.pdf',
        fileName: 'Sample Document.pdf'
      }}
      visibleViewerPlus={visible}
      onVisibleChange={() => setVisible(!visible)}
    />
  );
}

Preview

Image Preview

Image Preview

PDF Preview

PDF Preview

Office Preview

Office Preview

Video Preview

Video Preview

Props

PropTypeDescription
previewFile{ fileUrl?: string; fileName?: string; }The file to preview
response{ url?: string; }Optional response object containing alternative URL
visibleViewerPlusbooleanControls the visibility of the viewer
onVisibleChange() => voidCallback when visibility changes

Supported File Types

  • Images: jpg, jpeg, png, gif
  • Documents: pdf, doc, docx, xls, xlsx, ppt, pptx, ofd
  • Video: mp4

License

MIT

Keywords

react

FAQs

Package last updated on 31 Dec 2024

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