@xieliang6888/pdf-to-image

1.0.3 • Public • Published

@xieliang6888/pdf-to-image

A React component to render PDF pages as images using pdfjs-dist.

Installation

To install the package, run:

npm install @xieliang6888/pdf-to-image


import React from "react";
import PdfToImage from "@xieliang6888/pdf-to-image";

const App = () => {
  const handlePdfLoad = (success) => {
    if (success) {
      console.log("PDF successfully converted to images.");
    } else {
      console.log("Failed to convert PDF.");
    }
  };

  return (
    <div>
      <h1>PDF to Image Example</h1>
      <PdfToImage 
        file="path/to/your/pdf/file.pdf"
        fromPdfToImage={handlePdfLoad}
      />
    </div>
  );
};

export default App;

Dependents (0)

Package Sidebar

Install

npm i @xieliang6888/pdf-to-image

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

18.4 kB

Total Files

5

Last publish

Collaborators

  • xieliang6888