Socket
Socket
Sign inDemoInstall

@types/pdf-viewer-reactjs

Package Overview
Dependencies
3
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pdf-viewer-reactjs

TypeScript definitions for pdf-viewer-reactjs


Version published
Maintainers
1
Weekly downloads
1,465
decreased by-28.5%

Weekly downloads

Readme

Source

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

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

Credits

These definitions were written by Ansuman Ghosh.

FAQs

Last updated on 07 Nov 2023

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