title: How to read the content of a .pdf file using nodejs?
body: <p>I have a scenario to automate the PDF contents. How to retrieve the content of the PDF file in nodejs.</p>
  
  <p>I am completely blocked for this. Although there are few posts on <code>pdf2jsona</code> and <code>jsonreader</code> but those are not working for me. Any help will be appreciated for the same.</p>
  
  <pre><code>var pdfParser = new PDFParser();
  fs.readFile(pdfFilePath, function(err, pdfBuffer) {
      pdfParser.parseBuffer(pdfBuffer);
  }, function(pdfBuffer){
      pdfParser.parseBuffer(pdfBuffer);
  })
  </code></pre>
  
  <blockquote>
    <p>Error: Invalid parameter array, need either .data or .url
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)</p>
  </blockquote>