@pdf-highlight/react-pdf-highlight
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

PDF Highlight => PDFJS version 3.11.174

type Props = {
  url?: string,
  width?: number | string,
  scale?: number,
  page?: number,
  pageSearch?: number,
  onLoaded?: (error?: any) => void,
  onStartLoad?: (error?: any) => void,
  keywords?: string[],
  colorHighlight?: string,
  isBorderHighlight?: boolean,
  styleWrap?: CSSProperties,
  debug?: boolean,
  allowHtml?: boolean,
  extractLetterSpacing?: number,
  specialWordRemoves?: string[],
};

import { PDFHighlight } from "@pdf-highlight/react-pdf-highlight";

function App() {
  return (
    <PDFHighlight
      onStartLoad={() => {
        console.log("start loading");
      }}
      onLoaded={() => {
        console.log("end loading");
      }}
      keywords={[
        `facilisis odio sed mi.\nCurabitur suscipit. Nullam vel nisi. Etiam semper ipsum ut lectus. Proin aliquam, erat eget\npharetra commodo, eros mi condimentum quam,`,
      ]}
      url="https://pdfobject.com/pdf/sample.pdf"
    />
  );
}

export default App;

Package Sidebar

Install

npm i @pdf-highlight/react-pdf-highlight

Weekly Downloads

2

Version

1.2.2

License

UNLICENSED

Unpacked Size

37.8 kB

Total Files

5

Last publish

Collaborators

  • levinhsang