title: Error creating PDF in NodeJS using html-pdf
body: <p>I'm using below code to generate PDF using html-pdf library the code is working and generate and save the pdf on my local system but when i go with server its giving error. Node library is :- <code>html-pdf</code></p>
  
  <pre><code>pdf.create(html).toFile(config.media_image+`invoices/invoice-${params._id}.pdf`,
  function(err, res){console.log(res.filename);}});
  </code></pre>
  
  <p>But it's not working on the server and working fine in local system.below the error is:-</p>
  
  <pre><code>events.js:167
            throw er; // Unhandled 'error' event        
      Error: write EPIPE
          at WriteWrap.afterWrite [as oncomplete] (net.js:792:14)
      Emitted 'error' event at:
          at onwriteError (_stream_writable.js:431:12)
          at onwrite (_stream_writable.js:456:5)
          at _destroy (internal/streams/destroy.js:40:7)
          at Socket._destroy (net.js:617:3)
          at Socket.destroy (internal/streams/destroy.js:32:8)
          at WriteWrap.afterWrite [as oncomplete] (net.js:794:10)
  </code></pre>
  
  <p>Please let me know the issue....</p>