title: Convert HTML to PDF in asp.net core using DinkToPdf is not working in Ubuntu
body: <p>I'm trying to convert an HTML document to PDF, using DinkToPdf in ASP.NET Core Web API version 2.1.</p>
  <p>This is my method:</p>
  <pre class="lang-c# prettyprint-override"><code>public async Task&lt;ActionResult&gt; ToPdf()
  {
      var loader = new CustomAssemblyLoader();
      var assemblyPath = Directory.GetCurrentDirectory();
      loader.LoadUnmanagedLibrary($@&quot;{assemblyPath}/libwkhtmltox&quot;);
          
      var doc = new HtmlToPdfDocument()
      {
          GlobalSettings = {
              Orientation = Orientation.Landscape,
              PaperSize = PaperKind.A4,
              Out = &quot;wwwroot/test.pdf&quot;
          },
          Objects = {
              new ObjectSettings() {
                  PagesCount = true,
                  HtmlContent = @&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit. In consectetur mauris eget ultrices  iaculis. Utodio viverra, molestie lectus nec, venenatis turpis.&quot;,
                  WebSettings = { DefaultEncoding = &quot;utf-8&quot; },
                  HeaderSettings = { FontSize = 9, Right = &quot;Page [page] of [toPage]&quot;, Line = true, Spacing = 2.812 }
              }
          }
      };
      
      _pdfConverter.Convert(doc);
  }
  </code></pre>
  <p>I copied libwkhtmltox.so and libwkhtmltox.dll to the root of my project, where every .dll is located.</p>
  <pre><code>sudo apt-get install libgdiplus
  </code></pre>
  <p><strong>Always get this error</strong></p>
  <p><code>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</code></p>
  <p>By the way, if I run the project on windows works perfect!</p>
  <p>Thank you in advance!</p>