After rendering MS Word document that contains headerfooter with child nodes, as pararagraphs and runs, the LayoutEntity objects, as Spans and Lines that represent paragraph, dont have parent node. Is it a bug?
I take yours code on link:
and use the method GetLayoutEntitiesOfNode.
public LayoutCollection GetLayoutEntitiesOfNode(Node node)
{
if (!mLayoutCollector.Document.Equals(node.Document))
throw new ArgumentException("Node does not belong to the same document which was rendered.");
if (node.NodeType == NodeType.Document)
return new LayoutCollection(mChildEntities);
List entities = new List();
// Retrieve all entities from the layout document (inversion of LayoutEntityType.None).
foreach (LayoutEntity entity in GetChildEntities(~LayoutEntityType.None, true))
{
if (entity.ParentNode == node)
entities.Add(entity);
// There is no table entity in rendered output so manually check if rows belong to a table node.
if (entity.Type == LayoutEntityType.Row)
{
RenderedRow row = (RenderedRow)entity;
if (row.Table == node)