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

how to auto-render the height with a fixed width for any HTML document to capture them to an image? #66

Open
VISHNUVIKAS007 opened this issue Apr 28, 2021 · 1 comment

Comments

@VISHNUVIKAS007
Copy link

VISHNUVIKAS007 commented Apr 28, 2021

I am trying to convert an HTML file to an image in my application for printing purposes. All standard libraries that I have tried to generate images from HTML (For example, JavaFX Webview) expect both height and width as input parameters. We have HTML contents with varying heights. So we cannot predict the height beforehand.
Only the library FlyingSaucer needs width as a parameter while being able to render the height automatically based on content, but the library has an LGPL license and is therefore hard to mix with our proprietary code.
It would be really helpful if you could share some insights into how to auto-render the height with a fixed width for any HTML document to capture them to an image.

@anastaciocintra
Copy link
Owner

hi @VISHNUVIKAS007,

about height
Yes my friend, in my research, I've found only flyingSauer that can run on server (without GUI). Webview is good but, in my tests, it worked only with a Scene (GUI environment) with heght and width...

I didn't test paid products.

about LGPL:

I'm not a lawyer, and I don't know exactly whats your projects guidelines about licenses, but LGPL libraries can be used without problems on commercial product, you need only to use it as a lib (jar) in classpath. see https://www.quora.com/Is-LGPL-free-for-commercial-use

IMHO Its better you to ask directly on https://github.com/flyingsaucerproject/flyingsaucer

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

2 participants