
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@types/pdf-viewer-reactjs
Advanced tools
TypeScript definitions for pdf-viewer-reactjs
npm install --save @types/pdf-viewer-reactjs
This package contains type definitions for pdf-viewer-reactjs (https://github.com/ansu5555/pdf-viewer-reactjs#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pdf-viewer-reactjs.
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;
These definitions were written by Ansuman Ghosh.
FAQs
TypeScript definitions for pdf-viewer-reactjs
The npm package @types/pdf-viewer-reactjs receives a total of 1,510 weekly downloads. As such, @types/pdf-viewer-reactjs popularity was classified as popular.
We found that @types/pdf-viewer-reactjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.