POI api Projects

POI api Project 1

How to change the size of the PPT slide
Previous Home Next


In this page of the tutorials we are trying to Create a slide then change the size of the slide in java application.

setPageSize(java.awt.Dimension pgsize):-
This methods provide the feature of for change the size current page. The page size range passed as parameter in this method. The return type is void. This method is defined as public in SlideShow class.

package r4r;
import org.apache.poi.hslf.HSLFSlideShow;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.usermodel.SlideShow;
import java.io.*;
public class changesizeofpptslide {
	 public static void main(String a[])
	SlideShow slideShow = new SlideShow(new HSLFSlideShow("slide1.ppt"));
	  java.awt.Dimension pgsize = slideShow.getPageSize();
	  slideShow.setPageSize(new java.awt.Dimension(800, 600));
	 FileOutputStream out = new FileOutputStream
	  catch(Exception we){}

Previous Home Next