Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, July 31, 2020 1:51:17 PM(UTC)

Steve R  
Steve R

Groups: Registered
Posts: 5

Thanks: 1 times

I'm attempting to convert HTML files to PDF in Java using LeadTools 20, and am receiving the following exception:

Exception in thread "main" leadtools.RasterException: The libltwebkitengine.so library is missing.

I have not had any issues converting other formats to PDF, and have verified that the file is present in the path that I've passed to the setInitialPath function. Does this file need to be placed elsewhere, or otherwise activated/loaded? Thanks!
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, July 31, 2020 2:47:44 PM(UTC)
Marcus Andra

Groups: Registered, Manager, Tech Support, Administrators
Posts: 107

Was thanked: 9 time(s) in 9 post(s)

Hi Steve,

The issue that you are experiencing should be that you are using the WebKit HTML engine, but the required dependencies needed to use this are not being found in your application. https://www.leadtools.co...co/codecshtmlengine.html

You can normally switch the HTML engine used by using the following code:
Code:
using (RasterCodecs codecs = new RasterCodecs()) 
   { 
      // Set the default HTML rendering engine to WebKit
      codecs.Options.Html.Load.HtmlEngine = CodecsHtmlEngine.WebKit; 

   using (RasterImage image = codecs.Load("file.html", 1)) 
      { 
         // Do something with image 
      } 
   }

https://www.leadtools.co...o/codecshtmloptions.html

I recommend that you stick with using the Webkit HTML engine as it usually provides better results. As you can see in our documentation, usage of the WebKit engine requires an external dependency which is found in the download we provide in the documentation. With this, you just need to ensure that you have the wkhtmltox.dll (Windows) or wkhtmltox.so (Linux) in the folder where your application is building to. For instance, if your application is pulling all the references it needs from a "Bin" folder, you'll just want to include the .so file or dll into that build directory.

Thanks,

Edited by user Friday, October 15, 2021 1:30:40 PM(UTC)  | Reason: update link

Marcus Andra
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.051 seconds.