title: Problem in getting result form tessearct.js in PDF
body: <p>I am building a simple javaScript OCR(optical content recognition) app using tesseract.js and I am passing {tess_create_pdf: "1"} into the .recognize() method to get the result in pdf format but it's not working. So please someone let me know the problem i am making.</p>
  
  <pre><code>const express  = require('express');
  const app      = express();
  const fs       = require('fs');
  const multer   = require('multer');
  const { createWorker } = require("tesseract.js");
  const worker           = createWorker();
  
  app.set("view engine", "ejs");
  const storage = multer.diskStorage({
      destination: (req, file, cb) =&gt; {
          cb(null, './uploads');
      },
      filename: (req, file, cb) =&gt; {
          cb(null, file.originalname);
      }
  })
  
  const upload = multer({storage: storage}).single('avatar');
  
  app.get('/', (req, res) =&gt; {
      res.render('index');
  });
  
  app.post('/upload', (req, res) =&gt; {
      upload(req, res, err =&gt; {
          fs.readFile(`./uploads/${req.file.originalname}`, (err, data) =&gt; {
          if(err) return console.log('this is your error', err);
  
          (async ()=&gt; {
              await worker.load();
              await worker.loadLanguage('eng');
              await worker.initialize('eng');
              const { data: { text } } = await worker.recognize(data, { tessjs_create_pdf: "1"});
              res.send(text);
              await worker.terminate();
          })();
      });
    })
  })
  
  var port = 3000 || process.env.PORT;
  app.listen(port, () =&gt; {
       console.log("server has started!!!!");
  })
  </code></pre>