This is a simple JavaScript script that reads all the PDF files from a folder and counts the number of pages in each PDF. It then displays the total number of pages in the console.
Before running this script, make sure you have the following installed:
- Node.js
-
Clone this repository to your local machine.
-
Navigate to the project directory.
-
Install the dependencies by running the following command:
npm install
-
Place all the PDF files you want to count the pages of in a folder.
-
Update the
folderPath
variable in theindex.js
file with the path to your folder. -
Run the script by executing the following command:
node index.js
The script will read all the PDF files in the specified folder, count the pages, and display the total number of pages in the console.
This project is licensed under the MIT License.