1.0.1 • Published 7 months ago

pdf-parser-client-side v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

PDF Parser Client Side

A lightweight easy to use package to parse text from PDF files on client side without any server dependency.

How to Install ?

Use npm or yarn to install this npm package

npm i pdf-parser-client-side

or

yarn add pdf-parser-client-side

Include the package

import extractTextFromPDF from "pdf-parser-client-side";

Basic Example:

import React from "react";
import extractTextFromPDF from "pdf-parser-client-side";

export default function Test() {
  return (
    <div>
      <input
        type="file"
        name=""
        id="file-selector"
        accept=".pdf"
        onChange={(e) => {
          // Selecting the first file
          const file = e.target.files[0];
          //   If file exists then we will call our function
          if (file) {
            extractTextFromPDF(file).then((data) => {
              console.log(data);
            });
          }
        }}
      />
    </div>
  );
}

Contributing

Feel free to contribute!

  1. Fork the repository
  2. Make changes
  3. Submit a pull request

</> with 💛 by Vishwa Gaurav

1.0.1

7 months ago

1.0.0

7 months ago