R4R
Right Place For Right Person TM
 
R4R Right ArrowJavaRight Arrow Java APIsRight ArrowPOI APIRight ArrowPOI APIs Basic Example
Previous Home Next

How to change the size of the PPT slide


Introduction:

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



Descriptions:
 
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.

 


SourceCode:

 
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[])
	  {
	  try{
	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
	("changeSizeppt.ppt");
	  slideShow.write(out);
	  out.close();
	  }
	  catch(Exception we){}
	  }
}




Output of SourceCode:
 

How to change the size of the PPT slide

Previous Home Next
R4R Right ArrowJavaRight Arrow Java APIsRight ArrowPOI APIRight ArrowPOI APIs Basic Example

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R