Please always share SSCCE code for efficiency purposes. We have used below code and extracted result is almost similar to what it appears when checked with Adobe Acrobat. We have attached a comparison screenshot for your kind reference. Comparison.PNG
//open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(@"D:\AsposeFiles\Aspose.Bugs.PDF.Encoding\Aspose.Bugs\bin\Debug\1.pdf");
foreach (Aspose.Pdf.Page objPage in pdfDocument.Pages)
{
foreach (Aspose.Pdf.Annotations.Annotation objAnnotation in objPage.Annotations)
{
if (objAnnotation is Aspose.Pdf.Annotations.LinkAnnotation)
{
Aspose.Pdf.Annotations.LinkAnnotation objLinkAnnotation;
objLinkAnnotation = (Aspose.Pdf.Annotations.LinkAnnotation)objAnnotation;
if ((objLinkAnnotation.Action != null && objLinkAnnotation.Action.GetType() == typeof(Aspose.Pdf.Annotations.GoToURIAction)))
{
Aspose.Pdf.Annotations.GoToURIAction objURIAction;
objURIAction = (Aspose.Pdf.Annotations.GoToURIAction)objLinkAnnotation.Action;
string Address = objURIAction.URI.ToString();
if (Address == null)
Address = "n.a";
Console.WriteLine(Address);
}
}
}
}
You cannot say we are returning almost similar it is either the same or it is not.
If this is a bug fix would be needed or if you say that you are reading encoding differently then question is what are options to set in Aspose.PDF so that encoding is properly interpreted.
About SSCCE, we had hyperlinked the text for your kind reference. About the issue of encoding, we have also tried HttpUtility.HtmlDecode method but the problem persists. Therefore, a ticket with ID PDFNET-46738 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.
We really understand your concerns and realize the significance of this issue. Please note that not every encoding issue is caused by same reasons as scenarios vary PDF to PDF. We have recorded your comprehensions and have escalated it internally. We will be trying to schedule it soon and will share our findings with you. Please spare us some time.