# @types/pdf-viewer-reactjs

> TypeScript definitions for pdf-viewer-reactjs

Latest version **2.2.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pdf-viewer-reactjs
pnpm add @types/pdf-viewer-reactjs
yarn add @types/pdf-viewer-reactjs
bun add @types/pdf-viewer-reactjs
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.2.5 |
| Published | 2023-11-07 |
| First published | 2020-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pdf-viewer-reactjs
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-viewer-reactjs
- npm.io page: https://npm.io/package/@types/pdf-viewer-reactjs

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 2.2.5 (latest) — 2023-11-07
- 2.2.2 (ts3.6) — 2021-07-08
- 2.2.1 (ts3.4) — 2021-02-19
- 2.0.0 (ts2.8) — 2020-03-31
- 2.2.4 — 2023-10-18
- 2.2.3 — 2023-09-24
- 2.2.0 — 2021-02-01

## README

# Installation
> `npm install --save @types/pdf-viewer-reactjs`

# Summary
This package contains type definitions for pdf-viewer-reactjs (https://github.com/ansu5555/pdf-viewer-reactjs#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-viewer-reactjs.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-viewer-reactjs/index.d.ts)
````ts
import { Component } from "react";

interface Document {
    url?: string | undefined;
    base64?: string | undefined;
}

interface ShowThumbnail {
    scale?: number | undefined;
    rotationAngle?: number | undefined;
    onTop?: boolean | undefined;
    backgroundColor?: string | undefined;
    thumbCss?: string | undefined;
    selectedThumbCss?: string | undefined;
}

interface Watermark {
    text?: string | undefined;
    diagonal?: boolean | undefined;
    opacity?: string | undefined;
    font?: string | undefined;
    size?: string | undefined;
    color?: string | undefined;
}

interface Err {
    message: string;
}

type DocClickHandler = () => void;
type BtnClickHandler = (page: number) => void;
type ZoomClickHandler = (scale: number) => void;
type RotationClickHandler = (angle: number) => void;
type AlertHandler = (err: Err) => React.ReactNode;
type MaxPageCount = (pageCount: number) => void;

interface PDFViewerProps {
    document: Document;
    withCredentials?: boolean | undefined;
    password?: string | undefined;
    loader?: React.ReactNode | undefined;
    externalInput?: boolean | undefined;
    page?: number | undefined;
    scale?: number | undefined;
    scaleStep?: number | undefined;
    maxScale?: number | undefined;
    minScale?: number | undefined;
    css?: string | undefined;
    canvasCss?: string | undefined;
    rotationAngle?: number | undefined;
    onDocumentClick?: DocClickHandler | undefined;
    onPrevBtnClick?: BtnClickHandler | undefined;
    onNextBtnClick?: BtnClickHandler | undefined;
    onZoom?: ZoomClickHandler | undefined;
    onRotation?: RotationClickHandler | undefined;
    getMaxPageCount?: MaxPageCount | undefined;
    hideNavbar?: boolean | undefined;
    navbarOnTop?: boolean | undefined;
    hideZoom?: boolean | undefined;
    hideRotation?: boolean | undefined;
    showThumbnail?: ShowThumbnail | undefined;
    protectContent?: boolean | undefined;
    watermark?: Watermark | undefined;
    alert?: AlertHandler | undefined;
    navigation?: any;
}

declare class PDFViewer extends Component<PDFViewerProps> {
    static defaultProps: Partial<PDFViewerProps>;
    static propTypes: PDFViewerProps;
}

export = PDFViewer;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [Ansuman Ghosh](https://github.com/ansu5555).

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