Hi, When building a Document, I set the Tag and Comment properties of paragraphs like this:
myParagraph01.Tag = "Para01"; myParagraph01.Comment = "Para01"; myParagraph02.Tag = "Para02"; myParagraph02.Comment = "Para02";
Then I send the Document to the viewer like this:
string ddl = DdlWriter.WriteToString(myDocument); myDocumentPreview.Ddl = ddl;
which works fine.
Now I would like to get the tag values, but I cant seem to get them:
DocumentRenderer renderer = this.myDocumentPreview.Renderer; DocumentObject[] documentObjects = renderer.GetDocumentObjectsFromPage(1); // Get all page 1 DOM elements MigraDoc.DocumentObjectModel.Paragraph p = (MigraDoc.DocumentObjectModel.Paragraph)documentObjects[0];
It seems to 'see' the single paragraph I have added to the single Section, but not the Tag or Comment properties as they are empty.
How can I achieve this? Thanks, Brad.
|