title: How to write images from URL to PDFkit?
body: <p>I am getting a JPEG from a URL using node.js requests.
  I then convert the image to a base64 buffer and write it to the pdf document:</p>
  <pre><code>request({ url: url, encoding: null }, function (error, response, body) {
                          if (!error &amp;&amp; response.statusCode == 200) {
                              var img = new Buffer(body, 'base64');
                              pdf.image(img, 0, 0);
                              callback(error, body);
                          }
                      });
  </code></pre>
  <p>I am getting the following error message:</p>
  <pre><code>events.js:160
        throw er; // Unhandled 'error' event
        ^
  
  Error: stream.push() after EOF
      at readableAddChunk (_stream_readable.js:156:17)
      at PDFDocument.Readable.push (_stream_readable.js:134:10)
      at PDFDocument._write 
  </code></pre>