Socket
Socket
Sign inDemoInstall

pdfmerge

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pdfmerge

Merge PDF files


Version published
Maintainers
1
Install size
11.5 kB
Created

Readme

Source

PDFMergeJS

npm version

Merge PDF files into one.

What's new

  1. PDFMerge is now promise based.
  2. Better error handling.

Requirements

  1. Python 3 or above
  2. PyPDF2 >= 1.21
To install PyPDF2, run pip install PyPDF2>=1.21

Usage

  1. Install the module using npm install pdfmerge

  2. Require the module

    let PDFMerge = require('pdfmerge')
    
  3. PDFMerge(inputFiles, outputFile) - function

    • inputFiles - Array : An Array of all the input files
    • outputFile - String : String containing the output filename
  4. Example code:

    PDFMerge(['input-1.pdf', 'input-2.pdf'], 'output.pdf').then(function(done){
        console.log(done) // success
    }).catch(function(error){
        console.error(error.code) // Logs error code if an error occurs
    })
    

    error.code returns :

    • 404 - If any or all of the input files are not found
    • 1 - If PyPDF2 is not installed

Thanks to pdfmerge

MIT © 2017-2019 Akash Rajendra

Keywords

FAQs

Last updated on 05 Jun 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc