
Security News
CISA Rebuffs Funding Concerns as CVE Foundation Draws Criticism
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
pdf-image-extractor
Advanced tools
pdf-image-extractor is a toolkit designed to help you extract images from PDF files easily. Whether you're dealing with URLs, blobs, or local binary data, this package can handle multiple file types. The module provides a streamlined interface for extracting images in common formats like PNG and JPEG from your PDF files.
Install the package by running:
npm install pdf-image-extractor
Below are quick usage guides for image extraction from a PDF file.
const { ExtractImages } = require("pdf-image-extractor");
const pdfSource = "path/to/your/document.pdf"; // This can be a URL or a Blob
const fileType = "url"; // or 'blob' based on your input type
ExtractImages({ pdf: pdfSource, fileType: fileType }).then((images) => {
images.forEach((image) => {
console.log(image.url); // Blob URL for the image
// You can use the blob URL to display the image or download it
});
});
ExtractImages({ pdf, fileType })
Extracts images from a PDF document and provides Blob URLs for use.
Parameters:
pdf
: A String URL or Blob of the PDF file.fileType
: A string indicating the type of pdf
. Use 'url'
for URL inputs and 'blob'
for Blob inputs.Returns:
blob
, url
, type
, and imageType
corresponding to the extracted image.Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Distributed under the MIT License. See LICENSE
for more information.
FAQs
The npm package pdf-image-extractor receives a total of 18 weekly downloads. As such, pdf-image-extractor popularity was classified as not popular.
We found that pdf-image-extractor 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
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.