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

Receiving GraphicsMagick/ImageMagick - gm/convert binaries error passing file URL #77

Open
zakpucci opened this issue Oct 28, 2024 · 2 comments

Comments

@zakpucci
Copy link

zakpucci commented Oct 28, 2024

It's possible I'm misunderstanding the use case of this package, but I don't think thats the case. I want to use this package in a Lambda function, like any typical NPM package would be used, so Homebrew doesn't really apply in those cases.

How am I supposed to install GraphicsMagick/ImageMagick then?

Error during PDF conversion: Error: Could not execute GraphicsMagick/ImageMagick: gm "identify" "-ping" "-format" "%p" "-" this most likely means the gm/convert binaries can't be found

Node Version: 18.x
NPM version: 10.2.3
Environment: Serverless Offline
Package Version: ^1.0.31

@zakpucci
Copy link
Author

Update: I'm using an AWS signed URL. Could that have something to do with it? ie: Not able to resolve the file?

@zakpucci
Copy link
Author

zakpucci commented Oct 28, 2024

Looks like we're possibly losing the URL parameters in the process -

Screenshot 2024-10-28 at 5 50 15 PM

A typical signed URL:
https://[BUCKET NAME].s3.us-east-1.amazonaws.com/[PATH]?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=[CRED]t&X-Amz-Date=20241028T214426Z&X-Amz-Expires=120&X-Amz-Signature=[SIG]&X-Amz-SignedHeaders=host&x-id=GetObject

--
Suggestion: User should control the URL input, assuming the URL parameters don't have any bearing on the produced file will lead to exactly this. My use case may be more unique, but even something as simple as https://somewebsite.com/file.pdf?page=3 would likely have conversion on a server to output https://somewebsite.com/file.pdf#page=3 - which is valid pdf url syntax.

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

1 participant