Open JulienLecoq opened 10 months ago
I'm trying to read a PDF file and every time I try, I get this error:
error: Uncaught (in promise) Error: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBi ts=4 -dGraphicsAlphaBits=4 '-r72x72' -dPrinted=false '-sOutputFile=/tmp/magick-BpJ_DS4NDVs4hz7B32Q9WkfPVnJmPJFN%d' '-f/tmp/magick-HFgrZ0nlH_Dk1jSFaGrtegMHXkiNiFiL' '-f/tmp/magick-o0WiEnqt2l8LP2WfTIMApk1OJ0GdhmNd'' (-1) @ error/delegate.c/ExternalDelegateCommand/520 const error = new MagickError(errorMessage, severity); ^ at Function.createError (https://deno.land/x/imagemagick_deno@0.0.26/src/internal/exception/exception.ts:105:19) at Function.throw (https://deno.land/x/imagemagick_deno@0.0.26/src/internal/exception/exception.ts:93:29) at Function.checkException (https://deno.land/x/imagemagick_deno@0.0.26/src/internal/exception/exception.ts:62:22) at https://deno.land/x/imagemagick_deno@0.0.26/src/internal/exception/exception.ts:48:24 at Function.use (https://deno.land/x/imagemagick_deno@0.0.26/src/internal/pointer/pointer.ts:27:14) at Function.use (https://deno.land/x/imagemagick_deno@0.0.26/src/internal/exception/exception.ts:45:20) at MagickImage.readOrPing (https://deno.land/x/imagemagick_deno@0.0.26/src/magick-image.ts:2693:15) at MagickImage.read (https://deno.land/x/imagemagick_deno@0.0.26/src/magick-image.ts:2064:10) at https://deno.land/x/imagemagick_deno@0.0.26/src/image-magick.ts:207:17 at Function._disposeAfterExecution (https://deno.land/x/imagemagick_deno@0.0.26/src/internal/disposable.ts:20:22)
If I do the same with a JPEG image, it works perfectly and I don't get any error.
You should ask to the original author: https://github.com/dlemstra/magick-wasm This code is just a port to make it working on Deno. But it doesn't support SVG formats so I guess PDF neither.
I'm trying to read a PDF file and every time I try, I get this error:
If I do the same with a JPEG image, it works perfectly and I don't get any error.