Merge particular slides from different presentations into one

Now I am facing one more problem, video thumbnail in slide showing no Image

solved— :slight_smile:

@vikasgrr

We are glad to know that things have started working on you end.

yes, there is an issue
While merging some slides from two or three ppt’s of average size 1 mb it is consuming approx 2-3 GB of memory.
Why?
also presentation.dispose() method doesn’t seems to work

@vikasgrr,

The amount of memory consumed cannot be related to size of presentation. The amount of memory consume is related to number of slides, number of shapes and contents inside slide especially multimedia content. When you load the presentation using Aspose.Slides, it gets loaded in Document Object Model (DOM) along with many other statics in memory. Moreover, the type of operations also affect the memory consumption. If memory is not released after completion of every thing then there can be issue.

Hi Mudassir,
I am using presentation.dispose() method after cloning the slides from the particular ppt but then also it is not releasing the memory.
And why it is taking 2 GB of heap for cloning the slides. even the slide size is some KB’s?
Please check on your end by just cloning single slide and analyze the memory consumption.

My slides doesnt contain multimedia content.

@vikasgrr,

I request you to please share the working sample project, source presentation files, Operating System and Java details with us. Please also share the snapshot describing the memory usage after call of dispose() method as well. Before sharing the information with us, please do verify using Aspose.Slides for Java 18.8 on your end.

Hi,
I have purchased the license.
and set the licence using setLicense() method but still I am getting blank slide at index 0. (without watermark, watermark removed from every slide, no problem).
Let me know do I have to remove index 0 slide everytime? or it should not create blank slide at index 0.

@vikasgrr,

I have observed your comments. Can you please share source files along with generated result and sample project to reproduce issue.

The issues you have found earlier (filed as SLIDESJAVA-37295) have been fixed in this update.

Hi Adnan,
Those are internal use only ppt’s. so can not share. but even if i am using any ppt then also getting this thing. blank slide is always prepended

Hi,
Facing new error, If I am cloning slides from different ppt’s then aspose is retaining all the masters from the category instead of retaining only that perticular slide’s master.
Even I tried “target.getMasters().removeUnused(true);” it is not supposed to work.
Scenario is:
presentation 1: I have 3 categories A,B,C of masters each containing 5 layouts
presentation 2: same as ppt 1 but different masters
Now if I am cloning one slide from ppt1 which have master in category 1 and one slide from ppt2, then ideally I should have 2 masters/layouts in my result ppt but aspose is retaing the whole category. means I ma getting 5+5 = 10 masters in my result ppt.

Here are the ppt’s for your test, in these ppt’s I have created multiple master’s categories try to clone one - one slide from different category/name.mastertest.zip (1.7 MB)

@vikasgrr,

I have tried understanding the new issue shared by you. Can you please share the generated presentation, desired output presentation and working sample code reproducing the issue. Please elaborate your requirements so that I may proceed further to help you out.

If no slide is using any master then the mentioned call should remove the unused masters.

Hi Mudassir, I do not have dummy code as I am testing it in production code only.
The only thing I can share is result presentation. You can compare the slides and masters.
I have select 1-1 slide from both, Please check the layout by opening ppt’s in powerpoint. Ideally it should contain only two child layouts but it is containing all the childstest.zip (229.1 KB)

@vikasgrr,

I have observed the testMerge.pptx shared by you. There are two slides in it using two different masters. When we see the master slides they are two as well and which is perfectly alright. Can you please share what is your desired presentation and please also share a sample project by making a separate sample application (not your product server complete code) that is reproducing the issue. Please share the requested information so that we may proceed further to help you out.

Hi mudassir, I have resolved the issue by my own. Please help me in setting licence It is not getting read from the relative path, I have to give the actual path.
ex.
static{
com.aspose.slides.License license = new com.aspose.slides.License();
license.setLicense(“C:\Users\vikpatha\Documents\NetBeansProjects\ppt_merge\resources\Aspose.Slides.lic”);
// license.setLicense(“Aspose.Slides.lic”); not reading
if (license.isLicensed()) {
System.out.println(“License is Set!”);
}
}

Please let me know How can I read the licence from relative path i.e. resource directory of project or the directory which contain my aspose jar.

@vikasgrr,

I have observed your requirements and suggest you to please visit this thread link to read file from relative path. You may use the example on your end to load the license file from relative path.

Hi Mudassir, I am facing the following error on production. Kindly help
class com.aspose.slides.exceptions.InvalidOperationException: Cannot find any fonts installed on the system.
com.aspose.slides.internal.lw.public.do(Unknown Source)
com.aspose.slides.ns.do(Unknown Source)
com.aspose.slides.ns.do(Unknown Source)
com.aspose.slides.ns.do(Unknown Source)
com.aspose.slides.ai3.do(Unknown Source)
com.aspose.slides.nb.do(Unknown Source)
com.aspose.slides.ko.do(Unknown Source)
com.aspose.slides.ny.do(Unknown Source)
com.aspose.slides.akp.for(Unknown Source)
com.aspose.slides.akp.default(Unknown Source)
com.aspose.slides.akm.do(Unknown Source)
com.aspose.slides.akm.(Unknown Source)
com.aspose.slides.TextFrame.do(Unknown Source)
com.aspose.slides.TextFrame.do(Unknown Source)
com.aspose.slides.TextFrame.char(Unknown Source)
com.aspose.slides.q.do(Unknown Source)
com.aspose.slides.pv.do(Unknown Source)
com.aspose.slides.pv.do(Unknown Source)
com.aspose.slides.bb.do(Unknown Source)
com.aspose.slides.xm.if(Unknown Source)
com.aspose.slides.acv.do(Unknown Source)
com.aspose.slides.acv.do(Unknown Source)
com.aspose.slides.ack.do(Unknown Source)
com.aspose.slides.SlideCollection.addClone(Unknown Source)
com.aspose.slides.SlideCollection.addClone(Unknown Source)
com.aspose.slides.SlideCollection.addClone(Unknown Source)
sc.present.deckbuilder.publisher.PresentationPublisher.publishPresentation(PresentationPublisher.java:122)
sc.present.deckbuilder.publisher.PresentationPublisher.processPresentation(PresentationPublisher.java:105)
sc.present.deckbuilder.listener.PublishRequestListener.fetchPresentationData(PublishRequestListener.java:67)
sc.present.deckbuilder.listener.AsposeThread.run(AsposeThread.java:29)
at com.aspose.slides.internal.lw.public.do(Unknown Source)
at com.aspose.slides.ns.do(Unknown Source)
at com.aspose.slides.ns.do(Unknown Source)
at com.aspose.slides.ns.do(Unknown Source)
at com.aspose.slides.ai3.do(Unknown Source)
at com.aspose.slides.nb.do(Unknown Source)
at com.aspose.slides.ko.do(Unknown Source)
at com.aspose.slides.ny.do(Unknown Source)
at com.aspose.slides.akp.for(Unknown Source)
at com.aspose.slides.akp.default(Unknown Source)
at com.aspose.slides.akm.do(Unknown Source)
at com.aspose.slides.akm.(Unknown Source)
at com.aspose.slides.TextFrame.do(Unknown Source)
at com.aspose.slides.TextFrame.do(Unknown Source)
at com.aspose.slides.TextFrame.char(Unknown Source)
at com.aspose.slides.q.do(Unknown Source)
at com.aspose.slides.pv.do(Unknown Source)
at com.aspose.slides.pv.do(Unknown Source)
at com.aspose.slides.bb.do(Unknown Source)
at com.aspose.slides.xm.if(Unknown Source)
at com.aspose.slides.acv.do(Unknown Source)
at com.aspose.slides.acv.do(Unknown Source)
at com.aspose.slides.ack.do(Unknown Source)
at com.aspose.slides.SlideCollection.addClone(Unknown Source)
at com.aspose.slides.SlideCollection.addClone(Unknown Source)
at com.aspose.slides.SlideCollection.addClone(Unknown Source)
***************************

Even I have set the permissions for fonts directory to -rwx for all users

@vikasgrr,

I have observed your comments. Can you please visit this thread link. This will help you out to resolve your issue. Please share feedback with us if there is still an issue.