スキップしてメイン コンテンツに移動

投稿

ラベル(web page)が付いた投稿を表示しています

Java: Capture Web Page

Recently I was investigating how to capture web page as image. I recently realized that there is a nicer nice component for navigating web page in Java FX. javafx.scene.web.WebView javafx.embed.swing.JFXPanel I referred this stackoverflow post and wrote a Java class for capturing web page and save it as image. Please note that you should include jfxrt.jar, which was in JDK1.7.0_XX/jre/lib, should be added to your classpath. Code Here is an actual code. Please feel free to use it... I am very happy if you give me some feedback for this code. package com.dukesoftware.javafx; import static com.dukesoftware.utils.io.IOUtils.getExtension; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Map; import java.util.Set; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import javafx.application.Platform; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue;

Create Web Page Thumbnail by Java or C#

I have googled how to create web page thumbnail. Hope this post helps anyone who are trying to create web page image. Java Lunch a native browser from Desktop class and capture active window by Robot class I think this isn't smart way however it should work. Please read this . The disadvantage of this method is you cannot achieve it on off screen. Using SWT Browser Please read this . The biggest disadvantage is again you cannot do it on off screen. Pure Java Solution If you are seeking pure java solution, maybe Cobra or Css Box will help you. Unfortunately Cobra is not updated recently, and Css Box is still very new on the other hand. I hope I can post example of code on this blog in near future.... Using QT-Jambi I'm not familiar with Qt library but this post explains how to create web page image by Qt Jambi , which is java wrapper of Qt Library. The post provides code example, too!! C# Using System.Windows.Forms.WebBrowser this article in www.codeproj