AddFromHtml()

SlideCollection::AddFromHtml(System::String, System::SharedPtr<Import::IExternalResourceResolver>, System::String) method

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

System::ArrayPtr<System::SharedPtr<ISlide>> Aspose::Slides::SlideCollection::AddFromHtml(System::String htmlText, System::SharedPtr<Import::IExternalResourceResolver> resolver, System::String uri) override

Arguments

ParameterTypeDescription
htmlTextSystem::StringHtml to add.
resolverSystem::SharedPtr<Import::IExternalResourceResolver>A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriSystem::StringAn URI of the specified HTML. Used to resolve relative links.

Return Value

Added slides.

SlideCollection::AddFromHtml(System::String) method

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

System::ArrayPtr<System::SharedPtr<ISlide>> Aspose::Slides::SlideCollection::AddFromHtml(System::String htmlText) override

Arguments

ParameterTypeDescription
htmlTextSystem::StringHtml to add.

Return Value

Added slides

SlideCollection::AddFromHtml(System::SharedPtr<System::IO::TextReader>, System::SharedPtr<Import::IExternalResourceResolver>, System::String) method

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

System::ArrayPtr<System::SharedPtr<ISlide>> Aspose::Slides::SlideCollection::AddFromHtml(System::SharedPtr<System::IO::TextReader> htmlReader, System::SharedPtr<Import::IExternalResourceResolver> resolver, System::String uri) override

Arguments

ParameterTypeDescription
htmlReaderSystem::SharedPtr<System::IO::TextReader>TextReader object which will be used as a source of a HTML file.
resolverSystem::SharedPtr<Import::IExternalResourceResolver>A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriSystem::StringAn URI of the specified HTML. Used to resolve relative links.

Return Value

Added slides.

SlideCollection::AddFromHtml(System::SharedPtr<System::IO::TextReader>) method

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

System::ArrayPtr<System::SharedPtr<ISlide>> Aspose::Slides::SlideCollection::AddFromHtml(System::SharedPtr<System::IO::TextReader> htmlReader) override

Arguments

ParameterTypeDescription
htmlReaderSystem::SharedPtr<System::IO::TextReader>TextReader object which will be used as a source of a HTML file.

Return Value

Added slides

SlideCollection::AddFromHtml(System::SharedPtr<System::IO::Stream>, System::SharedPtr<Import::IExternalResourceResolver>, System::String) method

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

System::ArrayPtr<System::SharedPtr<ISlide>> Aspose::Slides::SlideCollection::AddFromHtml(System::SharedPtr<System::IO::Stream> htmlStream, System::SharedPtr<Import::IExternalResourceResolver> resolver, System::String uri) override

Arguments

ParameterTypeDescription
htmlStreamSystem::SharedPtr<System::IO::Stream>A Stream object which will be used as a source of a HTML file.
resolverSystem::SharedPtr<Import::IExternalResourceResolver>A callback object used to fetch external objects. If this parameter is null all external objects will be ignored.
uriSystem::StringAn URI of the specified HTML. Used to resolve relative links.

Return Value

Added slides.

SlideCollection::AddFromHtml(System::SharedPtr<System::IO::Stream>) method

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

System::ArrayPtr<System::SharedPtr<ISlide>> Aspose::Slides::SlideCollection::AddFromHtml(System::SharedPtr<System::IO::Stream> htmlStream) override

Arguments

ParameterTypeDescription
htmlStreamSystem::SharedPtr<System::IO::Stream>A Stream object which will be used as a source of a HTML file.

Return Value

Added slides

Remarks

// Create an instance of the Presentation class.
auto presentation = System::MakeObject<Presentation>();

{
    auto htmlStream = System::IO::File::OpenRead(u"page.html");

    // Call the AddFromHtml method and pass the HTML file.
    presentation->get_Slides()->AddFromHtml(htmlStream);
}

// Use the Save method to save the file as a PowerPoint document.
presentation->Save(u"MyPresentation.pptx", SaveFormat::Pptx);

See Also