Best Java library for programmatically converting HTML page to image / PDF

I am looking for the best Java library that I can pass in a URL and create an image of how a web page looks like in a browser. I tried flyingsaucer , however it seems that almost every web page breaks it - it doesn’t even do www.google.com or yahoo.com - the only site I could display is www.w3c.org!

Thoughts on a better tool to use or perhaps let the flying saucer be weaker in xhtml, accept?

+3
source share
3 answers

Flying Saucer fails on many pages as it only allows xhtml (see manual).

html libs "" , FS.

Webesite β†’ "Cleaner" β†’ Flying Saucer

:

+5

html:

URL- java. .

PDF:

Spring, AbstractPdfView iText api. - . , .

:

: http://code.google.com/p/java-html2image/

:

read html at url β†’ convert it via iText or java-html2image. I highly recommend that you do this yourself and not leave it in a specific library.

0
source

All Articles