Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Merging two pdf files

This script can be used to merge any two pdf files into one using JavaScript. Run merge.js and upload the pdf files which are to be merged and the ouput will be a single pdf file obtained by merging the uploaded pdfs.

Module Required

  • pdf-lib pdf-lib npm is a tool to modify exsisting pdfs using Node.js.

Installation of the above module

Install the module usingnpm install pdf-lib command. The module will be added to package.json

How to merge pdfs

  • Download or clone the repository.
  • Install the requird module (pdf-lib).
  • Run merge.js and add the pdfs which are to be merged.
  • The merged pdf(named final_merged_pdf.pdf) will appear in the same directory.

Output

The files I used hello.pdf and world.pdf have been added to the folder Merged_pdfs. Here's the ouput:

Pdf1

hello

Pdf2

world

Merged Pdf

final_merged_pdf.mp4