Embedding a pdf or mp3 as an icon in presentation

Hello,


I’m having 2 issues with embedded objects in Slides.
One is that the using ((IOleObjectFrame)shape).getObjectData() returns byte stream of the entire ole objects and not the embedded file white the equivalent function in Cells and in Words returns only the embedded files content.

Second issue is the embedding. Embedding (using the addOleObjectFrame function) anything which is not an office document just doesn’t seem to work. After saving the file the saved objects aren’t opened when clicked. I checked and it seems that the newly embedded files are saved as they are without the compound object wrapping. Again embedding works well both in Cells and in Words.

Is there a way to extract and embed non office documents in presentation via slides?
Using Aspise.Slides version 17.2

Regards,
Arik

Hi Arik,


I have observed your comments. Can you please share sample code, source presentation and generated result, environment details with us for further investigation to help you out. Also please share which Aspose.Slides version you are using on your end.

Best Regards,
Hi,
I use java version 1.7 on an Ubuntu 14.04 machine.
Slides version is 17.2.
This is the function that I used for to extract the embedded file, the extracted file is infect not ajpg image but an ole container with the jpg image in it.

public static void test_ppt(String path) throws Exception{
Presentation ppt = new Presentation(path);
// get presentation iterator
Iterator itr = ppt.getSlides().iterator();
// iterate on slides
while (itr.hasNext()) {
ISlide slide = (ISlide)itr.next();
Iterator shapes = slide.getShapes().iterator();
while(shapes.hasNext()) {
IShape shape = (IShape)shapes.next();
if (shape instanceof IOleObjectFrame) {
IOleObjectFrame ole = (IOleObjectFrame)shape;
System.out.println(ole.getName());
System.out.println(ole.getObjectName());
System.out.println(ole.getEmbeddedFileName());
System.out.println(ole.getEmbeddedFileExtension());
System.out.println(ole.getEmbeddedFileLabel());
System.out.println("--------------------------------------------------");
RandomAccessFile file = new RandomAccessFile("/tmp/testole/" + ole.getEmbeddedFileLabel(), "rw");
file.write(ole.getObjectData());
file.close();
}
}
}
}


Hi Arik,

I have observed your comments and discussed this with our product team. A ticket with ID SLIDESJAVA-36195 has been created in our issue tracking system to further investigate issue in detail. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

We are sorry for your inconvenience,

Hello,


Is there an estimate for when or whether this is going to be fixed?

Hi Arik,


I have observed your comments. Actually, the issue is blocked owing to missing implementation in other issue of Aspose.Slides for .NET. So, it is going to get resolved in that issue first and then in this issue. This issue involves complex implementation and I have also requested our product team to share further feedback regarding the issue. I request for your patience till the time further feedback is shared by our product team and issue gets resolved.

We are sorry for your inconvenience,