Enabling ActiveX Controls in IE 11

During conversion, in the COM environment: a -12 error is displayed. In . NET "Error with ConvertToPDF" is displayed.

This issue can occur in both the COM and .NET environment.

When using COM, a -12 error occurs "Exception caught printing PDF".

In the .NET environment, the this exception displays:

Error with ConvertToPDF
Exception caught printing PDF.

The log file in both environments records:

"Unable to cast COM object of type 'mshtml.HTMLObjectElementClass' to interface type 'ScriptX.Factory'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{BCE02EE6-7566-42E2-8FE3-48CED948908E}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Probable Cause

ActiveX is not enabled in IE 11.


To activate ActiveX Controls in IE 11:

  1. In IE 11, click on the gear iconto open the Tools menu.
  2. Select Internet Options> Security Tab.
  3. Click Custom level....
  4. Scroll down to the ActiveX controls and plug-ins
  5. Enable the option named: Run ActiveX controls and plug-ins.
  6. Click OK, and OK

Note: For -12 ConvertToPDF errors in .NET, also see: Resolutions for Common WebGrabber Error Codes.