System.DllNotFoundException: 'Unable to load DLL 'libwkhtmltox': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

3

Getting error when trying to generate PDF from HTML template. I have a different class library for generating PDF and I'm calling that from another controller.

System.DllNotFoundException: 'Unable to load DLL 'libwkhtmltox': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

c#
api
asp.net-core
pdf-generation
asked on Stack Overflow Oct 3, 2018 by Kinjal Parmar

3 Answers

0

your csproj file to enforce copying NuGet assemblies to the built output:

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
answered on Stack Overflow Oct 3, 2018 by go..
0

The files should at the root of the project and another thing that you know you should installed Microsoft Visual C++ Redistributable. follow this link

answered on Stack Overflow Feb 23, 2020 by Ali.Asadi
0

If you are running application in docker,then do an update to install libwkhtmltox dependencies for .netcore

# Install libwkhtmltox dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        zlib1g \
        fontconfig \
        libfreetype6 \
        libx11-6 \
        libxext6 \
        libxrender1 \
        libjpeg62-turbo
answered on Stack Overflow Jul 10, 2020 by Dev-lop-er

User contributions licensed under CC BY-SA 3.0