Package org.xhtmlrenderer.test

Source Code of org.xhtmlrenderer.test.Graphics2DRendererTest

package org.xhtmlrenderer.test;

import org.xhtmlrenderer.simple.Graphics2DRenderer;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;

public class Graphics2DRendererTest {

    public static void main(String[] args) throws Exception {
        BufferedImage img = Graphics2DRenderer.renderToImageAutoSize(new File("demos/splash/splash.html").toURI().toURL().toExternalForm(),
                700, BufferedImage.TYPE_INT_ARGB);
        ImageIO.write(img, "png", new File("test.png"));
    }
}
TOP

Related Classes of org.xhtmlrenderer.test.Graphics2DRendererTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.