Introduction
Nodejs is used to run javascript files.
Installation
For ubuntu you can follow the official instruction. For ubuntu 22.04 this is what I ran in the terminal.
1
2
3
4
5
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
nodejs -v
node -v
Installing Pdf.js
The official instruction as repeated below.
1
2
3
4
5
git clone https://github.com/mozilla/pdf.js.git
cd pdf.js
npm install -g gulp-cli
npm install
gulp server