Cold fusion is a CGI language like asp, php. Sometimes, you may need to call an external exe in coldfusion.
It is absolutely doable in coldfusion. For exmaple, if you want to call cscript.exe, here is what you can do:
<cfexecute name = “C:WindowsSystem32cscript.exe”
arguments = “pdfmerge.vbs c:1.pdf|c:2.pdf c:out.pdf”
outputFile = “C:Tempoutput.txt”
timeout = “100″>
You may need to run a command line utility to convert html or url to image. Here is a handy script that converts url/html to image with our award winning htmlsnapshot product.
Save the below code into a script snapurl.vbs (Or you can find this script in htmlsnapshotdemovbscript)
set args = WScript.Arguments
num = args.Count
if num <> 2 then
WScript.Echo “Usage: [CScript | WScript] snapurl.Vbs Url ImageFile”
‘demo how to convert html to image
‘Create the Html Snapshot Object
Set snap = CreateObject(“HTMLSNAP2.HtmlSnap.1″)
snap.SetCode “Input your license code here to remove watermark”
snap.SnapUrl args.Item(0), args.Item(1)
WScript.echo “Snap return:” & CStr(snap.GetErrorCode)
Set snap = Nothing
After that, you can run on command line like below:
cscript.exe snapUrl.vbs www.google.com g.jpg
cscript.exe snapUrl.vbs file://c:1.html g.jpg
Silverlight is the new web authoring technology proposed by Microsoft. It is implemented as an ActiveX like the Flash.
It can be used to build interactive, vector based web pages.
To convert such web page into image, you can do it with our award winning htmlsnapshot product.