ABCPdf 微软 XPS 打印机
我正在使用 ABCPdf 从一些 HTML 代码中获取 pdf。当我开发时一切都运行良好,现在我将其安装在服务器中,但它不起作用。它抛出这个异常
WebSupergoo.ABCpdf8.Internal.PDFException: ABCpdf 无法检测到任何打印机。 Gecko 引擎需要打印机 安装在系统中。通常,XPS 文档编写器就足够了。尝试 还运行该服务作为 交互式用户。
我的电脑上安装了 MS Office,但服务器上没有安装。
所以我的问题是:
- 是否有(使用 ABCpdf)使用 Doc.AddImageHtml 方法生成 PDF 而无需 MS XPS 打印机?
- 如果没有,是否可以在不安装 Office 的情况下安装 XPS 打印机?
谢谢!
I'm using ABCPdf get a pdf from a some HTML code. While I was developing everything worked great, now I install it in the server it is not working. It throw this exception
WebSupergoo.ABCpdf8.Internal.PDFException:
ABCpdf cannot detect any printers.
Gecko Engine requires a printer
installed in the system. Usually, XPS
Document Writer would suffice. Try
also running the service as an
interactive user.
In my computer I have MS office installed, in the server I don't.
So my questions are:
- Is there anyway (with ABCpdf) to generate a PDF using Doc.AddImageHtml method without the MS XPS printer?
- If not, is there anyway I can install the XPS printer without installing the office?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现如果我更改为使用 MSHtml 引擎来呈现 HTML,我在服务器中就没有问题。
此渲染引擎不适用于 IE9 + .NET Framework 4 + ASP.NET,也不适用于 Web 表单。 (这实际上是我的情况)。幸运的是,服务器有 Windows Server 2003,所以它没有 IE9。 请注意,在链接中您应该转到部分
然后到问题
这是我现在唯一的解决方案,但如果有人有一个解决方案,使 ABCPdf 在没有 Microsoft XPS 打印机的情况下工作,并且在 IE9 上没有问题,我将非常感激。
I found out that if I change to use MSHtml Engine to render the HTML I have no problem in the server.
This rendering engine does not work with IE9 + .NET framework 4 + ASP.NET and not web forms. (That is actually my case). Luckily the server has Windows Server 2003, so it doesn't have IE9. Please note that in the link you should go to section
and then to the question
This is the only solution I have right now but if someone has a solution that make ABCPdf work without Microsoft XPS Printer and has no trouble with IE9 it would be really appreciated.
您可以从 下载适用于 server 2003 的 XPS Essentials Pack,其中包括 XPS 驱动程序http://www.microsoft.com/download/en/details.aspx?id=11816
如果您的服务器是 2000 那么它将无法工作,但是错误消息提示任何驱动程序都可以 工作。打开“打印机”文件夹,然后从“文件”菜单中选择“服务器属性”,转到“驱动程序”选项卡并添加任意 PostScript 驱动程序。我猜测该组件依赖于安装打印机驱动程序来获取字体宽度。
You can download the XPS Essentials Pack for server 2003, which includes the XPS driver from http://www.microsoft.com/download/en/details.aspx?id=11816
If your server is 2000 then it won't work however the error message hints any driver will work. Open the Printers folder and from the File menu select Server Properties, go t the Drivers tab and add any PostScript driver. I'm guessing the component is relying on having a printer driver installed to get font widths.
最新版本的 Windows 和 .NET 将自动安装 XPS Document Writer。您可以尝试重新安装它: http://forums.techarena.in/vista-help/782555 .htm
Recent versions of Windows and .NET will have XPS Document Writer automatically. You may try reinstalling it: http://forums.techarena.in/vista-help/782555.htm