Package org.foray.graphic.batik

Examples of org.foray.graphic.batik.PDFGraphics2D$PDFGraphicsState


        GraphicsNode root;
        root = builder.build(ctx, svgDocument);
        ctx = null;
        builder = null;

        PDFGraphics2D graphics;
        try {
            graphics = new PDFGraphics2D(true, svgDocument,
                    fontConsumer, this.svg.getLogger(), pdfContext, outputStream);
        } catch (final GraphicException e) {
            /* This exception is caused when no graphical environment exists. We check for that at
             * the beginning of this method, so this should never happen. */
            return null;
        }
        graphics.setGraphicContext(
                new org.apache.batik.ext.awt.g2d.GraphicContext());

        root.paint(graphics);
        return graphics;
    }
View Full Code Here


            final GraphicOutputContext outputContext,
            final FontConsumer fontConsumer, final boolean strokeText,
            final boolean commentsEnabled) throws GraphicException {
        SVGDocument doc = null;
        doc = this.svg.getSvgDocument();
        final PDFGraphics2D graphics = getPDFContent4SVG(fontConsumer, doc,
                strokeText, outputContext, output);
        if (graphics == null) {
            throw new GraphicException("Unable to convert to PDF: "
                    + this.svg.getUrl().toExternalForm());
        }
        graphics.dispose();
        if (graphics.ioErrorFound()) {
            throw new GraphicException("I/O error(s) while converting to PDF: "
                    + this.svg.getUrl().toExternalForm());
        }
    }
View Full Code Here

TOP

Related Classes of org.foray.graphic.batik.PDFGraphics2D$PDFGraphicsState

Copyright © 2018 www.massapicom. 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.