jungjiwon / java-html2image

Automatically exported from code.google.com/p/java-html2image
0 stars 0 forks source link

Image rendering of HTML is incorrect #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Call HtmlImageGenerator.loadUrl(String) and input a website
2. Call HtmlImageGenerator.saveAsImage(File)
3. View image output

What is the expected output? What do you see instead?

Expect to see the same as any browser's rendering. Instead the rendering is 
quite bad. For example: google.com, yahoo.com, ebay.com.

What version of the product are you using? On what operating system?

html2image-0.9.jar with JDK 1.5

Please provide any additional information below.

I was really hoping this would be a solution to my problem, as I wish to 
generate thumbnails for user generated HTML pages without creating a child 
process on my server. Thank you anyways for the work!

Original issue reported on code.google.com by matt....@gmail.com on 9 Mar 2012 at 9:32

GoogleCodeExporter commented 8 years ago
you can reproduce the issue:
1. Save below code to an html file and notice the format
<div id='imageSection' style='overflow: hidden; position: relative; 
border-style: solid; border-color: gray; border-width: 1px; width:800px; 
height:600px'><div style='position: absolute; left: -754px; top: -1544px; 
'><img src='http://www.football-pictures.net/data/media/323/Celtic_Park_HD.jpg' 
class='clickable' style='width: 3350px; height: 2516px; '></div></div>

2. Load/Save it with:

        imageGenerator.loadHtml("<div id='imageSection' style='overflow: hidden; position: relative; border-style: solid; border-color: gray; border-width: 1px; width:800px; height:600px'><div style='position: absolute; left: -754px; top: -1544px; '><img src='http://www.football-pictures.net/data/media/323/Celtic_Park_HD.jpg' class='clickable' style='width: 3350px; height: 2516px; '></div>");

3. The output is quit different

Regards

Original comment by armando....@gmail.com on 4 May 2012 at 5:39