AddFromHtml

AddFromHtml(string, IExternalResourceResolver, string)

Creates slides from HTML text and adds them to the end of the collection.

public ISlide[] AddFromHtml(string htmlText, IExternalResourceResolver resolver, string uri)
ParameterTypeDescription
htmlTextStringHtml to add.
resolverIExternalResourceResolverA 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.

Return Value

Added slides.

See Also


AddFromHtml(string)

Creates slides from HTML text and adds them to the end of the collection.

public ISlide[] AddFromHtml(string htmlText)
ParameterTypeDescription
htmlTextStringHtml to add.

Return Value

Added slides

See Also


AddFromHtml(TextReader, IExternalResourceResolver, string)

Creates slides from HTML text and adds them to the end of the collection.

public ISlide[] AddFromHtml(TextReader htmlReader, IExternalResourceResolver resolver, string uri)
ParameterTypeDescription
htmlReaderTextReaderTextReader object which will be used as a source of a HTML file.
resolverIExternalResourceResolverA 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.

Return Value

Added slides.

See Also


AddFromHtml(TextReader)

Creates slides from HTML text and adds them to the end of the collection.

public ISlide[] AddFromHtml(TextReader htmlReader)
ParameterTypeDescription
htmlReaderTextReaderTextReader object which will be used as a source of a HTML file.

Return Value

Added slides

See Also


AddFromHtml(Stream, IExternalResourceResolver, string)

Creates slides from HTML text and adds them to the end of the collection.

public ISlide[] AddFromHtml(Stream htmlStream, IExternalResourceResolver resolver, string uri)
ParameterTypeDescription
htmlStreamStreamA Stream object which will be used as a source of a HTML file.
resolverIExternalResourceResolverA 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.

Return Value

Added slides.

See Also


AddFromHtml(Stream)

Creates slides from HTML text and adds them to the end of the collection.

public ISlide[] AddFromHtml(Stream htmlStream)
ParameterTypeDescription
htmlStreamStreamA Stream object which will be used as a source of a HTML file.

Return Value

Added slides

Examples

[C#]
// Create an instance of the Presentation class.
using (var presentation = new Presentation())
{
    using (var htmlStream = File.OpenRead("page.html"))
    {
		// Call the AddFromHtml method and pass the HTML file.
        presentation.Slides.AddFromHtml(htmlStream);
    }
	// Use the Save method to save the file as a PowerPoint document.
    presentation.Save("MyPresentation.pptx", SaveFormat.Pptx);
}

See Also