How to instantiate TuesPechkin PDF library?

2.3k Views Asked by At

What string is needed in TuesPechkin's StaticDeployment constructor? A temp folder? A dll path?

My TuesPechkin PDF converter works fine on my localhost's IIS using:

private static readonly IConverter _pdfConverter = 
    new ThreadSafeConverter(
        new RemotingToolset<PdfToolset>(
            new Win64EmbeddedDeployment(
                 new TempFolderDeployment())));

But when running it on a Windows Server, IIS logs this error:

System.DllNotFoundException: Unable to load DLL 'wkhtmltox.dll': The specified module could not be found.

So I tried changing my constructor to this code (in case TuesPechkin was trying to unzip the dll to a path it didn't have write permissions for):

private static readonly IConverter _pdfConverter = 
    new ThreadSafeConverter(
        new RemotingToolset<PdfToolset>(
            new Win64EmbeddedDeployment(                    
                new StaticDeployment(HttpContext.Current.Server.MapPath(@"~\bin\")))));

Get the same error. Both TuesPechkin.dll and TuesPechkin.Wkhtmltox.Win64.dll are in the bin folder.

1

There are 1 best solutions below

0
On