Free Support Forum - aspose.com

Bug changing link path in OneNote file

Environment:

  • Windows 10 x64
  • Visual Studio 2017 (Writing a 32-bit application)
  • Aspose.Note version 18.12, and version 19.9

When changing a link path using:

foreach (var textStyle in richText.Styles.Where(s => s.IsHyperlink))
{
...
richText.Text = @"http://opentext.myOpenText.com/otcs/livelink.exe/open/115522";
}

The link path is truncated. Some of the characters at the end of the link are not included in the link.

This bug is therefore corrupting links our customer files.

Here is a test file with links.
To reproduce this bug, use the code above to change the links in this sample OneNote file.
LinksTest.zip (21.0 KB)

@JohnGrahamLT,
Could you please share a runnable complete console application which can be used to recreate the scenario here? It will help us to observe the problem and provide assistance accordingly.

Here is a Visual Studio 2017 project that demonstrates your bug that creates corrupted links in our customer files:
AsposeOneNote.zip (6.9 MB)

After you run the code, open and examine the links in the OneNote file.

@JohnGrahamLT,
We are working in this issue and need more information. Please send us the images of both the files (original file and the output file created with this code) while opened in OneNote at your end. We want to see the images of links while opened in OneNote. Also share which version of OneNote is used at your end for testing.

@JohnGrahamLT,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as
NOTENET-2958 – Link paths are truncated while changing the links

@JohnGrahamLT,
We have investigated the issue and made a couple of changes to the your sample. We think it is clear now how you can accomplish this task.
Please, review new sample and let us know your feedback. notenet2958.zip (3.4 MB)