/** * Constructs a Powerpoint document from an DirectoryNode. */ @SuppressWarnings("resource") public HSLFSlideShow(DirectoryNode root) throws IOException { this(new HSLFSlideShowImpl(root)); }
/** * Constructs a Powerpoint document from an POIFSFileSystem. */ @SuppressWarnings("resource") public HSLFSlideShow(POIFSFileSystem npoifs) throws IOException { this(new HSLFSlideShowImpl(npoifs)); }
/** * Constructs a Powerpoint document from an input stream. */ @SuppressWarnings("resource") public HSLFSlideShow(InputStream inputStream) throws IOException { this(new HSLFSlideShowImpl(inputStream)); }
/** * Constructs a Powerpoint dump from fileName. Parses the document * and dumps out the contents * * @param fileName The name of the file to read. * @throws IOException if there is a problem while parsing the document. */ public SlideShowRecordDumper(PrintStream ps, String fileName, boolean verbose, boolean escher) throws IOException { this.ps = ps; optVerbose = verbose; optEscher = escher; doc = new HSLFSlideShowImpl(fileName); }
/** * Constructs a new, empty, Powerpoint document. */ public static HSLFSlideShowImpl create() { InputStream is = HSLFSlideShowImpl.class.getResourceAsStream("/org/apache/poi/hslf/data/empty.ppt"); if (is == null) { throw new HSLFException("Missing resource 'empty.ppt'"); } try { try { return new HSLFSlideShowImpl(is); } finally { is.close(); } } catch (IOException e) { throw new HSLFException(e); } }
public static void main(String args[]) throws IOException { if (args.length < 1) { System.err.println("Usage:"); System.err.println("\tImageExtractor <file>"); return; } HSLFSlideShow ppt = new HSLFSlideShow(new HSLFSlideShowImpl(args[0])); //extract all pictures contained in the presentation int i = 0; for (HSLFPictureData pict : ppt.getPictureData()) { // picture data byte[] data = pict.getData(); PictureType type = pict.getType(); FileOutputStream out = new FileOutputStream("pict_" + i++ + type.extension); out.write(data); out.close(); } ppt.close(); } }
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]); System.out.println("");
public static PowerpointMetadata instance( InputStream stream ) throws IOException { POIFSFileSystem fs = new POIFSFileSystem(stream); HSLFSlideShow rawSlideShow = new HSLFSlideShow(fs); List<SlideMetadata> slidesMetadata = rawSlideShow.getSlides() .stream() .map(slide -> processSlide(rawSlideShow, slide)) .collect(Collectors.toList()); PowerpointMetadata deck = new PowerpointMetadata(); deck.setSlides(slidesMetadata); deck.setMetadata(new HSLFSlideShowImpl(fs).getSummaryInformation()); return deck; }
public static PowerpointMetadata instance( InputStream stream ) throws IOException { POIFSFileSystem fs = new POIFSFileSystem(stream); HSLFSlideShow rawSlideShow = new HSLFSlideShow(fs); List<SlideMetadata> slidesMetadata = rawSlideShow.getSlides() .stream() .map(slide -> processSlide(rawSlideShow, slide)) .collect(Collectors.toList()); PowerpointMetadata deck = new PowerpointMetadata(); deck.setSlides(slidesMetadata); deck.setMetadata(new HSLFSlideShowImpl(fs).getSummaryInformation()); return deck; }
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]);
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]); fileContents = ss.getUnderlyingBytes(); System.out.println("");
HSLFSlideShowImpl slideShow1 = new HSLFSlideShowImpl(leftIs); HSLFSlideShowImpl slideShow2 = new HSLFSlideShowImpl(new FileInputStream(newFile));
HSLFSlideShowImpl slideShow1 = new HSLFSlideShowImpl(leftIs); HSLFSlideShowImpl slideShow2 = new HSLFSlideShowImpl(new FileInputStream(newFile));
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]);
HSLFSlideShowImpl hss = new HSLFSlideShowImpl(args[0]); HSLFSlideShow ss = new HSLFSlideShow(hss);
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]);
HSLFSlideShowImpl ss = new HSLFSlideShowImpl(args[0]);