ABCPdf Microsoft XPS printer
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 serv开发者_运维问答er 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!
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
ABCpdf
and then to the question
6.29 - Converting HTML with IE9 installed, I see the exception: 'ABCpdf could not initiate MSHtml engine for this version of Internet Explorer installed.'
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.
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.
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
精彩评论