Free Support Forum - aspose.com

Problem with images while cloning slides

Not only in case of emf or wmf images i am getting this problem with every type of images like.....(.PNG,.JPEG ) and while cloning its cloning some other images instead of the original image.

please help me out.

i am attaching ppt files with the post.

its cloning the slides fine but images are not coming.some other images are coming instead of the original images.

I have alredy added aspose.metafiles in my classpath.i have already added the aspose.metafiles .jar file into lib.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I am generating a ppt (slides)runtime.and i am adding some static slides from outside also by cloning.

total 5 static slides from outside i am cloning to my slides.

3 of the slides has been cloned success fully

but rest of the slides i am failed to clone.its showing following error..........

i debuggd and guess probably the reason is image.

all 5 slides has some images.

by cloning its not able to clone those images from the slides that it has been cloned (3 slides) it is randomly cloning some other images in place og the original images.

and for rest of the two slides it s not even cloned the slides.

images are in *.emf format .

i have changed some images to different format like *.png.,*.jpeg.

but problem is still there.

please help me out.

the code i am attaching herewith.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++

graphFile = null;

try {


graphFile = new File(value + "e.ppt");

if (graphFile.exists()) {

try{


Presentation prestn=new Presentation(new FileInputStream(graphFile));


Slide currentPatientFlowSlide = prestn.getSlideByPosition(1);

profilePresentation.cloneSlide(currentPatientFlowSlide, 25);


}catch(Exception e){

e.printStackTrace();

}

} else {

currentPatientFlowSlide.getShapes().addRectangle(450, 1000, 4700, 2300);

}

} catch (PptEditException e) {

e.printStackTrace();

}


++slideNumber;

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Regards,

Chiranjib