We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

HTML Hyperlink Anchor in Hidden Content is not Clickable when Inserting in Word Document using Aspose.Words for Java

@bekal94,

Please try the latest (21.6) version of Aspose.Words for Java. It should work in your OpenJDK 8 282u environment. However, we currently do not provide a JAR which is specially compiled for OpenJDK 282u.

Hi Awais,
Thanks for the latest version we are still testing the same, Meanwhile is it possible to please provide the source code or the code changes made to handle the wordsnet-21612 issue?

@bekal94,

Please see this output Word DOCX document (awjava-21.6.docx (7.6 KB)) which was produced on my end by using the following code of Aspose.Words for Java 21.6:

com.aspose.words.Document docWordAspose = new com.aspose.words.Document();
// Document builder for Aspose doc
com.aspose.words.DocumentBuilder builder = new com.aspose.words.DocumentBuilder(docWordAspose);
String strContentData = "<style>div> :first-child {display: inline}</style><div hidden style='border-style: solid;border-width: 1px;font-family:Times New Roman;font-size:11.0pt;font-weight:bold;'>RATIONALE: <p>This is content in the Rational, <a contenteditable=\"false\" href=\"https://sngfvm1df007.ap.xom.com/3dspace/xomgpt/xomGPTStdRefURLRedirector.jsp?id=569D1223000056905EF2FF6C00000209\" stdid=\"569D1223000056905EF2FF6C00000209\" stdref=\"Required References\" stdvalue=\"GOST 19281-89\" target=\"_blank\">GOST 19281-89</a> Same hyperlink is attached here.</p></div>\r\n" +
        "<style>div> :first-child {display: inline}</style><div hidden style='border-style: solid;border-width: 1px;font-family:Times New Roman;font-size:11.0pt;font-weight:bold;'>Note:<p>This is content in the Notes, <a contenteditable=\"false\" href=\"https://sngfvm1df007.ap.xom.com/3dspace/xomgpt/xomGPTStdRefURLRedirector.jsp?id=569D1223000056905EF2FF6C00000209\" stdid=\"569D1223000056905EF2FF6C00000209\" stdref=\"Required References\" stdvalue=\"GOST 19281-89\" target=\"_blank\">GOST 19281-89</a> Same hyperlink is attached here.</p>\r\n";
try {
    builder.insertHtml(strContentData);
} catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
docWordAspose.save("C:\\Temp\\Information_Repo\\awjava-21.6.docx");

Hi Awais,

While testing the JAR provided (v21.5 and 21.6) we are getting error as there is probably a mismatch in the Tomee service we are using.
Tomcat 8.5.20 / Tomee 7.0.4
ASM library version 6 (xbean-asm5-shaded-4.5)

Keeping this in mind, wanted to seek your help to understand a few questions. It would be extremely helpful if you have any answers around this.

  1. Which version of java was used for compiling this code (jar 21.5)?
  2. Which version of tomee/tomcat is supported by this jar?
  3. If there is a way to provide us jar compatible to our external tomee version.

Thanks in Advance

@bekal94,

We are working on your query and will get back to you soon.

@bekal94,

We are using Java 6 to compile jdk16 jar and Java 7 to compile jdk17. Apache should support both of them. Also, please note that the jdk17 jar passes all of our unit tests under Java 8 JRE before publishing every release.

As we understand, you are not seeing any errors with our jdk17 jar; but just observing some sort of warnings reported by your QA department. I am afraid, it is not possible for us to provide too many separate jars for jdk5, jdk6, jdk7, jdk8 and other jdk libraries which are still used by industry.

HI Awais,

This JAR is still not working in our environment, would like to know if I can get a Java 8 compiled JAR.
Or is it possible to reopen this issue and look into it more.

Thanks

@bekal94 Could you please provide the error details you see in your QA environment? We will pass this information to our Java developer and provide you more information.

Please find the attached logs from one of our servers, asposeerrorlogs.zip (3.3 KB)
The error is that our Tomee component is not starting due to some mismatch in the Java compiled version.

@bekal94 I do not see any errors caused by Aspose.Words in the log you provided. Probably you could create a sample application and recreate a minimal environment required to reproduce the problem using Docker. Then we will be able to properly analyze the issue.

Hi Alexey,

I do not think it is possible to create a sample environment because out application uses a large number of jars,
However could you provide me your latest jar compiled for Java 8 or at least closest to Java 8 like how it was provided earlier in the same thread?

We are using the Java OpenJDK 8 282u.

@bekal94 Unfortunately, we do not provide custom builds of our products. We are sure the jar provided in the official release is compatible with Java 7 and later including Java 8. Also it is difficult to analyze the problem without ability to reproduce it on our side.

Hi Alexey,

I understand, thanks, but just as a request Awais had provided a (JDK1.6 only) package for Java 6 or older version. (Please refer the conversation below):

I would like to know if it is possible to provide the same jar for compile for JDK 1.6 only?

@bekal94 Please find the Aspose.Words for Java 21.11 (JDK 1.6 only). Such build is compiled for each version of Aspose.Words, you can find all of them here.