HTML to PDF Generation - UnsatisfiedLinkError-Unable to load library error | Community
Skip to main content
srikanthp689160
Level 4
November 19, 2020
Solved

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

  • November 19, 2020
  • 2 replies
  • 6358 views

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>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ankur_Khare

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

2 replies

Anudeep_Garnepudi
Community Advisor
Community Advisor
November 19, 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

srikanthp689160
Level 4
November 20, 2020
@anudeep_garnepudi, i could not understand how to check if dependency packages are installed? Is it on AEM instance? or Linux?
Ankur_Khare
Community Advisor
Ankur_KhareCommunity AdvisorAccepted solution
Community Advisor
November 20, 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

srikanthp689160
Level 4
November 20, 2020
@ankur_khare, locahost is on Java 8 where as QA and Pre-Prod are on Java 11.