Paragraph()

ForEach::Paragraph(System::SharedPtr<Presentation>, ForEach::ForEachParagraphCallback) method

Iterate each ForEach::Paragraph in the Presentation.

static void Aspose::Slides::LowCode::ForEach::Paragraph(System::SharedPtr<Presentation> pres, ForEach::ForEachParagraphCallback forEachParagraph)

Arguments

ParameterTypeDescription
presSystem::SharedPtr<Presentation>Presentation to iterate paragraphs
forEachParagraphForEach::ForEachParagraphCallbackCallback that will be invoked for each paragraph

Remarks

Shapes will be iterated in all type of slides - ForEach::Slide, ForEach::MasterSlide and ForEach::LayoutSlide

auto pres = System::MakeObject<Presentation>(u"pres.pptx");

auto lambda = [](SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)
{
    System::Console::WriteLine(u"{0}, index: {1}", para->get_Text(), index);
};
auto callback = std::function<void(SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)>(lambda);

ForEach::Paragraph(pres, callback);

ForEach::Paragraph(System::SharedPtr<Presentation>, bool, ForEach::ForEachParagraphCallback) method

Iterate each ForEach::Paragraph in the Presentation.

static void Aspose::Slides::LowCode::ForEach::Paragraph(System::SharedPtr<Presentation> pres, bool includeNotes, ForEach::ForEachParagraphCallback forEachParagraph)

Arguments

ParameterTypeDescription
presSystem::SharedPtr<Presentation>Presentation to iterate paragraphs
includeNotesboolFlag that indicates whether NotesSlides should be included in processing.
forEachParagraphForEach::ForEachParagraphCallbackCallback that will be invoked for each paragraph

Remarks

Shapes will be iterated in all type of slides - ForEach::Slide, ForEach::MasterSlide, ForEach::LayoutSlide and NotesSlide

auto pres = System::MakeObject<Presentation>(u"pres.pptx");

auto lambda = [](SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)
{
    System::Console::WriteLine(u"{0}, index: {1}", para->get_Text(), index);
};
auto callback = std::function<void(SharedPtr<Paragraph> para, SharedPtr<BaseSlide> slide, int32_t index)>(lambda);

ForEach::Paragraph(pres, true, callback);

See Also