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

Error

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

Error

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, 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, 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)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
htmlTextStringHtml to add.

Returns: Slide


addFromHtmlFromStream

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

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
htmlStreamReadStreamA 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.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Slide


addFromHtmlFromStream

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

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
htmlStreamReadStreamA 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.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Slide


addFromHtmlFromStream

NameDescription
addFromHtmlFromStream (SlideCollection, ReadStream, Function)Creates slides from HTML text and adds them to the end of the collection.

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
htmlStreamReadStreamA Stream object which will be used as a source of a HTML file.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

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


addFromPdfFromStream

NameDescription
addFromPdfFromStream (SlideCollection, ReadStream, Function)Creates slides from the PDF document and adds them to the end of the collection.

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
pdfStreamReadStreamA stream which will be used as a source of the PDF document
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Slide


addFromPdfFromStream

NameDescription
addFromPdfFromStream (SlideCollection, ReadStream, PdfImportOptions, Function)Creates slides from the PDF document and adds them to the end of the collection.

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
pdfStreamReadStreamA stream which will be used as a source of the PDF document
pdfImportOptionsPdfImportOptionsOptions for pdf import
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

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

Error

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, 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, 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)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


insertFromHtmlFromStream

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

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
indexintPosition to insert.
htmlStreamReadStreamA 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.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Slide


insertFromHtmlFromStream

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

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
indexintPosition to insert.
htmlStreamReadStreamA 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.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: Slide


insertFromHtmlFromStream

NameDescription
insertFromHtmlFromStream (SlideCollection, int, ReadStream, Function)Creates slides from HTML text and inserts them to the collection at the specified position.

Parameters:

NameTypeDescription
slidecollectionSlideCollectionlink to self
indexintPosition to insert.
htmlStreamReadStreamA Stream object which will be used as a source of a HTML file.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

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.

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.

Error

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.

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.

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