Package org.apache.poi.sl.usermodel
Interface SlideShow<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
-
- All Superinterfaces:
AutoCloseable
,Closeable
public interface SlideShow<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>> extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FontInfo
addFont(InputStream fontData)
Add an EOT font to the slideshow.PictureData
addPicture(byte[] pictureData, PictureData.PictureType format)
Adds a picture to the presentation.PictureData
addPicture(File pict, PictureData.PictureType format)
Adds a picture to the presentation.PictureData
addPicture(InputStream is, PictureData.PictureType format)
Adds a picture to the presentation.MasterSheet<S,P>
createMasterSheet()
Slide<S,P>
createSlide()
PictureData
findPictureData(byte[] pictureData)
check if a picture with this picture data already exists in this presentationList<? extends FontInfo>
getFonts()
POITextExtractor
getMetadataTextExtractor()
Dimension
getPageSize()
Returns the current page sizeObject
getPersistDocument()
List<? extends PictureData>
getPictureData()
Returns all Pictures of this slideshow.List<? extends MasterSheet<S,P>>
getSlideMasters()
Returns all slide masters.List<? extends Slide<S,P>>
getSlides()
void
setPageSize(Dimension pgsize)
Change the current page sizevoid
write(OutputStream out)
Writes out the slideshow file the is represented by an instance of this class
-
-
-
Method Detail
-
createSlide
Slide<S,P> createSlide() throws IOException
- Throws:
IOException
-
createMasterSheet
MasterSheet<S,P> createMasterSheet() throws IOException
- Throws:
IOException
-
getSlideMasters
List<? extends MasterSheet<S,P>> getSlideMasters()
Returns all slide masters. This doesn't include notes master and other arbitrary masters.
-
getPageSize
Dimension getPageSize()
Returns the current page size- Returns:
- the page size
-
setPageSize
void setPageSize(Dimension pgsize)
Change the current page size- Parameters:
pgsize
- page size (in points)
-
getPictureData
List<? extends PictureData> getPictureData()
Returns all Pictures of this slideshow. The returnedList
is unmodifiable.- Returns:
- a
List
ofPictureData
.
-
addPicture
PictureData addPicture(byte[] pictureData, PictureData.PictureType format) throws IOException
Adds a picture to the presentation.- Parameters:
pictureData
- The bytes of the pictureformat
- The format of the picture.- Returns:
- the picture data reference.
- Throws:
IOException
-
addPicture
PictureData addPicture(InputStream is, PictureData.PictureType format) throws IOException
Adds a picture to the presentation.- Parameters:
is
- The stream to read the image fromformat
- The format of the picture.- Returns:
- the picture data reference.
- Throws:
IOException
- Since:
- 3.15 beta 1
-
addPicture
PictureData addPicture(File pict, PictureData.PictureType format) throws IOException
Adds a picture to the presentation.- Parameters:
pict
- The file containing the image to addformat
- The format of the picture.- Returns:
- the picture data reference
- Throws:
IOException
- Since:
- 3.15 beta 1
-
findPictureData
PictureData findPictureData(byte[] pictureData)
check if a picture with this picture data already exists in this presentation- Parameters:
pictureData
- The picture data to find in the SlideShow- Returns:
null
if picture data is not found in this slideshow- Since:
- 3.15 beta 3
-
write
void write(OutputStream out) throws IOException
Writes out the slideshow file the is represented by an instance of this class- Parameters:
out
- The OutputStream to write to.- Throws:
IOException
- If there is an unexpected IOException from the passed in OutputStream
-
getMetadataTextExtractor
POITextExtractor getMetadataTextExtractor()
- Returns:
- an extractor for the slideshow metadata
- Since:
- POI 4.0.0
-
getPersistDocument
Object getPersistDocument()
- Returns:
- the instance which handles the persisting of the slideshow,
which is either a subclass of
POIDocument
orPOIXMLDocument
- Since:
- POI 4.0.0
-
addFont
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
- the EOT font as stream- Returns:
- the font info object containing the new font data
- Throws:
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
-
-