I'm only guessing, knowing nothing about your 'Presentation' class 
object, but a quick read-over would point to this line:

 > <cfset pres = CreateObject("java", 
"com.aspose.slides.Presentation").init(FileStream 
..init("c:\test\test.ppt")) >

There appears to be a space FileStream and the function call, init()

Aside from that, your Java code makes it appear as if FileStream is 
expecting a File object, rather that the file itself [new 
File(filename)]. Does the last argument of the imageIO.write() method 
have to be in parens? Or is it just a string (which means you can remove 
the parens)?

On a last note, I don't think the JavaCast() method will convert each 
element of a list. I'm pretty sure you are now passing 290230 into your 
method as a single argument now. I would try getThumbNail(290,230) on 
it's own. If it absolutely requires to be cast, then you'll need two 
separate method calls, one for each var (width and height). Something 
like .getThumbNail(javacast("int","290"), javacast("int","230")).

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
http://blog.cutterscrossing.com

Abigail Coker wrote:
> 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:296878
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to