yakovmeister / pdf2image

A utility for converting pdf to image and base64 format.
MIT License
434 stars 141 forks source link

An error appears when processing the file #133

Closed kravetsone closed 3 years ago

kravetsone commented 3 years ago

Error: Command failed: GPL Ghostscript 9.50: Unrecoverable error, exit code 1 1|index | gm convert: "gs" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=pnmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r500x500" "-dFirstPage=1" "-dLastPage=1" "-sOutputFile=/tmp/gmMhOcbv" "--" "/tmp/gmKyhQSE" "-c" "quit". 1|index | gm convert: Unexpected end-of-file (/tmp/gmMhOcbv). code: await fromBuffer(res.data, { density: 500, format: "png", saveFilename: momentDate.format("DD-MM-YY"), savePath: "./images", width: 1280, height: 1560 }).bulk([1], !true); file = https://zkno.mskobr.ru/files/meny/11-11-21_SPO.pdf

kravetsone commented 3 years ago

I don’t know what the problem was (maybe because of the memory, because it was then about 200MB), but now everything works (and I cleared the memory)