# empower-file-viewer

> --- ### Installation --- ``` npm i empower-file-viewer ``` ### Usage ``` Include in the component:

Latest version **0.1.4** (published 2022-07-14) · 0 weekly downloads

## Install

```sh
npm install empower-file-viewer
pnpm add empower-file-viewer
yarn add empower-file-viewer
bun add empower-file-viewer
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2022-07-14 |
| First published | 2022-05-11 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 15 |
| Unpacked size | 96.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | empower.dio.danganan, empower-harold, regino.victorino, mquibal, mike.baccay |

## Links

- npm: https://www.npmjs.com/package/empower-file-viewer
- npm.io page: https://npm.io/package/empower-file-viewer

## Dependencies (15)

- [sass](https://npm.io/package/sass.md) ^1.49.9
- [react](https://npm.io/package/react.md) ^16.0.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.0.0
- [typescript](https://npm.io/package/typescript.md) ^4.6.3
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [@types/jest](https://npm.io/package/@types/jest.md) ^27.4.1
- [@types/node](https://npm.io/package/@types/node.md) ^16.11.26
- [@types/react](https://npm.io/package/@types/react.md) ^17.0.43
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.0
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^17.0.14
- [react-file-viewer](https://npm.io/package/react-file-viewer.md) ^1.2.1
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^12.1.4
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.3
- [react-watermark-component](https://npm.io/package/react-watermark-component.md) ^2.2.1
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

## Recent versions

- 0.1.4 (latest) — 2022-07-14
- 0.1.3 — 2022-07-14
- 0.1.2 — 2022-07-13
- 0.1.1 — 2022-05-11
- 0.1.0 — 2022-05-11

## README

# Empower File Viewer
---
### Installation
---
```
npm i empower-file-viewer
```
### Usage
```
Include in the component:

import FileViewer from 'empower-file-viewer';
```
### Properties
```
file - Object that consist of path and type.
path - The path of the file you wanted to view, MUST be on the public folder.
type - Type of the file (e.g. pdf,png,jpeg).
```
```
watermark - This string would be used to watermark your file just for security reason if they downloaded it as image, this is an optional property.
```
### Limitations
```
The file viewer only caters the following file types (.docx,.pdf,.png,.jpeg,.jpg)
```
### Example
```
const sampleProps = {
  file: {
    path : 'sample.pdf', //public path
    type : 'pdf',
  },
  watermark : 'EMPOWER'
};
const App = () => {

  return (
    <div className="sample-div">
      <FileViewer
        {...sampleProps}
      />
    </div>
  );
}

export default App;
```

---
_Source: https://npm.io/package/empower-file-viewer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
