Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide statically linked libwkhtmltox.so #30

Open
krzemin opened this issue Jul 22, 2019 · 3 comments
Open

Provide statically linked libwkhtmltox.so #30

krzemin opened this issue Jul 22, 2019 · 3 comments

Comments

@krzemin
Copy link

krzemin commented Jul 22, 2019

Hi, thanks for creating this wrapper. I like simplicity of the API. It solved my problem today when developing locally.

But when I tried to run the same code in docker, I encountered the same dependency related problems as in #29 and #23.

Suggestion in https://github.com/wooio/htmltopdf-java#troubleshooting section doesn't really help much, because .so library packed in the jar requires specific versions of the libjpeg, libpng, libssl. It will always be hard to find correct versions of these
so that library can be loaded.

A different approach may work instead: to provide statically linked libwkhtmltox.so so it doesn't require any system dependencies. It will increase jar size and memory footprint, but at least your library would be usable.

@benbarkay
Copy link
Contributor

benbarkay commented Jul 23, 2019

That's not a bad idea, though I'm thinking now that maybe it's a mistake to include the native library in the releases altogether, and that instead we should use whatever is installed in the user's system, or allow the user to provide a local shared library.

If you'd like, you can make a pull request with updated shared libraries (they're kept right there in the repo) and if it all works, I'll make a release.

@krzemin
Copy link
Author

krzemin commented Jul 23, 2019

It would be best for users if they can choose between:

  • library installed in the system
  • statically linked library

I think it's mistake to include shared library as the versions of specific library dependencies changes so quickly that's impossible to keep them up in the longer term.

Because of the expected size of the statically linked lib, maybe it would be better actually to provide separate mvn artifact for it (io.woo:htmltopdf-static-libs:1.x.x)?

@lehphyro
Copy link

lehphyro commented Mar 27, 2020

Are you planning to implement this? That would be really helpful! I'd do it myself if I knew how, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants