Coder Social home page Coder Social logo

Comments (4)

stysiok avatar stysiok commented on June 23, 2024 1

@IrshadMar I think I managed to set it up by adding following lines to my dockerfile

FROM public.ecr.aws/lambda/dotnet:6

RUN yum install -y libXext \
    libXrender

RUN curl -SL "https://github.com/rdvojmoc/DinkToPdf/raw/v1.0.8/v0.12.4/64%20bit/libwkhtmltox.so" --output ./libwkhtmltox.so

To use zip deployments you would need to modify your lambda to install libXext and libXrender and add the lib to /var/task or where do you keep your dlls.

It looks like the code after publish is unable to load libwkhtmltox.so located in runtimes folder.

from wkhtmltopdf-dotnet.

IrshadMar avatar IrshadMar commented on June 23, 2024 1

This solved it for me
https://www.appsloveworld.com/docker/100/58/unable-to-load-shared-library-libgdiplus-or-one-of-its-dependencies-while-runni

Docker file:
FROM public.ecr.aws/lambda/dotnet:6
WORKDIR /var/task

RUN yum clean all && yum update -y
RUN yum install -y amazon-linux-extras
RUN amazon-linux-extras install epel -y
RUN yum install -y libgdiplus

COPY publish/* /var/task/

CMD [ "" ]

Note: You may have to use the libwkhtmltox.so file using the curl command mentioned by @stysiok in the comment above.
Thanks a lot!

from wkhtmltopdf-dotnet.

stysiok avatar stysiok commented on June 23, 2024

Have you been able to sort that issue yourself? I'm trying to also set it up on AWS Lambda, but failing miserably. No matter what dependencies I install I always get an exception back that some of the dependencies are missing.

from wkhtmltopdf-dotnet.

IrshadMar avatar IrshadMar commented on June 23, 2024

I was unsuccessful in solving this issue even after trying the docker solution mentioned by @stysiok above.

While running the docker build I am getting the below error at yum install
image

Used the below command.
RUN yum install -y libXext \ libXrender

After deployment I am still getting ---> System.NotSupportedException: Unable to load native library. The platform may be missing native dependencies (libjpeg62, etc). Or the current platform is not supported.

from wkhtmltopdf-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.