How To Convert HTML Page To Image
2011-07-14 19:11
549 查看
Re: How To Convert HTML Page To Image April 22, 2004 - 05:09 #1 Anton Nashatyrev Hello Maria,
Here is a simple example:
Best regards,
Anton.
Thursday, April 22, 2004, 12:36:09 AM, you wrote:
sfjo> We need the Java library converting HTML page to any
sfjo> image format. May be there is a way to do that using standard
sfjo> Java libraries.
sfjo> ---
sfjo> [Message sent by forum member 'MariaBraga' (Maria Brag)]
sfjo> http://www.javadesktop.org/forums/thread.jspa?messageID=9548╌
Here is a simple example:
JEditorPane p = new JEditorPane("text/html", "aaa bbb ccc"); Dimension size = p.getPreferredSize(); p.setSize(size); BufferedImage img = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB); p.paint(img.getGraphics()); JPEGImageEncoder enc = JPEGCodec.createJPEGEncoder(new FileOutputStream("out.jpg")); enc.encode(img);
Best regards,
Anton.
Thursday, April 22, 2004, 12:36:09 AM, you wrote:
sfjo> We need the Java library converting HTML page to any
sfjo> image format. May be there is a way to do that using standard
sfjo> Java libraries.
sfjo> ---
sfjo> [Message sent by forum member 'MariaBraga' (Maria Brag)]
sfjo> http://www.javadesktop.org/forums/thread.jspa?messageID=9548╌
相关文章推荐
- Convert HTML Page To a PDF Using Open Source Tool [ Linux / OS X / Windows ]
- How to freeze a dynamic aspx page into a static html page (on the server).
- Silverlight Tips[4]: How to convert bytes to image in WPF
- how to know wether an element is exist in a html page.
- Java : how to convert text to image
- How to save a web page as HTML or MHT
- How to get the HTML source of a webpage in Ruby
- How to freeze a dynamic aspx page into a static html page (on the server).
- How to freeze a dynamic aspx page into a static html page (on the server).
- how to show html code in html page
- How to convert docx/odt to pdf/html with Java?
- Howto Convert PDF files to HTML files
- [HTML] how to redirect to another page automactilly without js
- 如何用.Net 取得指定网面的内容? How to get html web page data?
- [转载] How to convert a colour image to grayscale
- How to tile small texture image onto page as its background?
- Show how to print a table in a html page
- How to freeze a dynamic aspx page into a static html page (on the server).(转:http://codebetter.com/blogs/peter.van.ooijen/archiv
- 海洋工作室——网站建设专家:ASP.NET: How to Convert Your Site To A MasterPage Site in 3 Steps
- How to tile small texture image onto page as its background