Hello,
I am reading a one note file and trying to fetch the link present in a paragraph. I use textstyles to get the content like linkaddress, linktext etc. However I see that some links spans across more than one style. Attaching is a file that 3 paragraphs. the second paragraph has a link. I grab the richtext and then see that there are 3 textstyles, first one is the text and second is the partial link and the third one is the remaining link.
Please let me know how to resolve this issue.
thanks.Issue.zip (63.0 KB)
Issue.zip (63.0 KB)
@Amruthav,
You may share your runnable console application which can be used to reproduce the issue here. We will analyze the scenario using the sample code and provide our feedback accordingly.
Hello,
Attaching the console appHyperLinkIssue.zip (503.8 KB)
Please add a “Aspose.Total.lic” as embeded resource to the project.
The console output would look something like attached.
image-20201028-123745.png (9.6 KB)
Thanks,
Subhash
@Amruthav,
It seems that the “MultipleLinks-Temp.one” is not available along with the sample project. Please share the sample file for our testing.
@Amruthav,
We have observed the issue and logged in our database for further investigation and a fix if possible. You will be notified once any update is ready for sharing.
This issue is logged as:
NOTENET-3198 - A link spans across multiple styles
@Amruthav,
We have investigated the issue.
Its ok that the link can span across a few text styles. I attached the file (sample.one) with the link spanning across text written by underlined Arial, bold Calibri and italic Cambria fonts.
In this case the first style contains value of hyperlink in property TextStyle.HyperlinkAddress.
All text styles related to hyperlink are placed one by one in a row and have HyperlinkAddress.IsHyperlink property set to true.
sample.zip (15.3 KB)