zhangjingren / java-html2image

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

The formatting in the HTML is not preserved #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadUrl("http://www.google.co.uk");
imageGenerator.saveAsImage("hello-world.png");

What is the expected output? What do you see instead?
The formatting is not correct at all, and the elements on google's start page 
are not where they should be. I have tried with a few web pages but none works 
as expected. 

What version of the product are you using? On what operating system?
0.9, Mac OS.

Please provide any additional information below.
There is also quite a few web pages where the tool throws an Exception (e.g. 
java.lang.RuntimeException: Unclosed "  )  Not sure why? If there is a problem 
with the HTML, it would be good if it could print the line number and 
information about what is wrong.

Original issue reported on code.google.com by tomas.s....@gmail.com on 12 Feb 2011 at 9:58

GoogleCodeExporter commented 8 years ago
Will it be fixed?
I would like to use some background images too.

Original comment by johngou...@gmail.com on 10 Mar 2012 at 3:42

GoogleCodeExporter commented 8 years ago
yes... it is not picking up the styling properly... i have added a few styles 
within the header + a few are defined with tags... I am creating a table... and 
need to do border-collapse: collapse but thats not working at all. there are 
other styling issues as well

Original comment by peyushg...@gmail.com on 24 May 2012 at 6:45

GoogleCodeExporter commented 8 years ago
Use a complete url in your css to get the background images working, don't try 
using relative paths.

Original comment by agonzarg...@gmail.com on 24 Jul 2013 at 4:06