Cloning of complex objects like charts or tables is not yet supported.
If they are important for you then please do work on it and submit a
patch!

importContent only imports shapes from a slide. If a shape inherits
style from the slide layout or slide master then the formatting can
differ. To preserve all text properties you need to call importContent
on the slide master and slide layout  too.

Hope it helps.

Yegor


On Thu, Jul 12, 2012 at 3:04 PM, svmanoj1220 <[email protected]> wrote:
> Hi all,
>
> I am trying to merge two PPTX files into a single PPTX file. I taken the
> code from examples and i tried. But for the slides containing Charts are
> getting as empty slides and Some Background Images I am not able to get in
> the final PPTX. Some of the font colors I am not getting , and font size in
> some slides got small.
>
> import org.apache.poi.xslf.usermodel.*;
>
>
> import java.io.FileInputStream;
> import java.io.FileOutputStream;
>
>
>
>
> public final class PPTMerge {
>
>
>        public static void main(String args[]) throws Exception {
>
>
>
>
>               System.out.println(" start ");
>               XMLSlideShow mergedPptx = new XMLSlideShow();
>            String[] inputs = {
>
> "C:\\Users\\Manoj\\Desktop\\sample_1.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_2.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_3.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_4.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_5.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_6.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_7.pptx",
>
> "C:\\Users\\Manoj\\Desktop\\sample_8.pptx"
>
> };
>            for(String arg : inputs){
>
>
>                FileInputStream fileInpStream = new FileInputStream(arg);
>                XMLSlideShow srcPptx = new XMLSlideShow(fileInpStream);
>                fileInpStream.close();
>
>
>                XSLFSlide[] slide = srcPptx.getSlides();
>
>                for(XSLFSlide src1 : slide)
>                      {
>                       mergedPptx.createSlide().importContent(src1);
>                      }
>            }
>
>
>            FileOutputStream fileOutputStream = new
> FileOutputStream("C:\\Users\\Manoj\\Desktop\\sample.pptx");
>            mergedPptx.write(fileOutputStream);
>            System.out.println("PPTX is created");
>            fileOutputStream.close();
>
>
>        }
>
>
> }
> I am attaching all the images of the output slides I got as 'new' and the
> source ppt as Original. U can see the diff by going through these images..
> Can you please help me in how to resolve this.. Can u pls give me the exact
> code for retrieving Merged PPTX with out any changes or missing
> figures,colors ,etc.
>
> Please see all the attachments for clear understanding of issue.. Please Can
> i have a quick reply as there is an urgent requirement
>
> Thanks in advance,
>
> Manoj
>
> Mail: [email protected]
>
>
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/1-new.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/2-new.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/3-new.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/3-Original.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/4-new.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/4-Original.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/5-new.jpg
> http://apache-poi.1045710.n5.nabble.com/file/n5710443/5-Original.jpg
>
> --
> View this message in context: 
> http://apache-poi.1045710.n5.nabble.com/Merging-of-PPTX-files-in-to-Single-PPTX-tp5710443.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to