Converting Docx with hyperlink to Password Protected PDF, hyperlink chopped and broken

Hi,

I have latest version aspose.word 22.6.0 and Im having issue converting from docx to PDF with password.

For example; the link (https://www.google.com/test/test1/test2) will endup becoming (https://www.goog/)

You can see my sample file below (PDF password = 1234)

test.docx (12.0 KB)

test.pdf (15.9 KB)

Below is the script that I developed.

 String encryptFile(String input,String output){

         com.aspose.words.License license = new com.aspose.words.License();
         license.setLicense("Aspose.Words.Java.lic");
 
 
         //ExStart: SimpleStringReplacement
         // Load a Word DOCX document by creating an instance of the Document class.
         Document doc = new Document( input + "test.docx");
         DocumentBuilder builder = new DocumentBuilder(doc);
 
         //Adding password to PDF
         PdfSaveOptions saveOptions = new PdfSaveOptions();
 
         // Create encryption details and set owner password.
         PdfEncryptionDetails encryptionDetails = new PdfEncryptionDetails("1234","");
 
         // Start by disallowing all permissions.
         encryptionDetails.setPermissions(PdfPermissions.DISALLOW_ALL);
 
         // Enable encryption via the "EncryptionDetails" property.
         saveOptions.setEncryptionDetails(encryptionDetails);
 
         String outputFilename = output + "/" + "test.pdf";
 
         // Save the result.
         doc.save(outputFilename,saveOptions);
         //ExEnd: SimpleStringReplacement
 
         return outputFilename;
     }

Kindly advice the best step to rectify this issue.

Thanks.

Nurhazwan Yusof

@Infobip_MY I was managed to reproduce your issue on my side. I have logged it as WORDSJAVA-2746 in our defect tracking system. We will keep you informed and let you know once it is resolved.

1 Like

Hello @Konstantin.Kornilov,

Do we have any updates or estimated dates for it to be resolved?

Thank you.

@Infobip_MY Unfortunately, the issue is not yet scheduled for development. It is currently in the queue for analysis. We will be sure to update you once the issue is resolved or we have more information for you.

1 Like