Hi all,

I'm a newbie to CF (2 months old).I've read up and research a lot in how to 
convert Java to CF but I seem to have hit a brick wall in converting a simple a 
5 line code of Java into CF, please see the code in Java and the attempt at 
converting it below, any help will be appreciated, thanks:
JAVA:

//Instantiate a Presentation object that represents a PPT file 
Presentation pres = new Presentation(new FileInputStream(new 
File("c:\test\test.ppt")));

//Accessing a slide using its slide position
Slide slide = pres.getSlideByPosition(1);

//Getting the thumbnail image of the slide of a specified size
BufferedImage image=slide.getThumbnail(new Dimension(290,230));

//Saving the thumbnail image in jpeg format
ImageIO.write(image,"jpeg", new File("C:\\theimagefile.jpg"));

CF:
<cfobject action="CREATE" type="JAVA" class="com.aspose.slides.Presentation" 
name="pres">

<cfset FileStream = CreateObject("java", "java.io.FileInputStream")> 
<cfset pres = CreateObject("java", 
"com.aspose.slides.Presentation").init(FileStream .init("c:\test\test.ppt")) >
<cfset Slide = pres.getSlideByPosition(javacast("int", 2))>
<cfset image =slide.getThumbNail(javacast("int" "290,230"))>
<cfset imageIO.write(image,"jpeg", ("c:\theimageFile.jpg"))> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296874
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to