Hyperlink does not work when it is inserted into document with unicode characters using Java

Hi,
if I try to create hyperlinks in my output document (PDF format) which contain non-US-ASCII character, for example greek letters as in the example below, the hyperlink does not work when clicked in the document. Even when I try to quote the greek character using “file:/C:/user1/Desktop/” + URLEncoder.encode(“τεστ.pdf”, “UTF-8”) the link is still not usable.

Example:

DocumentBuilder.insertHyperlink(“Test”, “file:/C:/user1/Desktop/τεστ.pdf”, false);

Is there a workaround? Will this bug be fixed in the release end of February?

Thanks & BR,
Torsten

Hi Torsten,

Thanks for your query. I have tested the scenario and have not found any issue with insertHyperlink method. Please use the latest version of Aspose.Words for Java 11.0.0. I have used the following code snippet for shared scenario. I have also attached the PDF and output document with this post.

Let us know, If you have any more queries.

// Create source

Document sourceDocument = new Document();

DocumentBuilder builder = new DocumentBuilder(sourceDocument);

builder.insertHyperlink("Test", "D:\\Data\\Customers\\τεστ.pdf", false);

sourceDocument.save("D:\\Data\\Customers\\Out.docx", SaveFormat.DOCX);

Hi,
I have tried exactly the same using Aspose.words 11.0.0 for Java (you can check in the attached PDF’s properties) but with the same error as described above (see att: doc/docx/pdf).

BR,
Torsten

Hi Torsten,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 11.0.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved.

Sorry for inconvenience.

Best Regards,

The issues you have found earlier (filed as WORDSNET-5933) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.