Examples of ISlide


Examples of com.aspose.slides.ISlide

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

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

      //Define columns with widths and rows with heights
      double[] dblCols = { 50, 50, 50 };
      double[] dblRows = { 50, 30, 30, 30, 30 };

      //Add table shape to slide
      ITable tbl = sld.getShapes().addTable(100, 50, dblCols, dblRows);

      //Set border format for each cell
      for(int row = 0; row < tbl.getRows().size(); row++)
      {
          for (int cell = 0; cell < tbl.getRows().get_Item(row).size(); cell++)
View Full Code Here

Examples of com.aspose.slides.ISlide

  {
    //Instantiate Presentation class that represents PPTX file
    Presentation pres = new Presentation("data/pptx4j/AsposeChart.pptx");

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

    // Add chart with default data
    IChart chart = (IChart)sld.getShapes().get_Item(0);

    //Setting the index of chart data sheet
    int defaultWorksheetIndex = 0;

    //Getting the chart data worksheet
View Full Code Here

Examples of com.aspose.slides.ISlide

  {
    //Instantiate a PresentationEx 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

Examples of com.aspose.slides.ISlide

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

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

    //Instantiate the Image class
    IPPImage imgx = null;

    try{
        imgx = pres.getImages().addImage(new FileInputStream(new File("data/pptx4j/greentick.png")));
    }
    catch(IOException e){}

    //Add Picture Frame with height and width equivalent of Picture
    sld.getShapes().addPictureFrame(ShapeType.Rectangle, 50, 150, imgx.getWidth(), imgx.getHeight(), imgx);

    //Write the PPTX file to disk
    pres.save("data/pptx4j/ImageInSlide-Aspose.pptx", SaveFormat.Pptx);
  }
View Full Code Here

Examples of com.aspose.slides.ISlide

  {
    //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

Examples of com.aspose.slides.ISlide

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

    //Accessing a slide using its index in the slides collection
    ISlide slide = pres.getSlides().get_Item(1);

    //Removing a slide using its reference
    pres.getSlides().remove(slide);
   
    //Removing a slide using its slide index
View Full Code Here

Examples of com.aspose.slides.ISlide

   
    //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

Examples of com.aspose.slides.ISlide

    // Adding slide comment for an author on slide 1
    author.getComments().addComment("Hello Mudassir, 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

Examples of com.aspose.slides.ISlide

  {
    //Instantiate a PresentationEx object that represents a PPTX file
    Presentation pres = new Presentation("data/presentation.ppt");
   
      //Add the title slide
      ISlide slide = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));
   
    //Save the presentation
    pres.save("data/EditedPPT_Aspose.ppt", SaveFormat.Ppt);
   
    System.out.println("Presentation Edited and Saved.");
View Full Code Here

Examples of com.aspose.slides.ISlide

  {
    //Create a presentation
      Presentation pres = new Presentation();

      //Add the title slide
      ISlide slide = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));


      //Set the title text
      ((IAutoShape)slide.getShapes().get_Item(0)).getTextFrame().setText("Slide Title Heading");

      //Set the sub title text
      ((IAutoShape)slide.getShapes().get_Item(1)).getTextFrame().setText("Slide Title Sub-Heading");

      //Write output to disk
      pres.save("data/Aspose_SlideTitle.pptx",SaveFormat.Pptx);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.