Adding Picture using ColdFusion Script

Listed below is my script which is written in cfscript. I am having issues on the last line of my code. I guess I am not converting the cfscript to Java correctly. Any help will be appreciated. I just want to insert an image to a slide. ColdFusion or cfscript example will be fine. Thanks.


pres = CreateObject("java", "com.aspose.slides.presentation");

x=pres.init();
slide = pres.addEmptySlide();
rect = slide.getShapes().addRectangle(100,320,5500,200);
FileInput = CreateObject("java", "java.io.FileInputStream").init("e:\inetpub\wwwroot\quad\app\images\bubble_logo.jpg");
iStream = CreateObject("java", "java.io.BufferedInputStream").init(FileInput);
pic = CreateObject("java", "com.aspose.slides.presentation").Picture(pres, iStream);


You should be able to translate the JAVA code into Coldfusion. As an example, I have translated the code for adding pictureframe into Coldfusion script.

Let me know if it works

------------------------------------------------------------

<cfobject action="CREATE" type="JAVA"

class="com.aspose.slides.Presentation"

name="pres">

<cfobject action="CREATE" type="JAVA"

class="java.io.FileInputStream"

name="imgFile">

<cfobject action="CREATE" type="JAVA"

class="java.io.BufferedInputStream"

name="iStream">

<cfobject action="CREATE" type="JAVA"

class="com.aspose.slides.Picture"

name="pic">

<cfobject action="CREATE" type="JAVA"

class="java.io.File"

name="outFile">

<cfobject action="CREATE" type="JAVA"

class="java.io.FileOutputStream"

name="outStream">

------------------------------------------------------------

It works. Thanks for your help. I've just recently bought the product and is in a learning phase. Is there a web site for translating Java to ColdFusion?