Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extract-pdf-images

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extract-pdf-images

extract images from pdf

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

extract-pdf-images

Overview

extractImagesFromPDF is a utility function that extracts images from a PDF document and saves them to a specified folder. It returns a promise that resolves to an array of objects, each containing the page number and a list of image file paths extracted from that page.


const { extractImagesFromPDF } = require('extract-pdf-images');

extractImagesFromPDF('path/to/source.pdf', 'path/to/destination/folder')
   .then(result => {
        result.forEach(page => {
            console.log(`Page ${page.pageNumber} has images:`);
            page.images.forEach(imagePath => {
                console.log(imagePath);
            });
        });
    })
   .catch(error => {
        console.error('Error extracting images:', error);
    });

Keywords

FAQs

Package last updated on 22 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc