Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/381.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用apacheFOP将图像转换为pcl_Java_Apache Fop - Fatal编程技术网

Java 使用apacheFOP将图像转换为pcl

Java 使用apacheFOP将图像转换为pcl,java,apache-fop,Java,Apache Fop,我需要将GIF图像转换为PCL,并使用Apach FOP从打印机的特定托盘打印该PCL文件。我可以举个例子吗?您可以查看以下文件: 这可能会帮助您: pdf("application/pdf"), ps("application/postscript"), pcl("application/x-pcl"), png("image/png"), jpeg("image/jpeg"), svg("image/svg+xml"), xml("a

我需要将GIF图像转换为PCL,并使用Apach FOP从打印机的特定托盘打印该PCL文件。我可以举个例子吗?

您可以查看以下文件:

这可能会帮助您:

    pdf("application/pdf"),
    ps("application/postscript"),
    pcl("application/x-pcl"),
    png("image/png"),
    jpeg("image/jpeg"),
    svg("image/svg+xml"),
    xml("application/X-fop-areatree"),
    mif("application/mif"),
    rtf("application/rtf"),
    txt("text/plain");

    private final String outputFormatExtended;

    FopOutputType(String outputFormatExtended) {
        this.outputFormatExtended = outputFormatExtended;
    }

    public String getFormatExtended() {
        return outputFormatExtended;
    }

    public static FopOutputType asFooOutputType(String outputFormatExtended) {
        if ("application/pdf".equalsIgnoreCase(outputFormatExtended)) {
            return pdf;
        } else if ("application/postscript".equalsIgnoreCase(outputFormatExtended)) {
            return ps;
        } else if ("application/x-pcl".equalsIgnoreCase(outputFormatExtended)) {
            return pcl;
        } else if ("image/png".equalsIgnoreCase(outputFormatExtended)) {
            return png;
        } else if ("image/jpeg".equalsIgnoreCase(outputFormatExtended)) {
            return jpeg;
        } else if ("image/svg+xml".equalsIgnoreCase(outputFormatExtended)) {
            return svg;
        } else if ("application/X-fop-areatree".equalsIgnoreCase(outputFormatExtended)) {
            return xml;
        } else if ("application/mif".equalsIgnoreCase(outputFormatExtended)) {
            return mif;
        } else if ("application/rtf".equalsIgnoreCase(outputFormatExtended)) {
            return rtf;
        } else if ("text/plain".equalsIgnoreCase(outputFormatExtended)) {
            return txt;
        }

        return null;
    }