NickNaso / ghostscript4js

Ghostscript4JS binds the Ghostscript C API to the Node.JS world.
http://www.nacios.it
Apache License 2.0
66 stars 19 forks source link

Support For firebase functions ? #55

Open konlikha opened 4 years ago

konlikha commented 4 years ago

@NickNaso Hey brother,

This library can be really usefull for firebase and aws lambada users. I am using firebase and the available options for gs is not updated for a while (like available gs version is best at 9.2) See this Ghostscript Firebase Functions on stackoverflow as with available library using -c (postscript command) is not possible for a reason.

Pleaee modify the installation process of GS4JS for firebase functions, like node-gs is doing, looking for executable(portable to be uploaded) in folder

It would be really great. Waiting for your positive response brother :)

NickNaso commented 4 years ago

Hi @konlikha, you are right the library could be useful in a serverless environment. The things for ghostscript4js are different from node-gs. What I'm trying to do is to create a process to build ghostscript like a shared library and then use that library on ghostscript4js folder so the installation process will use this library. There are many aspects to consider:

konlikha commented 4 years ago

@NickNaso hii nick thank your for your response.

I think the way to make this support serverless is that don't link it to system variables and look for so/executable files provided by user in gs4js call .

For example this is v9.52 prebuild https://www.archlinux.org/packages/extra/x86_64/ghostscript/

This contains a lib folder where .so files are located. I Don't have much info on which files are required to run gs but hope this has everything, just look for the files here or user provided path at call time not on install time.

This is the way node-gs works it simply looks for gs executable by looking in path provided by user in gs call.

I hope you got what i am trying say.

konlikha commented 4 years ago

Hey @NickNaso Any updates on it ? I have been waiting for your reply... I think looking for executables in user provided location would make it work like 'gs.path("path to exutable here"). execute'

Waiting for your reply again.. Hope it this time it will not be month