SlideCollection

SlideCollection class

Represents a collection of a slides.

addClone

NameDescription
addClone (Slide)Adds a copy of a specified slide to the end of the collection.

Parameters:

NameTypeDescription
sourceSlideSlideSlide to clone. When cloning a slide between different presentations slide’s master can be cloned too. Internal registry is used to track automatically cloned masters to prevent creation of multiple clones of the same master slide. Manual cloning of master slides will be neither prevented nor registered. If you need more control over cloning process use #addClone(ISlide,ILayoutSlide) or #addClone(ISlide,IMasterSlide,boolean) for cloning slides, IGlobalLayoutSlideCollection#addClone(ILayoutSlide) or IGlobalLayoutSlideCollection#addClone(ILayoutSlide,IMasterSlide) for cloning layouts and IMasterSlideCollection#addClone(IMasterSlide) for cloning masters.

Returns: Slide


addClone

NameDescription
addClone (Slide, Section)Adds a copy of a specified slide to the end of the specified section.

Parameters:

NameTypeDescription
sourceSlideSlideSlide to clone.
sectionSectionSection for a new slide.

Returns: Slide

Exception

ErrorCondition
PptxEditExceptionWhen section parameter contains wrong or invalid value.

addClone

NameDescription
addClone (Slide, LayoutSlide)Adds a copy of a specified slide to the end of the collection.

Parameters:

NameTypeDescription
sourceSlideSlideSlide to clone.
destLayoutLayoutSlideLayout slide for a new slide.

Returns: Slide


addClone

NameDescription
addClone (Slide, MasterSlide, boolean)Adds a copy of a specified source slide to the end of the collection. Appropriate layout will be selected automatically from the specified master (appropriate layout is the layout with the same Type or Name as of layout of the source slide). If there is no appropriate layout then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).

Parameters:

NameTypeDescription
sourceSlideSlideSlide to clone.
destMasterMasterSlideMaster slide for a new slide.
allowCloneMissingLayoutbooleanIf there is no appropriate layout in specified master then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).

Returns: Slide

Exception

ErrorCondition
PptxEditExceptionThrown if there is no appropriate layout in specified master and allowCloneMissingLayout is false.

addEmptySlide

NameDescription
addEmptySlide (LayoutSlide)Adds a new empty slide to the end of the collection.

Parameters:

NameTypeDescription
layoutLayoutSlideLayout for a slide.

Returns: Slide


addFromHtml

NameDescription
addFromHtml (String, HtmlExternalResolver, String)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlTextStringHtml to add.
resolverHtmlExternalResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


addFromHtml

NameDescription
addFromHtml (String, ExternalResourceResolver, String)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlTextStringHtml to add.
resolverExternalResourceResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


addFromHtml

NameDescription
addFromHtml (String)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlTextStringHtml to add.

Returns: Slide


addFromHtml

NameDescription
addFromHtml (InputStream, HtmlExternalResolver, String)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlStreamInputStreamA Stream object which will be used as a source of a HTML file.
resolverHtmlExternalResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


addFromHtml

NameDescription
addFromHtml (InputStream, ExternalResourceResolver, String)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlStreamInputStreamA Stream object which will be used as a source of a HTML file.
resolverExternalResourceResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


addFromHtml

NameDescription
addFromHtml (InputStream)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlStreamInputStreamA Stream object which will be used as a source of a HTML file.

Returns: Slide


addFromPdf

NameDescription
addFromPdf (String)Creates slides from the PDF document and adds them to the end of the collection.

Parameters:

NameTypeDescription
pathStringA path to the PDF document

Returns: Slide


addFromPdf

NameDescription
addFromPdf (String, PdfImportOptions)Creates slides from the PDF document and adds them to the end of the collection considering the pdf import options.

Parameters:

NameTypeDescription
pathStringA path to the PDF document
pdfImportOptionsPdfImportOptionsOptions for pdf import

Returns: Slide


addFromPdf

NameDescription
addFromPdf (InputStream)Creates slides from the PDF document and adds them to the end of the collection.

Parameters:

NameTypeDescription
pdfStreamInputStreamA stream which will be used as a source of the PDF document

Returns: Slide


addFromPdf

NameDescription
addFromPdf (InputStream, PdfImportOptions)Creates slides from the PDF document and adds them to the end of the collection.

Parameters:

NameTypeDescription
pdfStreamInputStreamA stream which will be used as a source of the PDF document
pdfImportOptionsPdfImportOptionsOptions for pdf import

Returns: Slide


getSyncRoot

NameDescription
getSyncRoot ()Returns a synchronization root. Read-only Object.

Returns: Object


get_Item

NameDescription
get_Item (int)Gets the element at the specified index. Read-only Slide.

Returns: Slide


indexOf

NameDescription
indexOf (Slide)Returns an index of the specified slide in the collection.

Parameters:

NameTypeDescription
slideSlideSlide to find.

Returns: int


insertClone

NameDescription
insertClone (int, Slide)Inserts a copy of a specified slide to specified position of the collection.

Parameters:

NameTypeDescription
indexintIndex of new slide.
sourceSlideSlideSlide to clone. When cloning a slide between different presentations slide’s master can be cloned too. Internal registry is used to track automatically cloned masters to prevent creation of multiple clones of the same master slide. Manual cloning of master slides will be neither prevented nor registered. If you need more control over cloning process use #insertClone(int,ISlide,ILayoutSlide) or #insertClone(int,ISlide,IMasterSlide,boolean) for cloning slides and IMasterSlideCollection#addClone(IMasterSlide) for cloning masters.

Returns: Slide


insertClone

NameDescription
insertClone (int, Slide, LayoutSlide)Inserts a copy of a specified slide to specified position of the collection.

Parameters:

NameTypeDescription
indexintIndex of new slide.
sourceSlideSlideSlide to clone.
destLayoutLayoutSlideLayout slide for a new slide.

Returns: Slide


insertClone

NameDescription
insertClone (int, Slide, MasterSlide, boolean)Inserts a copy of a specified source slide to specified position of the collection. Appropriate layout will be selected automatically from the specified master (appropriate layout is the layout with the same Type or Name as of layout of the source slide). If there is no appropriate layout then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).

Parameters:

NameTypeDescription
indexintIndex of new slide.
sourceSlideSlideSlide to clone.
destMasterMasterSlideMaster slide for a new slide.
allowCloneMissingLayoutbooleanIf there is no appropriate layout in specified master then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).

Returns: Slide

Exception

ErrorCondition
PptxEditExceptionThrown if there is no appropriate layout in specified master and allowCloneMissingLayout is false.

insertEmptySlide

NameDescription
insertEmptySlide (int, LayoutSlide)Inserts a copy of a specified slide to specified position of the collection.

Parameters:

NameTypeDescription
indexintIndex of a new slide.
layoutLayoutSlideLayout for a slide.

Returns: Slide


insertFromHtml

NameDescription
insertFromHtml (int, String, HtmlExternalResolver, String)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
indexintPosition to insert.
htmlTextStringHtml to add.
resolverHtmlExternalResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


insertFromHtml

NameDescription
insertFromHtml (int, String, ExternalResourceResolver, String)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
indexintPosition to insert.
htmlTextStringHtml to add.
resolverExternalResourceResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


insertFromHtml

NameDescription
insertFromHtml (int, String)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
indexintPosition to insert.
htmlTextStringHtml to add.

Returns: Slide


insertFromHtml

NameDescription
insertFromHtml (int, InputStream, HtmlExternalResolver, String)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
indexintPosition to insert.
htmlStreamInputStreamA Stream object which will be used as a source of a HTML file.
resolverHtmlExternalResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


insertFromHtml

NameDescription
insertFromHtml (int, InputStream, ExternalResourceResolver, String)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
indexintPosition to insert.
htmlStreamInputStreamA Stream object which will be used as a source of a HTML file.
resolverExternalResourceResolverA callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriStringAn URI of the specified HTML. Used to resolve relative links.

Returns: Slide


insertFromHtml

NameDescription
insertFromHtml (int, InputStream)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
indexintPosition to insert.
htmlStreamInputStreamA Stream object which will be used as a source of a HTML file.

Returns: Slide


isSynchronized

NameDescription
isSynchronized ()Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.

Returns: boolean


iterator

NameDescription
iterator ()Returns an enumerator that iterates through the collection.

Returns:


iteratorJava

NameDescription
iteratorJava ()Returns a java iterator for the entire collection.

Returns:


remove

NameDescription
remove (Slide)Removes the first occurrence of a specific object from the collection.

Parameters:

NameTypeDescription
valueSlideThe slide to remove from the collection.

Returns: void


removeAt

NameDescription
removeAt (int)Removes the element at the specified index of the collection.

Parameters:

NameTypeDescription
indexintThe zero-based index of the element to remove.

Returns: void

Exception

ErrorCondition
ArgumentOutOfRangeExceptionWhen index parameter contains wrong section number.

reorder

NameDescription
reorder (int, Slide)Moves slide from the collection to the specified position.

Parameters:

NameTypeDescription
indexintTarget index.
slideSlideSlide to move.

Returns: void


reorder

NameDescription
reorder (int, com.aspose.slides.ISlide[])Moves slides from the collection to the specified position. Slides will be placed starting from index in order they appear in list.

Parameters:

NameTypeDescription
indexintTarget index.
slidescom.aspose.slides.ISlide[]Slides to move.

Returns: void


size

NameDescription
size ()Gets the number of elements actually contained in the collection. Read-only int.

Returns: int


toArray

NameDescription
toArray ()Creates and returns an array with all slides in it.

Returns: Slide


toArray

NameDescription
toArray (int, int)Creates and returns an array with all slides from the specified range in it.

Parameters:

NameTypeDescription
startIndexintAn index of a first slide to add.
countintA number of slides to add.

Returns: Slide