Hi.
I need som code help for removing some specific paragraphs.
I attatched a Document for you to help clarify what i mean.
At page four and five i got some unwanted paragraphs at the top of the page(just below the header).
Is there any way to get rid of theese because they are destroying my layout?
I have tried :
foreach (Section srcSection in doc.Sections)
{
// loop through all block level nodes (paragraphs and tables) in the body of the section.
foreach (Node srcNode in srcSection.Body)
{
// remove node if it is the last empty paragarph in the section.
Paragraph para = srcNode as Paragraph;
if ((para != null) && para.IsEndOfSection && !para.HasChildNodes)
{
para.Remove();
brepeat = true;
}
}
}
This doesnt work for me. it seems theese paragraph still got som childnodes or something.
Regaards
/Joel