Package com.aspose.slides

Examples of com.aspose.slides.ISlide


    // Adding slide comment for an author on slide 1
    author.getComments().addComment("Hello Aspose, this is second slide comment",
        pres.getSlides().get_Item(1), point, date);
   
    // Accessing ISlide 1
    ISlide slide = pres.getSlides().get_Item(0);
   
    // if null is passed as an argument then it will bring comments from all
    // authors on selected slide
    IComment[] Comments = slide.getSlideComments(author);
   
    // Accessing the comment at index 0 for slide 1
    String str = Comments[0].getText();
   
    pres.save("data/AsposeComments.pptx", SaveFormat.Pptx);
View Full Code Here


  {
    //Instantiate Prsentation class that represents the PPTX
    Presentation pres = new Presentation();
   
    //Get the first slide
    ISlide sld = pres.getSlides().get_Item(0);
   
    //Load the wav sound file to stram
    FileInputStream fstr = new FileInputStream(new File("C:\\logon.wav"));
   
    //Add Audio Frame
    IAudioFrame af = sld.getShapes().addAudioFrameEmbedded(50, 150, 100, 100, fstr);
   
    //Set Play Mode and Volume of the Audio
    af.setPlayMode(AudioPlayModePreset.Auto);
    af.setVolume(AudioVolumeMode.Loud);
   
View Full Code Here

   
    //Instantiate Presentation Class
    Presentation pres = new Presentation();
   
    //Get first slide
    ISlide slide = pres.getSlides().get_Item(0);
   
    //Add Smart Art Shape
    ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
   
    //Saving presentation
    pres.save("data/AsposeSmartArt.pptx", SaveFormat.Pptx);
         
    //=====================
    //Accessing Smart Art
    //=====================
    //Get first slide
    ISlide slide0 = pres.getSlides().get_Item(0);
   
    //Traverse through every shape inside first slide
    for(IShape shape : slide0.getShapes())
    {
        //Check if shape is of SmartArt type
        if (shape instanceof ISmartArt)
        {
            //Typecast shape to SmartArtEx
View Full Code Here

   
    //Creating a presentation instance                                                                      
      Presentation pres1 = new Presentation();
                                                                                                              
      //Access the presentation slide                                                                         
      ISlide slide = pres1.getSlides().get_Item(0);                                                            
                                                                                                              
      //Add Smart Art IShape                                                                                  
      ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.StackedList);        
                                                                                                              
      //Accessing the SmartArt node at index 0                                                                
      ISmartArtNode node = smart.getAllNodes().get_Item(0);                                                   
                                                                                                              
      //Adding new child node at position 2 in parent node                                                    
View Full Code Here

  {
    // instantiate a Presentation Object
    Presentation pres = new Presentation();

    // Get first slide
    ISlide sld = pres.getSlides().get_Item(0);

    // Add an AutoShape of Rectangle type
    IAutoShape ashp = sld.getShapes().addAutoShape(ShapeType.Rectangle,
        150, 75, 150, 50);

    // Add TextFrame to the Rectangle
    ashp.addTextFrame("Aspose TextBox");
View Full Code Here

  {
    //Instantiate Presentation class that represents PPTX
    Presentation pres = new Presentation("data/demo.pptx");
   
    //Access first slide
    ISlide slide = pres.getSlides().get_Item(0);
   
    IShape shape= null;
   
    //Iterate through the shapes and set a reference to the table found
    for (int i = 0 ; i < slide.getShapes().size() ; i++)
    {
        shape = slide.getShapes().get_Item(i);
        if (shape.getPlaceholder() != null)
        {
            //Change the text of each placeholder
            ((IAutoShape)shape).getTextFrame().setText("This is Placeholder");
        }
View Full Code Here

  {
    //Instantiate a Presentation class that represents the PPTX file
    Presentation pres = new Presentation("data/presentation.pptx");
   
    //Access the first slide
    ISlide sld = pres.getSlides().get_Item(0);
   
    //Create a full scale image
    BufferedImage image = sld.getThumbnail(1f, 1f);
   
    //Save the image to disk in JPEG format
    ImageIO.write(image,"jpeg",new File("data/AsposeThumbnail.jpg"));

        //Printing the status
View Full Code Here

  {
    //Instantiate Presentation class that represents PPTX file//Instantiate Presentation class that represents PPTX file
    Presentation pres = new Presentation();

    //Access first slide
    ISlide sld = pres.getSlides().get_Item(0);

    // Add chart with default data
    IChart chart = sld.getShapes().addChart(ChartType.ClusteredColumn, 0, 0, 500, 500);

    //Setting chart Title
    //chart.ChartTitle.TextFrameForOverriding.Text = "Sample Title";
    chart.getChartTitle().addTextFrameForOverriding("Sample Title");
    chart.getChartTitle().getTextFrameForOverriding().getTextFrameFormat().setCenterText(NullableBool.True);
View Full Code Here

  {
    //Instantiate Presentation class that represents PPTX file
    Presentation pres = new Presentation();

    //Access first slide
    ISlide sld = pres.getSlides().get_Item(0);

    // Add chart with default data
    IChart chart = sld.getShapes().addChart(ChartType.Pie, 100, 100, 400, 400);

    //Setting chart Title
    chart.getChartTitle().addTextFrameForOverriding("Sample Title");
    chart.getChartTitle().getTextFrameForOverriding().getTextFrameFormat().setCenterText(NullableBool.True);
    chart.getChartTitle().setHeight(20);
View Full Code Here

  {
    //Instantiate a Presentation object that represents a PPTX file
      Presentation pres = new Presentation("data/unformatted.pptx");

      //Accessing a slide using its slide position
      ISlide slide = pres.getSlides().get_Item(0);

      //Accessing the first and second placeholder in the slide and typecasting it as AutoShape
      ITextFrame tf1 = ((IAutoShape)slide.getShapes().get_Item(0)).getTextFrame();
      ITextFrame tf2 = ((IAutoShape)slide.getShapes().get_Item(1)).getTextFrame();

      //Accessing the first Paragraph
      IParagraph para1 = tf1.getParagraphs().get_Item(0);
      IParagraph para2 = tf2.getParagraphs().get_Item(0);
View Full Code Here

TOP

Related Classes of com.aspose.slides.ISlide

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.