Thumbnail the first page of a pdf from a stream in GraphicsMagick
问题 I know how to use GraphicsMagick to make a thumbnail of the first page of a pdf if I have a pdf file and am running gm locally. I can just do this: gm(pdfFileName + "[0]") .background("white") .flatten() .resize(200, 200) .write("output.jpg", (err, res) => { if (err) console.log(err); }); If I have a file called doc.pdf then passing doc.pdf[0] to gm works beautifully. But my problem is I am generating thumbnails on an AWS Lambda function, and the Lambda takes as input data streamed from a