title: ImageMagick: PDF to PNG nodejs without using files?
body: <p>I need to create an endpoint to render a pdf to an image in nodejs and after trying different approaches imagemagick/ghostscript seem to be the best option.</p>
  
  <p>However they expect files as input and output.</p>
  
  <p>Is there a way to only work in memory/variables instead of messing with filesystem (performance/resources is a concern here)?</p>
  
  <p>The ideal scenario is to provide a pdf as base64 string to imagemagick and get an image in base64 string as well.</p>
  
  <p>But since imagemagick is a command line tool I have no idea how to accomplish that and if it's possible at all? Maybe there is a way to hook into the streaming process so I could override where the data goes (like somehow overriding stdin/stdout of imagemagick process or whatever to accumulate the data in a variable instead of sending it to a file)</p>
  
  <p>Or if it's a dead-end, what are alternatives to render pdf to png in node without using files? 
  Tried pdf.js which sort of does it but it appeared to be very unreliable in node for this.</p>
  
  <p>Any advice is much appreciated</p>