Free Support Forum - aspose.com

Aspose.Words for Java 11.9.0: still bug in PDF hyperlinks with greek letters (WORDSNET-5933)

Hi,
you sent me information that the bug is fixed in 11.9.0, but it still persists:
WORDSNET-5933 File name in hyperlink URL gets corrupted when exporting to PDF

See following code creating a PDF document with a hyperlink to an external document which has a greek name (τεστ.pdf):



Document document = new Document();
DocumentBuilder builder = new DocumentBuilder(document);
builder.insertHyperlink(“Test”, “D:\Data\Customers\\u03c4\u03b5\u03c3\u03c4.pdf”, false); //“Test” in greek letters

document.updatePageLayout(); //??


document.save(File.createTempFile(“greek-hyperlink-result”, “.doc”).getAbsolutePath(), com.aspose.words.SaveFormat.DOC); //ok
document.save(File.createTempFile(“greek-hyperlink-result”, “.docx”).getAbsolutePath(), com.aspose.words.SaveFormat.DOCX); //ok
document.save(File.createTempFile(“greek-hyperlink-result”, “.pdf”).getAbsolutePath(), SaveFormat.PDF); //still broken

Thanks for your support,

Torsten

Hi Torsten,

Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSJAVA-649 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We are really very sorry for your inconvenience.

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


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

Sorry, but the bug is not fixed in Aspose-words for java 11.10.0.

Hi Torsten,


Thanks for your inquiry. While using the latest version of Aspose.Words for Java i.e. v11.10.0 and the following code, I was unable to reproduce this issue on my side. I have attached the Pdf file (out.pdf) i.e. generated on my side here for your reference:
Document document = new Document();
DocumentBuilder builder = new DocumentBuilder(document);
builder.insertHyperlink(“Test”, “D:\Data\Customers\\u03c4\u03b5\u03c3\u03c4.pdf”, false); //“Test” in greek letters document.updatePageLayout(); //??
document.save(“C:\Temp\out.doc”, com.aspose.words.SaveFormat.DOC); //ok
document.save(“C:\Temp\out.docx”, com.aspose.words.SaveFormat.DOCX); //ok
document.save(“C:\Temp\out.pdf”, SaveFormat.PDF); //still broken
Please make sure if you’re referencing the latest Aspose.Words’ library in your project.

Best regards,

Hi,

in the created document it looks pretty&correct, but by clicking the hyperlink the referenced document does not open. Please see attached dialog (sorry, it’s in German due to my German Windows7): the special characters are encoded (which seems correct) but the file is not found although it’s stored at the specified place. So I think there’s still something wrong with the link inside the PDF document.



BR, Torsten

Hi Torsten,


Thanks for sharing the details. Please note that Aspose.Words tries to mimic the same behavior as MS Word do. If you insert the same link in MS Word document and convert that document to PDF by using MS Word, you will get the same behavior. I have attached the output PDF file with this post generated with MS Word.

Hope this answers your query. Please let me know if you have any more queries.

Hi Tahir,
thanks for your quick help. In this case this seems to be a bug in Adobe reader and your PDF output is correct.
I really appreciate using aspose.words, which is a great product.

BR,
Torsten

Hi Torsten,


Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.