I'm trying to convert an HTML document to PDF, using DinkToPdf in ASP.NET Core Web API version 2.1.

This is my method:

```c#
public async Task<ActionResult> ToPdf()
{
    var loader = new CustomAssemblyLoader();
    var assemblyPath = Directory.GetCurrentDirectory();
    loader.LoadUnmanagedLibrary($@"{assemblyPath}/libwkhtmltox");

    var doc = new HtmlToPdfDocument()
    {
        GlobalSettings = {
            Orientation = Orientation.Landscape,
            PaperSize = PaperKind.A4,
            Out = "wwwroot/test.pdf"
        },
        Objects = {
            new ObjectSettings() {
                PagesCount = true,
                HtmlContent = @"Lorem ipsum dolor sit amet, consectetur adipiscing elit. In consectetur mauris eget ultrices  iaculis. Utodio viverra, molestie lectus nec, venenatis turpis.",
                WebSettings = { DefaultEncoding = "utf-8" },
                HeaderSettings = { FontSize = 9, Right = "Page [page] of [toPage]", Line = true, Spacing = 2.812 }
            }
        }
    };

    _pdfConverter.Convert(doc);
}

```

I copied libwkhtmltox.so and libwkhtmltox.dll to the root of my project, where every .dll is located.

```
sudo apt-get install libgdiplus

```

**Always get this error**

`DllNotFoundException: Unable to load shared library '/var/www/webapi/webapi/libwkhtmltox' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: /var/www/webapi/webapi/libwkhtmltox: cannot open shared object file: No such file or directory`

By the way, if I run the project on windows works perfect!

Thank you in advance!