Hi Team,
Hi Kranthi,
I am not able to understand your query properly. Could you please share some details (or sample code you have) to explain the issue. It will help us in assisting you properly.
Thanks & Regards,
Simple I have to merge multiple pptx files. The input will be InputStream
Hi Kranthi,
Aspose.Slides provides the feature to Clone the slides between presentations which can be used to merge the presentations. You can check the details from the following documentation link.
Cloning Slides in PresentationEx
Please try the following sample code to merge the two presentation files passed as input streams.
//Files to be used for merging
File file1 = new File("C:/data/HelloWorld.pptx");
File file2 = new File("C:/data/input.pptx");
//Opening files using input stream
FileInputStream input1 = new FileInputStream(file1);
FileInputStream input2 = new FileInputStream(file2);
//Instantiate PresentationEx class to load the source PPTX file
PresentationEx srcPres = new PresentationEx(input1);
//Instantiate PresentationEx class for destination PPTX (where slide is to be cloned)
PresentationEx destPres = new PresentationEx(input2);
//Clone the slides from the source PPTX to the destination PPTX
SlideExCollection slds = destPres.getSlides();
for (int i = 0; i <= srcPres.getSlides().getCount() - 1; i++) {
slds.insertClone(destPres.getSlides().getCount(), srcPres.getSlides().get_Item(i));
}
//Write the destination PPTX to disk
destPres.write("c:/data/output.pptx");
//Close the streams
input1.close();
input2.close();
In case you face any issue or need further assistance, please feel free to contact support.
Thanks & Regards,
Hi Ahmad,
Hi Kranthi,
Please add the following lines of code to set the cell background color as white and cell text color as black.
cell.getFillFormat().setFillType(FillTypeEx.Solid);
cell.getFillFormat().getSolidFillColor().setColor(Color.WHITE);
cell.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getFillFormat().setFillType(FillTypeEx.Solid);
cell.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getFillFormat().getSolidFillColor().setColor(Color.BLACK);
In case you face any issue, please let us know.
Thanks & Regards,
Thanks Ahmad,
Hi Kranthi,
I have replied to your post in the thread you mentioned above.
Thanks & Regards,