0

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

xyz
  • 1
  • 1
  • Hey, Thank you for your question, i believe this was already solve here. Link : https://stackoverflow.com/questions/60540114/get-total-number-of-words-in-a-pdf – Jaskaran Deol Jan 15 '23 at 18:25

0 Answers0