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


All forums · Statistics · Search ·

Two Pilots forum / Other products and questions / HTML2PDF Commandline from ASP
Author Message
Abdulkarim Momoh
Member
# Posted: 14 Apr 2008 16:33


Hello All,

my vbScript code, below, is generating error:

<%
Dim WS, ExecRunCmd, Feedback, sComm, S1, S2, S3
Set ws = Server.CreateObject("WScript.Shell")
S1 = "C:Program FilesTwo PilotsHTML2PDF PilotHTML2PDF_Pilot.exe"
S2 = "C:TestPDFNSEPRO.htm"
S3 = "C:TestPDFNSEPRO44.pdf"
ws.run S1 & " " & S2 & " " & S3
set ws = nothing
%>


please help, i dont know whta's wrong in my code. I have tried several combinations but no success.

mvf
Member
# Posted: 15 Apr 2008 01:35


What error is generated? Is it error of HTML2PDF_Pilot.exe or Web Server?
Be sure you code is waiting the HTML2PDF Pilot ends its work:

<%
Set ws = Server.CreateObject("WScript.Shell")
s1 = "path-to-HTML2PDF_Pilot.exe"
s2 = "path-to-in.htm"
s3 = "path-to-out.pdf"
ret = ws.Run(s1 & " " & s2 & " " & s3, 0, True)
If ret <> 0 Then
Response.Write "Error code: " & ret
Else
' ok
End If
Set ws = Nothing
%>

If you see Web Server's error then check file system permissions to write "out.pdf" file and read "in.htm" file for the user which credentials are inherited from ASP application.
Also check DEP settings : http://www.colorpilot.com/chm_html2pdf_faq.html

 

 

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

 

Page top