Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it works for PDF files too? #12

Open
JulienLecoq opened this issue Oct 21, 2023 · 1 comment
Open

Does it works for PDF files too? #12

JulienLecoq opened this issue Oct 21, 2023 · 1 comment

Comments

@JulienLecoq
Copy link

JulienLecoq commented Oct 21, 2023

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/[email protected]/src/internal/exception/exception.ts:105:19)
    at Function.throw (https://deno.land/x/[email protected]/src/internal/exception/exception.ts:93:29)
    at Function.checkException (https://deno.land/x/[email protected]/src/internal/exception/exception.ts:62:22)
    at https://deno.land/x/[email protected]/src/internal/exception/exception.ts:48:24
    at Function.use (https://deno.land/x/[email protected]/src/internal/pointer/pointer.ts:27:14)
    at Function.use (https://deno.land/x/[email protected]/src/internal/exception/exception.ts:45:20)
    at MagickImage.readOrPing (https://deno.land/x/[email protected]/src/magick-image.ts:2693:15)
    at MagickImage.read (https://deno.land/x/[email protected]/src/magick-image.ts:2064:10)
    at https://deno.land/x/[email protected]/src/image-magick.ts:207:17
    at Function._disposeAfterExecution (https://deno.land/x/[email protected]/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.

@oscarotero
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants