0

出力からわかるように、次のコードはエラーを生成しません。目的は、htmldoc を使用して html ファイルを pdf ファイルに変換することです。html ファイルは正常に生成され、pdf は pdf と同じフォルダーに保存されるはずですが、pdf ファイルは生成されません。

コードは Windows 2012 IIS 8 で実行されています。コードは Windows 2003 サーバーで問題なく動作しました。

出力は次のとおりです。

ここから始まる

2014 年 2 月 2 日 15:48:08

通りました

正常に実行

2014 年 2 月 2 日 15:48:08

誰でも助けることができますか?どうもありがとう!

CmdeHTMLDOC=chr(34)& exe_path & chr(34) & " --header ... --footer ../  -t pdf  --textfont Arial --fontsize 9  --quiet --left 1.5cm  --right 1.5cm  " & "  --webpage -f "
set wshell=Server.CreateObject("wscript.shell")
wpath4pdf= CmdeHTMLDOC & chr(34)& pdf_path &chr(34)&" "& chr(34)& html_path &chr(34)
'wshell.Run wpath4pdf, SW_SHOWNORMAL,true 
Response.Write("Starts here<br/>") 
on error resume next 
%> 
<pre><%=now()%></pre> 
<% 
wshell.Run wpath4pdf, SW_SHOWNORMAL,true
Response.write "Passed through<br/>" 
if err.number <> 0 then 
   response.write "Error detected: " & err.number & ": " & err.Description & "<br/>" 
   on error goto 0 
   response.end 
end if 
on error goto 0 
Response.write "Run sucessfully<br/>" 
%> 
<pre><%=now()%></pre> 
<%Set wshell=nothing
4

0 に答える 0