corymickelson / CommonPdf

Pdf utility library
16 stars 5 forks source link

pdf signing error #13

Open granci opened 6 years ago

granci commented 6 years ago

while trying to run write() method on Sign class, i'm getting error: "UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): podofosign: error while loading shared libraries: libpodofo.so.0.9.5: cannot open shared object file: No such file or directory"

it seems that the libpodofo from node_modules is located correctly, but the package somehow can't use it... what should be the possible issue?

corymickelson commented 6 years ago

@granci what operating system are you on? The node modules that CommonPdf is loading have been compiled specifically for execution in AWS Lambda (compiled on Centos 6). The setup method puts the required binaries on the aws lambda execution path, the error that you are getting is due to the binaries not being found on your path.

granci commented 6 years ago

so far i'm developing on ubuntu, but the final goal is to use it in my pdf-generating app on heroku (i was planning to make heroku buildpack to include podofo and other binaries if needed)... i have tried to put binaries from node_modules to my path, but it seems that some dependencies are missing when i've checked it with ldd command... the solution would be to download or compile the binaries or is it possible to use standard podofo library with this API?

corymickelson commented 6 years ago

The binaries included in the library will only work on centos based systems. The setup method as well will only work in AWS lambda. If Ubuntu's apt-get has podofo 0.9.5 available you can install from apt and use that, or build from source and add to your path.

On Nov 29, 2017 1:47 AM, "granci" notifications@github.com wrote:

so far i'm developing on ubuntu, but the final goal is to use it in my pdf-generating app on heroku (i was planning to make heroku buildpack to include podofo and other binaries if needed)... i have tried to put binaries from node_modules to my path, but it seems that some dependencies are missing when i've checked it with ldd command... the solution would be to download or compile the binaries or is it possible to use standard podofo library with this API?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/corymickelson/CommonPdf/issues/13#issuecomment-347807059, or mute the thread https://github.com/notifications/unsubscribe-auth/AH8LDtH7at_gBjxyUsOVGBXEXyddVEVAks5s7SgvgaJpZM4Qp2ix .

corymickelson commented 6 years ago

Commonpdf is using podofosign, which is bundled with podofo in the tools directory. If you are using a version of podofo installed by your package manager ensure that it is also building podofo's tools and is built with PODOFO_HAVE_OPENSSL:BOOL=TRUE, if this is not defined podofosign will not be compiled.

On Nov 29, 2017 5:48 AM, "Cory Mickelson" mickelsoncory@gmail.com wrote:

The binaries included in the library will only work on centos based systems. The setup method as well will only work in AWS lambda. If Ubuntu's apt-get has podofo 0.9.5 available you can install from apt and use that, or build from source and add to your path.

On Nov 29, 2017 1:47 AM, "granci" notifications@github.com wrote:

so far i'm developing on ubuntu, but the final goal is to use it in my pdf-generating app on heroku (i was planning to make heroku buildpack to include podofo and other binaries if needed)... i have tried to put binaries from node_modules to my path, but it seems that some dependencies are missing when i've checked it with ldd command... the solution would be to download or compile the binaries or is it possible to use standard podofo library with this API?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/corymickelson/CommonPdf/issues/13#issuecomment-347807059, or mute the thread https://github.com/notifications/unsubscribe-auth/AH8LDtH7at_gBjxyUsOVGBXEXyddVEVAks5s7SgvgaJpZM4Qp2ix .

granci commented 6 years ago

thank you, i'll have look at it... and if everything works well, in couple days you may have a link to heroku buildpack :)

corymickelson commented 6 years ago

@granci Im not sure if this will help but I have a docker file that builds podofo from source with all optional deps, maybe this could be used as reference for a ubuntu build.