We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Newbie to Aspose

I've just purchased Aspose.Total for Java and would like to implement it using ColdFusion. I have a Aspose.Total.Java.lic file and the code I am using is below. I get the following error and when I run ColdFusion debugger, it points to . Right now, I am just trying to get the Aspose.Slides to work so I can dynamically create a PPT file. Thanks in advance.

Object Instantiation Exception.

An exception occurred when instantiating a Java object. The class must not be an interface or an abstract class. Error


















Hello,

Please read this thread. I hope it should help you.

Thanks.

Can you check my code since I have aspose.total.java.lic file (see LicFileI) and

. Is this correctly set because I just get a blank screen. Thanks.


//my code















Remove this line and see if it works.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank for your assistance. It did work!

It does write it to the ppt file, but now how do I view and edit that file? I guess a better question will be: Users will need to create a standarized report on a weekly basis on a power point slides. The slides will consist of data from an Oracle database. For each user I want them to create, edit, and save the file. Initially, the report will be generated from the data extracted from a Oracle database. Then afterwards, if they wish I want them to go into that slide and save it. So I would need to create a separate file for each time. Can you point me in the right direction and also point me in a direction where there are sample Coldfusion codes which people have done something similiar in the past. Thanks for your assistance!

John Wang

Hello, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

You should extract/read data out of ppt and display it to user and also you should provide some interface, where user could enter some data.

After getting the user input, you should insert the data inside your ppt file and send it to user.

For example, we have online demo that asks the user to give some input and then create a ppt given the user data. You should check it.

http://www.aspose.com/demos/aspose.slides/northwind-java/

Note: you can get the code for above sample from your Aspose.Slides for Java zip file.

http://www.aspose.com/community/files/51/file-format-components/aspose.slides/default.aspx

Regarding coldfusion, you just need to know how java code could be translated to coldfusion script/code. And you can get to know it from little searching over the internet. Then you can find lot of code samples in JAVA on this forum that use Aspose.Slides.

Further, you must go through the Aspose.Slides Programmer’s Documentation, it will save you from lots of hassles.

I have made lots of progress on the project due to your support and by looking at the Aspose forum.

I am getting an error trying to perform textalignment in ColdFusion. I guess I am not coverting it correctly to ColdFusion. In addition, how can I insert shapes (rectangle and ellipse) and color them into a table cell and set font color and background color in a cell or text.

Please help. Thanks.







You should cast them into integer. For example, TextAlignment.CENTER is 1, so your code should look like this.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Here are the other values. You can look for them from the aspose.slides\doc\index.html

com.aspose.slides.TextAlignment

public static final int

CENTER

1

public static final int

DEFAULT

-1

public static final int

JUSTIFY

3

public static final int

LEFT

0

public static final int

RIGHT

2

I get the following error:

Unable to find a constructor for class com.aspose.slides.TextAlignment that accepts parameters of type ( java.lang.String ).

In addition, how can I insert ellipse or rectangle inside a table cell and fill the color with blue, red, or amber depending on the condition? Thanks

Ok, try this line.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

TextAlingment is an enumeration or you can think of them constant integer values. Well, you need to find on internet how to cast enumeration into integer or vice versa in Coldfusion.

You cannot insert them into table cell, but you can position them in such a way that they look like they are inside the cell. To add these shapes, please see the java code for

http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/adding-ellipse-shape-to-slide.html

Thanks. I used SetAlignment(1) and it worked! Regarding adding rectangle, what is the best way of doing this? For example, How can I find the position of cell (1,1) so I can insert a shape there with specific height/width.

Again, thank you for your many assistance. I am almost there.

In JAVA, either this way

Cell cl=tbl.getCell(1,1);
int x=cl.getX();
int y=cl.getY();
int width=cl.getWidth();
int height=cl.getHeight();

or
Cell cl=tbl.getCell(1,1);
int x=cl.getTextFrame().getX();
int y=cl.getTextFrame().getY();
int width=cl.getTextFrame().getWidth();
int height=cl.getTextFrame().getHeight();

Dear Shakeel Faiz:

The second script worked.

It's been a very painful journey, but your assistance made a big difference. I guess the best way is to actually work on a project and although I am no expert in converting Java to ColdFusion, it's been a learning experience.

Just want to say thanks for all your support. I must admit when I first started this project, I didn't know where to start, but now after few weeks, I have completed a project. I'll probably post a new subject on a forum soon working on another project. Thanks.

You are welcome. Congratulations for completing your work.

I have created a slide called template.ppt. I have used ColdFusion to copy the template.ppt and called it dynamic.ppt. How can I go and modify this dynamic.ppt and add table? Thanks.

john Wang

Hello John,

You should see Working with Tables. The code examples are in JAVA, but it will help you to write similar code in PHP.

Got it. Thanks.