Unable to Convert image hyperlink from word to PDF

hi Aspose,
i have added hyperlink for image in word document and i am converting from word to pdf,where i am unable to find hyperlink for image.

please reslove this issue

@somasekhar.pyla,

Please ZIP and upload your input Word document and Aspose.Words generated PDF file showing the undesired behavior here for testing. We will investigate the issue on our end and provide you more information.

Files.zip (121.6 KB)

hi ,
added hyperlink for customer portal image which is at bottom of document.

@somasekhar.pyla,

The problem does not occur when using the latest version of Aspose.Words for Java i.e. 18.4 (see awjava-18.4.pdf (143.6 KB)). So, we suggest you please upgrade to the latest version. Please see following article:

Installing Aspose.Words for Java from Maven Repository

Need to change any code related to above one.

i am using it
document.save(stream, format);

@somasekhar.pyla,

Your existing code should work with latest version of Aspose.Words for Java i.e. 18.4.

Please let us know if you have any troubles migrating to latest version and we will be glad to look into this further for you.

i am using version 17.4 version…

so can i convert in this version…by adding any other code in java

@somasekhar.pyla,

The “document(13).pdf” file you shared previously was actually generated by using Aspose.Words for Java 13.3. However, you may try 17.4 version to see how it goes on your end.

Also, please note that unfortunately, we would not be able to provide support for this 17.4 version in case you might encounter any problems. We provide support for the latest version of Aspose.Words only and encourage you to use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to the issues that were reported in earlier versions of Aspose.Words. So, we would suggest you please upgrade to the latest version of Aspose.Words for Java (18.4).

i have generated with java 18.4 version where i unable to convert hyperlink…
so can i have sample code how to convert.

@somasekhar.pyla,

Please ZIP and attach Aspose.Words 18.4 generated output PDF file showing the undesired behavior here for testing.

Please use the code from following article to convert Word document to PDF format.

Convert Microsoft Word document to PDF

document.pdf.zip (78.1 KB)

here i am converting word document into ByteArrayOutputStream.i am converting in centos system.

                    PdfSaveOptions opts = new PdfSaveOptions();
		opts.setExportCustomPropertiesAsMetadata(true);
		opts.setOpenHyperlinksInNewWindow(true);
		opts.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);

		document.updateFields();
		document.updatePageLayout();
		
		document.save(stream, opts);

@somasekhar.pyla,

I am afraid, this .pdf file you shared is actually generated by using Aspose.Words for Java 13.3. Please double check that you are referencing the correct JAR in your project. Please refer to the following article:

Installing Aspose.Words for Java from Maven Repository

did i need to change code ,when converting word document into byteArrayOutputstream

@somasekhar.pyla,

Yes, the PdfSaveOptions.ExportCustomPropertiesAsMetadata property is now obsolete. Please use PdfSaveOptions.CustomPropertiesExport property instead. Here is the new code (see output awjava-18.4-options.zip (140.8 KB)):

Document doc = new Document("D:\\Temp\\Files\\ProvisionalCertificate.docx");

PdfSaveOptions opts = new PdfSaveOptions();
opts.setCustomPropertiesExport(PdfCustomPropertiesExport.METADATA);
opts.setOpenHyperlinksInNewWindow(true);
opts.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);

doc.updateFields();
doc.updatePageLayout();

doc.save("D:\\Temp\\Files\\awjava-18.4-options.pdf", opts);

i have converted and unable to convert .
Sample2.pdf (82.2 KB)

<repositories>
<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://artifact.aspose.com/repo/</url>
</repository>
com.aspose aspose-words 18.4 jdk16 com.aspose aspose-words 18.4 javadoc

the above was added in pom…where still i am unable to convert.

@somasekhar.pyla,

We have just released a new version of Aspose.Words for Java i.e. 18.5. Please try the following POM file. Hope, this helps.

pom.zip (503 Bytes)

i have used above 18.5 still i am unable to convert.

output file:
Output44.pdf (82.2 KB)

please add related code also.

i am using below code

PdfSaveOptions opts = new PdfSaveOptions();
opts.setExportCustomPropertiesAsMetadata(true);
opts.setOpenHyperlinksInNewWindow(true);
opts.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);

document.updateFields();
document.updatePageLayout();

document.save("/home/somasekhar.p/Output44.pdf",opts);

@somasekhar.pyla,

This PDF was again generated by a very old version of Aspose.Words for Java i.e. 13.3.

To verify, please open your latest PDF with Adobe Acrobat Reader. Go to File > Properties and see under “Advanced” section the value of “PDF Producer” is Aspose.Words for Java i.e. 13.3 (see screenshot).

cost of licence for 18.5

@somasekhar.pyla,

For licensing questions or to renew your license, please contact our sales team.