npm i -g http-server
http-server public
There are two implementations of PDF merging in this repo:
- Using pdfjs - http://localhost:8080/pdfjs-approach/
This approach merges PDF contents. It retains text and images. Text is highlightable etc (i.e it's good, quality wise)
- Using canvas - http://localhost:8080/canvas-approach/
This use HTML5 canvas to render the PDF content first and then convert each page to PNG or JPEG and then save it to a new PDF. But this is not only slow, the quality of images maybe not be like merging PDFs properly together.
npm i -g parcel-bundler
cd public/pdfjs-approach/
parcel pdf-merger-js-adapted.js
No steps needed. Used Mozilla's pdf.js library from CDN. (Note "pdfjs" is not same as Mozilla's pdf.js. Former is name of an npm module written by "Markus Ast")