Top Methods
org.apache.poi.sl.usermodel

public Interface SlideShow<S extends Shape<S, P>, P extends TextParagraph<S, P, ? extends TextRun>>

extends Closeable
Annotations
@SuppressWarnings:java:S1452
Imports
java.awt.Dimension, java.io.Closeable, .File, .IOException, .InputStream, .OutputStream, java.util.List, org.apache.poi.common.usermodel.fonts.FontInfo, org.apache.poi.extractor.POITextExtractor, org.apache.poi.sl.usermodel.PictureData.PictureType

Method Summary

Modifier and TypeMethod and Description
public FontInfo

Returns:

the font info object containing the new font data
addFont
(InputStream
the EOT font as stream
fontData
)

Add an EOT font to the slideshow.

public PictureData

Returns:

the picture data reference.
addPicture
(byte[]
The bytes of the picture
pictureData
,
PictureData.PictureType
The format of the picture.
format
)

Adds a picture to the presentation.

public PictureData

Returns:

the picture data reference.
addPicture
(InputStream
The stream to read the image from
is
,
PictureData.PictureType
The format of the picture.
format
)

Adds a picture to the presentation.

public PictureData

Returns:

the picture data reference
addPicture
(File
The file containing the image to add
pict
,
PictureData.PictureType
The format of the picture.
format
)

Adds a picture to the presentation.

public MasterSheet<S, P>
public Slide<S, P>
public PictureData

Returns:

null if picture data is not found in this slideshow
findPictureData
(byte[]
The picture data to find in the SlideShow
pictureData
)

check if a picture with this picture data already exists in this presentation

public List<? extends FontInfo>

Returns:

a list of registered fonts
getFonts
()

public POITextExtractor

Returns:

an extractor for the slideshow metadata
getMetadataTextExtractor
()

public Dimension

Returns:

the page size
getPageSize
()

Returns the current page size

public Object

Returns:

the instance which handles the persisting of the slideshow, which is either a subclass of org.apache.poi.POIDocument or org.apache.poi.ooxml.POIXMLDocument
getPersistDocument
()

public List<? extends PictureData>

Returns:

a List of PictureData.
getPictureData
()

Returns all Pictures of this slideshow.

public List<? extends MasterSheet<S, P>>
getSlideMasters()

Returns all slide masters.

public List<? extends Slide<S, P>>
public void
setPageSize(Dimension
page size (in points)
pgsize
)

Change the current page size

public void
write(OutputStream
The OutputStream to write to.
out
)

Writes out the slideshow file the is represented by an instance of this class

Inherited from java.io.Closeable:
close

Method Detail

addFontback to summary
public FontInfo addFont(InputStream fontData) throws IOException

Add an EOT font to the slideshow. An EOT or MTX font is a transformed True-Type (.ttf) or Open-Type (.otf) font. To transform a True-Type font use the sfntly library (see "see also" below)

(Older?) Powerpoint versions handle embedded fonts by converting them to .ttf files and put them into the Windows fonts directory. If the user is not allowed to install fonts, the slideshow can't be opened. While the slideshow is opened, its possible to copy the extracted .ttfs from the fonts directory. When the slideshow is closed, they will be removed.

Parameters
fontData:InputStream

the EOT font as stream

Returns:FontInfo

the font info object containing the new font data

Exceptions
IOException:
if the fontData can't be saved or if the fontData is no EOT font
See Also
EOT specification, googles sfntly library, Example on how to subset and embed fonts
addPictureback to summary
public PictureData addPicture(byte[] pictureData, PictureData.PictureType format) throws IOException

Adds a picture to the presentation.

Parameters
pictureData:byte[]

The bytes of the picture

format:PictureData.PictureType

The format of the picture.

Returns:PictureData

the picture data reference.

addPictureback to summary
public PictureData addPicture(InputStream is, PictureData.PictureType format) throws IOException

Adds a picture to the presentation.

Parameters
is:InputStream

The stream to read the image from

format:PictureData.PictureType

The format of the picture.

Returns:PictureData

the picture data reference.

Since
3.15 beta 1
addPictureback to summary
public PictureData addPicture(File pict, PictureData.PictureType format) throws IOException

Adds a picture to the presentation.

Parameters
pict:File

The file containing the image to add

format:PictureData.PictureType

The format of the picture.

Returns:PictureData

the picture data reference

Since
3.15 beta 1
createMasterSheetback to summary
public MasterSheet<S, P> createMasterSheet() throws IOException
createSlideback to summary
public Slide<S, P> createSlide() throws IOException
findPictureDataback to summary
public PictureData findPictureData(byte[] pictureData)

check if a picture with this picture data already exists in this presentation

Parameters
pictureData:byte[]

The picture data to find in the SlideShow

Returns:PictureData

null if picture data is not found in this slideshow

Since
3.15 beta 3
getFontsback to summary
public List<? extends FontInfo> getFonts()
Returns:List<? extends FontInfo>

a list of registered fonts

getMetadataTextExtractorback to summary
public POITextExtractor getMetadataTextExtractor()
Returns:POITextExtractor

an extractor for the slideshow metadata

Since
POI 4.0.0
getPageSizeback to summary
public Dimension getPageSize()

Returns the current page size

Returns:Dimension

the page size

getPersistDocumentback to summary
public Object getPersistDocument()
Returns:Object

the instance which handles the persisting of the slideshow, which is either a subclass of org.apache.poi.POIDocument or org.apache.poi.ooxml.POIXMLDocument

Since
POI 4.0.0
getPictureDataback to summary
public List<? extends PictureData> getPictureData()

Returns all Pictures of this slideshow. The returned List is unmodifiable.

Returns:List<? extends PictureData>

a List of PictureData.

getSlideMastersback to summary
public List<? extends MasterSheet<S, P>> getSlideMasters()

Returns all slide masters. This doesn't include notes master and other arbitrary masters.

getSlidesback to summary
public List<? extends Slide<S, P>> getSlides()
setPageSizeback to summary
public void setPageSize(Dimension pgsize)

Change the current page size

Parameters
pgsize:Dimension

page size (in points)

writeback to summary
public void write(OutputStream out) throws IOException

Writes out the slideshow file the is represented by an instance of this class

Parameters
out:OutputStream

The OutputStream to write to.

Exceptions
IOException:
If there is an unexpected IOException from the passed in OutputStream