TuesPechkin无法加载DLL wkhtmltox.dll“ [英] TuesPechkin unable to load DLL 'wkhtmltox.dll'

查看:2322
本文介绍了TuesPechkin无法加载DLL wkhtmltox.dll“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用TuesPechkin有一段时间了,今天我去的NuGet包更新到新版本2.0.0+,发现Factory.Create()不再解决,所以我到GitHub的阅读修改的内容,并注意到,目前预计的路径的dll?

I've been using TuesPechkin for some time now and today I went to update the nuget package to the new version 2.0.0+ and noticed that Factory.Create() no longer resolved, so I went to read on the GitHub the changes made and noticed it now expects the path to the dll?

IConverter converter =
    new ThreadSafeConverter(
        new PdfToolset(
            new StaticDeployment(DLL_FOLDER_PATH)));

在过去的几个小时里,我已经试过几乎所有我能想到的路径,\\ BIN,\\ app_data文件,\\ app_start等我似乎无法找到或弄清楚它是什么希望用于路径和什么的dll?

For the past few hours I've tried almost all the paths I can think of, "\bin", "\app_data", "\app_start", etc and I can't seem to find or figure out what it wants for the path and what dll?

我可以看到TuesPechkin DLL在我的bin文件夹中,这是我尝试的第一个路径,但我得到了以下错误:

I can see the TuesPechkin dll in my bin folder and it was the first path I tried, but I got the following error:

其他信息:无法加载DLLwkhtmltox.dll':本
  指定的模块找不到。 (从HRESULT异常:
  0x8007007E)

Additional information: Unable to load DLL 'wkhtmltox.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

在哪里是DLL,现在我可以得到它作为库似乎并没有包含它,我尝试安装TuesPechkin.Wkhtmltox.Win32方案,但该dll仍无处可寻。另外,我在一个asp.net网站项目中使用这个,所以我认为使用下面的应该获得的路径工作,对吧?

Where is that dll and now can I get it as the library doesn't seem to contain it, I tried installing the TuesPechkin.Wkhtmltox.Win32 package but the dll still is nowhere to be found. Also I am using this in a asp.net website project so I assume that using the following should work for obtaining the path, right?

var path = HttpContext.Current.Server.MapPath(@"~\bin\TuesPechkin.dll");

更多信息:<一href=\"https://github.com/tuespetre/TuesPechkin/issues/57\">https://github.com/tuespetre/TuesPechkin/issues/57

推荐答案

该Tuespechkin有一个zip文件作为'wkhtmltox.dll文件中的Win32和Win64中嵌入包的资源。

The Tuespechkin has a zip file as a resource in the Win32 and Win64 embedded packages for the 'wkhtmltox.dll' file.

什么,当你使用它在Win32或Win64中嵌入的包是解压缩文件并将其放置在您指定的目录中。

What it does when you use the Win32 or Win64 Embedded package is unzips the file and places it in the directory that you specify.

我一直把wkhtmltox DLL的拷贝在我的web应用程序的根目录下部分和使用我的web应用程序的服务器的物理路径,得到它的DLL_FOLDER_PATH指向它。

I have been putting a copy of the wkhtmltox dll at the root portion of my web app directory and pointing the DLL_FOLDER_PATH to it using the server physical path of my web app to get to it.

据笔者,您必须设置转换器以取得最佳效果的静态字段。

According to the author, you must set the converter in a static field for best results.

我这样做,但设置转换器为空时,我使用它完成,这似乎工作。

I do that, but set the converter to null when I am finished using it, and that seems to work.

Tuespechkin对于wmkhtmlox dll文件的包装。

Tuespechkin is wrapper for the wmkhtmlox dll file.

原始文件用C ++编写,因此不会自动在C#或VB.NET或任何其他托管code域使用。

The original file is written in C++ and so will not automatically be usable in C# or VB.NET or any of the other managed code domains.

该Tuespechkin.dll文件不包含wkhtmltox.dll的副本。你要么必须使用其他嵌入式部署的模块中的一个或从互联网上下载后在你的web应用程序安装wkhtmltox.dll的副本。这就是我做的,它似乎工作得很好。

The Tuespechkin.dll file DOES NOT contain a copy of 'wkhtmltox.dll'. You either have to use one of the other embedded deployment modules or install a copy of the 'wkhtmltox.dll' in your web app after downloading it from the internet. That is what I do, and it seems to work just fine.

我使用的Team Foundation Server,并尝试使用Tuespechkin程序,因为wkhtmltox.dll'文件被锁定将失败后的第一时间编译code,但你所要做的只是重新尝试构建并且它会经过。

I am using Team Foundation Server, and attempts to compile code after using the Tuespechkin routines will fail the first time because the 'wkhtmltox.dll' file gets locked, but all you have to do is simply retry your build and it will go through.

我曾与32位程序在64位环境中不能正常工作和64位环境不是在本地主机上测试的问题。我的解决办法了,我想出了检查源$ C ​​$ C为Tuespechkin和Win32和Win64中的嵌入式部署包。

I had issues with the 32-bit routine not working in a 64-bit environment and the 64-bit environment not being testable on localhost. I went with the workaround I came up with after examining the source code for Tuespechkin and the Win32 and Win64 embedded deployment packages.

这工作得很好,只要你输入指定的URL,而不是原始的HTML。

It works well as long as you specify a url for the input rather than raw html.

旧的包没有渲染的CSS很好。

The older package didn't render css very well.

如果您使用的是常规print.aspx,你可以为它创建URL作为从主URL抵消。

If you are using a print.aspx routine, you can create the url for it as an offset from your main url.

我没有,我跟我利用此时来抵消自己的基本网址为您的Web应用程序的源$ C ​​$ C,但它只是Htt的prequest。

I don't have the source code I am using with me at this point to offset to your base url for your web application, but it is simply an offshoot of HttpRequest.

您必须使用物理路径,找到.dll文件,但您可以使用一个网络路径打印程序。

You have to use the physical path to find the .dll, but you can use a web path for the print routine.

我希望这回答你的问题了一下。

I hope this answers your question a bit.

这篇关于TuesPechkin无法加载DLL wkhtmltox.dll“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆