All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xhtmlrenderer.tool.Boxer Maven / Gradle / Ivy

Go to download

Flying Saucer is a CSS 2.1 renderer written in Java. This artifact contains the core rendering and layout code as well as Java2D output.

There is a newer version: 9.11.0
Show newest version
package org.xhtmlrenderer.tool;

import org.xhtmlrenderer.test.DocumentDiffTest;

import java.io.File;

public class Boxer {

    private void run(String filen) throws Exception {
        File file = new File(filen);
        if (!file.exists() || file.isDirectory()) {
            throw new IllegalArgumentException(filen + " not a file, or is a directory. Give me a single file name.");
        }

        System.out.println(DocumentDiffTest.xhtmlToDiff(filen, 1024, 768));
    }

    public static void main(String[] args) throws Exception {
        if (args.length == 0) {
            throw new IllegalArgumentException("Give a file name");
        }
        new Boxer().run(args[0]);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy