lijingrong / java-html2image Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/java-html2image
Automatically exported from code.google.com/p/java-html2image
What steps will reproduce the problem?
1. tried to convert html code with image
2.
3.
What is the expected output? What do you see instead?
I expected the image in the created image by java-html2image.
I saw nothing in the image potion of html in created image
What version of the product are you using? On what operating system?
0.9,windows
Please provide any additional information below.
is there anyway to convert image too.
?
Original issue reported on code.google.com by [email protected]
on 21 May 2011 at 11:07
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 [email protected]
on 12 Feb 2011 at 9:58
Hi,
I can see that there are no commit since 2010, no closed defect.
Is this project dead ? Is there any alternative/fork ? vI can't find it on the
internet
thanks
Original issue reported on code.google.com by [email protected]
on 12 Jun 2014 at 1:01
What steps will reproduce the problem?
1. As long as Chinese characters present in html text
2.
3.
What is the expected output?
Chinese characters in image as Chinese characters in html text
What do you see instead?
Illegal characters
What version of the product are you using?
version 0.9
On what operating system?
CentOS
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Jun 2012 at 6:31
What steps will reproduce the problem?
1. create a servlet on tomcat and a servlet use htmlimagegenerator
2. use html as below:
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadHtml(html);
return imageGenerator.getBufferedImage();
3. the image generated has not utf 8 chars but contains [][][][] instead of
arabic chars
What is the expected output?
arabic chars
What do you see instead?
[][][][][]
i think depends on tomcat setting, but i set tomcat to manage utf8
and as well request and response servlet are utf 8 set as follows:
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
What version of the product are you using? 0.9 version
On what operating system? unix
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 6 Aug 2014 at 7:07
What steps will reproduce the problem?
Run this code:
public static void main(String[] args) {
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadHtml("<table border='1' style='border-collapse:collapse'><tr><td>aaa</td><td>bbb</td></tr><tr><td>aaa</td><td>bbb</td></tr></table>");
imageGenerator.saveAsImage("hello-world.png");
}
What is the expected output? What do you see instead?
The image with table with border-collapse correct
What version of the product are you using? On what operating system?
html2image-0.9.jar
Windows seven
Please provide any additional information below.
I need this urgently : )
Original issue reported on code.google.com by [email protected]
on 28 Nov 2012 at 4:42
Would be nice to have here information which version of Java is required, so
that you don't need to test it.
Original issue reported on code.google.com by [email protected]
on 26 Aug 2013 at 7:02
Hi,
it seems your Maven is down.
Could you please activate this again?
Thanks!
Original issue reported on code.google.com by tschechniker
on 26 Oct 2012 at 9:40
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 31 Jan 2015 at 1:21
What steps will reproduce the problem?
1. we have <img src=""> in html
2. convert the html to image using html2image jar ver 0.9 api
3.
What is the expected output? What do you see instead?
for some pdfs it renders the photo properly whereas for a few image is not
rendered at all.
What version of the product are you using? On what operating system?
ver 0.9
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 10 Jul 2013 at 7:34
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 [email protected]
on 9 Mar 2012 at 9:32
Hi,
it seems, that this project is a little bit orphaned, so some dependencies of
HTML2Image changed during the last 5 years.
So maybe you could replace the pom.xml with the one I've uploaded.
Despite of the fact that the springframework is now found at a different
location in central maven repository I replaced
org.xhtmlrenderer/core-renderer-library by flyingsaucer-core that delivers some
improvements and bugfixes(e.g. rendering tables).
What do you think about?
Original issue reported on code.google.com by [email protected]
on 2 Jul 2015 at 5:01
Attachments:
I attached the html and converted code.
and the code is quite simple
@Test
public void htmlToJpg() throws MalformedURLException{
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
String uri = new File("//home/gnsg/Desktop/test.html").toURL().toString();
imageGenerator.loadUrl(uri);
imageGenerator.saveAsImage("hello-world123.png");
// imageGenerator.saveAsHtmlWithMap("hello-world.html", "hello-world.png");
}
Original issue reported on code.google.com by [email protected]
on 30 Jun 2012 at 7:37
Attachments:
What steps will reproduce the problem?
1. convert the html to png
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
BufferedImage image= imageGenerator.getBufferedImage();
ImageIO.write(image,"jpg" , new File("d:/hello.jpg"));
Original issue reported on code.google.com by [email protected]
on 28 Dec 2012 at 8:27
Attachments:
What steps will reproduce the problem?
1. adding to your POM in Eclipse
2. Can not find missing artifact "gui.ava:html2image:jar:0.9:compile"
Is there a more current version or new repository for use with Maven?
Original issue reported on code.google.com by [email protected]
on 5 Aug 2011 at 2:58
see the attached Java file
Original issue reported on code.google.com by [email protected]
on 7 Dec 2013 at 10:34
Attachments:
What steps will reproduce the problem?
cant generate pic with HTML which contains <meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
What is the expected output? What do you see instead?
It's ok when I del http-equiv
What version of the product are you using? On what operating system?
0.9
Original issue reported on code.google.com by [email protected]
on 10 Aug 2015 at 7:30
Attachments:
So it looks like this project has essentially been abandoned - here's a tip for
anyone else looking to use it to any great extent:
The size of the image will not be correctly regardless of whether you call the
setSize method or not. Instead follow these steps:
1. do NOT call setSize - it makes no difference at all to picture size
2. The size should be set on the top level container in your HTML (e.g. set CSS
width and height of top div).
3. This will make the image, on average, 1.322 scale of what you expected.
4. To solve this, simple multiply the width/height values by 0.7625f (this
seems to be a sweet spot but you could make it more accurate still).
I use: int width = Math.round(origWidth*0.7625f); - and same again for height.
This should give you the correct height within around 3px on each axis for
pictures less than 1024*768 in size.
Hope this helps someone, pity this library is no longer under development
although looking at the code it uses a lot of weird tricks to force the HTML
into an image format.
Cheers,
Jack
Original issue reported on code.google.com by [email protected]
on 25 Apr 2012 at 11:33
I think you need to update the maven repo in this project home page, the new
one seems to be
<url>http://repo.jfrog.org/artifactory/third-party-releases-local</url>
Original issue reported on code.google.com by [email protected]
on 12 Jan 2014 at 8:18
What steps will reproduce the problem?
1. Get HTML from my WYSIWYG Editor
2. HTML has an image like <img src="voasdasdnunew..."/> in base64
3. when converting to image the img is not recognized
Steps:
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator.loadHtml("<IMG src=\"data:image/gif;base64,iVBORw0KGgoAA...
imageGenerator.saveAsImage("C:\\tmp\\prueba.png");
What is the expected output? What do you see instead?
I want to get the image as it is displayed in Web browser
What version of the product are you using? On what operating system?
0.9.jar in W7
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 15 Mar 2013 at 9:36
What steps will reproduce the problem?
1. Create a <div> and inside that div, a <span>
2. Make the <div> width:600px;
3. Make the <span> word-wrap:break-word; display:block;
4. Place WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW(and so on) into
<span>
What is the expected output? What do you see instead?
In Firefox, IE and Chrome, the String gets wrapped into several lines if its
length exceeds 600px.
Instead the word-wrap gets ignored.
What version of the product are you using? On what operating system?
Version 0.9 on Windows 7.
Please provide any additional information below.
If there's a hotfix, I'd appreciate very much if you told me.
Original issue reported on code.google.com by [email protected]
on 4 Mar 2014 at 12:01
What steps will reproduce the problem?
1. convert html to jpg
2.
3.
What is the expected output?
html without a background color will generate jpg files without a background
color
What do you see instead?
html without a background color will generate nice gif and png output, but jpg
output files have always an orange background
What version of the product are you using?
version 0.9
On what operating system?
windows 7 - 64 bit
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 25 Oct 2011 at 5:49
Attachments:
What steps will reproduce the problem?
1. simply attempt to checkout the code
What is the expected output? What do you see instead?
I expect to see all of the necessary classes for this project. Instead, there
is at least one class missing (the most important class --
HtmlImageGenerator.java).
What version of the product are you using? On what operating system?
0.9 (SVN rev. 25) on Ubuntu 11.04 (though an SVN checkout is OS independent)
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 24 Jun 2011 at 8:18
Attachments:
What steps will reproduce the problem?
1. when we are creating image only arial font is showing.
2. in html taking times new roman
3.
What is the expected output? What do you see instead?
I want attached a new font.
What version of the product are you using? On what operating system?
we
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 16 Dec 2011 at 3:08
What steps will reproduce the problem?
1.
imageGenerator.loadUrl("\\\ServerName\\LinePlacementProject\\HTML_LineImage.html
");
imageGenerator.saveAsImage("\\\ServerName\\LinePlacementProject\\LineImage.png")
;
2. imageGenerator.loadUrl("D:\\Test
Envirnoment\\LinePlacementProject\\HTML_LineImage.html");
imageGenerator.saveAsImage("D:\\LinePlacementProject\\LineImage.png");
3.
What is the expected output? What do you see instead?
PNG generated image is expected , following error is thrown
Exception in thread "main" java.lang.RuntimeException: Exception while loading
D:\Test Envirnoment\LinePlacementProject\HTML_LineImage.html
at gui.ava.html.image.generator.HtmlImageGenerator.loadUrl(HtmlImageGenerator.java:60)
at SSIS.ImageConverstion.main(ImageConverstion.java:10)
Caused by: java.net.MalformedURLException: unknown protocol: d
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at javax.swing.JEditorPane.setPage(Unknown Source)
at gui.ava.html.image.generator.HtmlImageGenerator.loadUrl(HtmlImageGenerator.java:58)
What version of the product are you using? On what operating system?
Eclipse JDK 7 Windows 7
Please provide any additional information below.
none
Original issue reported on code.google.com by [email protected]
on 29 Nov 2014 at 2:17
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.