List of usage examples for org.apache.poi.hslf.usermodel HSLFSlideShow close
@Override
public void close() throws IOException
From source file:com.github.codeurjc.slidesconverter.PowerPointToHTML.java
License:Apache License
public void convert() throws IOException { InputStream fis = Files.newInputStream(pptxFile); XMLSlideShow pptx = new XMLSlideShow(fis); fis.close();// w w w . j ava2 s. c o m InputStream is = Files.newInputStream(pptFile); HSLFSlideShow ppt = new HSLFSlideShow(is); is.close(); width = pptx.getPageSize().getWidth(); height = pptx.getPageSize().getHeight(); out = new PrintWriter(Files.newOutputStream(htmlFile)); out.println("<!DOCTYPE html>"); out.println("<html><body>"); out.println("<h1>" + this.mainTitleNumber + " " + mainTitle + "</h1>"); out.println("<h2>" + this.slidesContext + "</h2>"); List<Section> sections = calculateSections(pptx, ppt); generateTOC(sections); generateSlidesContent(pptx, ppt); pptx.close(); ppt.close(); out.close(); }