Hi Dharminder,
Thanks for your interest in Aspose.Slides.
Well, as per our live conversation, following examples have been prepared that can be tested with the attached PPTX for demonstration purpose.
1) Example for extracting paragraphs from notes:
PresentationEx pres = new PresentationEx("d:\\ppt\\jan\\singh\\title.pptx");
TextFrameEx[] tf = PresentationScanner.GetAllTextBoxes(pres.Slides[0].NotesSlide);
for (int i = 0; i < tf.Length; i++)
foreach (ParagraphEx para in tf[i].Paragraphs)
foreach (PortionEx port in para.Portions)
{
Response.Write(" Shape Text " + port.Text + "
");
}
2) Example for extracting paragraphs from all the content slides from a PPTX:
PresentationEx pres = new PresentationEx("d:\\ppt\\jan\\singh\\title.pptx");
TextFrameEx[] tf = PresentationScanner.GetAllTextFrames(pres,false);
for (int i = 0; i < tf.Length; i++)
foreach (ParagraphEx para in tf[i].Paragraphs)
foreach (PortionEx port in para.Portions)
{
Response.Write(" Shape Text " + port.Text + "
");
}
3) Example for extracting paragraphs from a content slide with differentiating PlaceHolder Text and TextBox Text:
PresentationEx pres = new PresentationEx("d:\\ppt\\jan\\singh\\title.pptx");
SlideEx sld= pres.Slides[0];
foreach (ShapeEx shp in sld.Shapes)
{
if (shp.IsTextHolder)
{
AutoShapeEx ashp = (AutoShapeEx)shp;
if (ashp.TextFrame != null)
{
TextFrameEx tf = ashp.TextFrame;
foreach( ParagraphEx para in tf.Paragraphs )
foreach (PortionEx port in para.Portions)
{
Response.Write("PlaceHolder Text = " + port.Text + "
");
}
}
}
else if (shp is AutoShapeEx)
{
AutoShapeEx ashp1 = (AutoShapeEx)shp;
if (ashp1.TextFrame != null)
{
TextFrameEx tf1 = ashp1.TextFrame;
foreach( ParagraphEx para1 in tf1.Paragraphs )
foreach (PortionEx port1 in para1.Portions)
{
Response.Write("TextBox Text = " + port1.Text + "
");
}
}
}
}
For Slide Comments in case of PPTX, an issue with issue id 12529 has been created on our Issue Tracking System for provision of this feature. This thread has been linked with the issue so that you can be updated here as soon as this feature is implemented.
Hope this will be helpful.
Thanks and Best Regards