Running 32-bit ABCpdf Pro on 64-bit Windows

An application I have been developing needed to add professional generation of PDF documents (read: my home-brew translation of HTML to PDF using iTextSharp did not produce decent results). I decided to use ABCpdf which itself uses the MSHTML engine to render HTML and miraculously converts the result to PDF.

The application consists of a web application and a Windows service which both reference a library implementing the HTML generation and the invocation of ABCpdf.

Development and deployment on 32-bit server were successful, but a production system running Windows Server 64-bit caused several errors:

Exception System.DllNotFoundException

Unable to load DLL ‘ABCpdf8-64.dll’. The specified module could not be found (Exception from HRESULT: 0x8007007E)

This error was caused by the service running in 64-bit mode. (The web application had already been switched to 32-bit only by restricting the application pool to 32-bit execution). After setting the service exe’s “Platform target” property to x86, the error went away.

Exception WebSupergoo.ABCpdf8.Internal.PDFException

Cannot activate MSHtml engine. Please refer to documentation for more information.

The solution for this exception is to set the AppPool’s “Load User Profile” property to true in the Advanced Settings dialog.

After applying these settings, PDF generation also executed successfully on the 64-bit machine.

4 Responses to Running 32-bit ABCpdf Pro on 64-bit Windows

  1. […] remembered that on IIS, the AppPool’s “Load User Profile” needs to be set, so probably it had something to do with the service running as Local System which does not have a […]

  2. Fabio says:

    Fiz as configurações que vc sujeriu e nada.

    Unable to render HTML. Unable to create MSHTML document.
    COM error 800700b6. The operating system cannot run %1.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: WebSupergoo.ABCpdf8.Internal.PDFException: Unable to render HTML. Unable to create MSHTML document.
    COM error 800700b6. The operating system cannot run %1.

    O que pode ser ?


  3. fahim says:

    I am in same issue. But in my case, my application that is consuming 32 bit Pro edition of DLL is windows based. Where would I set such settings that you did for your web based version. Please help someone.

  4. AffineMesh says:

    Open up IIS manager. You’ll find ‘Enable 32-bit Applications’ and ‘Load User Profile’ under the Advanced Settings for the application pool.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: