Hi,
I need to update some old code using v6.5 to work with your latest version of the api…
Below is part of a loop that splits one pptx into several single slide pptxs.
I’ve got to this point (see below) but not sure what AddNotes() or any of the subsequent methods are supposed to be now… checked the examples on github, no idea.
dstSld = dstSlds.AddClone(srcPres.Slides(i))
'lost from here onward
dstSld.AddNotes()
dstSld.Notes.Paragraphs.Clear()
Dim srcSld As Slide
srcSld = srcPres.GetSlideByPosition(i)
If Not srcSld.Notes Is Nothing Then
For Each srcPara As Paragraph In srcSld.Notes.Paragraphs
'If Not srcPara Is Nothing Then
Dim dstPara As Paragraph
dstPara = New Paragraph(srcPara)
dstSld.Notes.Paragraphs.Add(dstPara)
'End If
Next
End If
Dim emptyslide As Slide = targetPres.GetSlideByPosition(1)
targetPres.Slides.Remove(emptyslide)
Hi,
Thank you for your interest in Aspose.Slides.
I have observed your requirements and have worked over them. I would like to request you to please try using following sample code on your end to serve the purpose.
Dim Srcpres As New Presentation(“D:\Split\TestPresentation.pptx”)Dim target As New Presentation()
Dim n As Integer = Srcpres.Slides.Count()For i As Integer = 0 To n - 1target.SlideSize.Type = Srcpres.SlideSize.Typetarget.SlideSize.Size = Srcpres.SlideSize.SizeDim slide As ISlide = Srcpres.Slides(i)target.Slides.AddClone(slide)target.Slides.RemoveAt(0)target.Save(“D:\Split\Page” + i + “.pptx”, Aspose.Slides.Export.SaveFormat.Pptx)Next
I hope this will be helpful. Please share if I may help you further in this regard.
Best Regards,
Hi, are you saying that it copies the notes as well?
Hi,
Dim Srcpres As New Presentation("D:\Split\TestPresentation.pptx")Dim target As New Presentation()Dim n As Integer = Srcpres.Slides.Count()For i As Integer = 0 To n - 1target.SlideSize.Type = Srcpres.SlideSize.Typetarget.SlideSize.Size = Srcpres.SlideSize.SizeDim slide As ISlide = Srcpres.Slides(i)TryIf slide.NotesSlide.NotesTextFrame.Text.Length <> 0 Thentarget.Slides(i).NotesSlide.NotesTextFrame.Text = Srcpres.Slides(i).NotesSlide.NotesTextFrame.TextEnd IfCatchEnd Trytarget.Slides.AddClone(slide)target.Slides.RemoveAt(0)target.Save("D:\Split\PageNumber" + i + ".pptx", Aspose.Slides.Export.SaveFormat.Pptx)Next
I hope this will be helpful. Please share if I may help you further in this regard.
Best Regards,