Hi,
When i was using Generator approach i used to create a separate list where i use to save the pages i have created. After creating multiple pages i usually clears the pdf and then again add the pages from my own list. Following is the code snippet.
// Compose sections into single document
Document.Sections.Clear();
foreach (var section in Pages.Values.SelectMany(sectionList => sectionList))
{
Document.Pages.Add(section);
}
Document.Save(memoryStream);
// Where Pages is Dictionary<int, List> Pages;
How i can achieve same in DOM approach.
As there is no clear for PageCollection and if I delete then content is also deleted.
Regards,
Sandeep