Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support

All forums · Statistics · Search ·

Two Pilots forum / For software developers / LoadHTMLFile Fails under ASP.Net
Author Message
# Posted: 10 Aug 2007 03:49

Hi there,

We have a Web Service written in ASP.Net 2.0 that generates and then archives an HTML document. During the archive process the document is converted to PDF using PDF Creator and HTML2PDF Addon.

We've recently deployed this service on a Windows Server 2003 machine and are getting a problem when trying to load the HTML file in the HTML2PDF Addon component. This works fine on other operating systems.

The web service is configured to run under an application pool set up with an given identity which is a domain service account.

The .net webservice calls into a VB6 COM object (running under a COM+ application as a Domain Service account) which in turn invokes the PDF conversion. The code sample below shows what we're doing. The code fails on the line : .LoadHTMLFile sInputFileName with the runtime error:

Method '~' of object '~' Failed.

We're using PDFCreator version 2.7 and HTML2PDF version 3250. Any ideas what's causing this error?

Thanks in advance for any help.


Code Sample:

' PDF Engine
Set oPDF = CreateObject("PDFCreatorPilot2.piPDFDocument")

With oPDF
.FileName = r_sOutputFilename
End With

' HTML add-in
Set oHTML = CreateObject("HTML2PDFAddOn.HTML2PDF2")

With oHTML
.ConnectToPDFLibrary oPDF
.LoadHTMLFile sInputFileName
End With

Set oHTML = Nothing


Set oPDF = Nothing

# Posted: 10 Aug 2007 04:37

Please check your server's DEP settings. You can find it this way:
- Start - Settings - Control Panel - System.
- Click the Advanced tab and, under Performance, click Settings.
- Click the Data Execution Prevention tab.
You need the "Turn on DEP for essential Windows programs and services only" option to be checked. If it will not help then try to turn DEP off.
Don't forget to reboot Windows if any changes are taken on DEP.

# Posted: 10 Aug 2007 06:20

Thanks for the suggestion but we've already tried that to no avail.

# Posted: 12 Aug 2007 22:38

I think you should update PDFCreator and HTML2PDF Addon to the latest versions (3.6 and 3.7).



Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.013


Page top