HTML to PDF Generation - UnsatisfiedLinkError-Unable to load library error

Avatar

Avatar

srikanthp689160

Avatar

srikanthp689160

srikanthp689160

19-11-2020

Hi,

We are using third party library(io.woo.htmltopdf) library to generate PDF out of AEM web page which works fine in localhost publish instance(on windows machine) but in QA or Pre-Prod environments which are on linux box, we see below error

java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: Unable to load library '/tmp/io.woo.htmltopdf/wkhtmltox/0.12.5/libwkhtmltox.so': Native library (tmp/io.woo.htmltopdf/wkhtmltox/0.12.5/libwkhtmltox.so) not found in resource path (crx-quickstart/app/cq-quickstart-6.5.0-standalone-quickstart.jar)

Can anyone let us know how this issue can be fixed?

We have added below dependencies to the maven project

<dependency>
<groupId>io.woo</groupId>
<artifactId>htmltopdf</artifactId>
<version>1.0.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.2</version>
</dependency>

library PDF

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Ankur_Khare

MVP

Avatar

Ankur_Khare

MVP

Ankur_Khare
MVP

19-11-2020

Could you pls confirm if you are using the same java version on local and other environments?

 

try to use the same java version in ur local and see

Answers (1)

Answers (1)

Avatar

Avatar

Anudeep_Garnepudi

Avatar

Anudeep_Garnepudi

Anudeep_Garnepudi

19-11-2020

Hi @srikanthp689160 

Check the below link and try adding the native dependencies.

https://github.com/wooio/htmltopdf-java/blob/master/README.md#troubleshooting

Hope this will resolve your issue.

AG