Group: Forum Members
Last Active: 8 Years Ago
Posts: 3,
Visits: 6
|
How do you iterate/find all images in a document? I want to find and delete them...
I need to find all hyperlinks inside the document. I need to get the URL from each hyperlink.
How is this done?
|
Group: Forum Members
Last Active: 5 hours ago
Posts: 3,054,
Visits: 4,009
|
Hi Clint,
The following code collects all images found in a text document: NList<NNode> imageInlines = richTextView.Content.GetDescendants(NImageInline.NImageInline); similarly for hyperlinks the code is: NList<NNode> hyperlinkInlines = richTextView.Content.GetDescendants(NHyperlink.NHyperlinkSchema);
Regarding the hyperlink url: NHyperlinkInline hyperlinkInline = (NHyperlinkInline)hyperlinks[0]; string url = (hyperlinkInline.Hyperlink as NUrlHyperlink).Url;
Hope this helps - let us know if you meet any problems.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 8 Years Ago
Posts: 3,
Visits: 6
|
Thanks.
|