i am try to count total number of word in pdf book
const fs = require("fs")
const path =require('path')
const file = path. join(__dir+"public")
fs.readFile(file,(err,data)=>{
const count=0
for(let i=0;i<data.length;i++) {
if(data.length>count) {
count= data. length
}
}
})
output total number of word pdf book = 200 like this