Package com.itextpdf.awt

Examples of com.itextpdf.awt.PdfGraphics2D


     * @param fontMapper the mapping from awt fonts to <CODE>BaseFont</CODE>
     * @return a <CODE>Graphics2D</CODE>
     * @deprecated use the constructor in PdfPrinterGraphics2D
     */
    public java.awt.Graphics2D createGraphics(final float width, final float height, final FontMapper fontMapper) {
        return new PdfGraphics2D(this, width, height, fontMapper);
    }
View Full Code Here


     * @param quality the quality of the jpeg
     * @return a <CODE>Graphics2D</CODE>
     * @deprecated use the constructor in PdfPrinterGraphics2D
     */
    public java.awt.Graphics2D createGraphics(final float width, final float height, final FontMapper fontMapper, final boolean convertImagesToJPEG, final float quality) {
        return new PdfGraphics2D(this, width, height, fontMapper, false, convertImagesToJPEG, quality);
    }
View Full Code Here

        } catch (DocumentException e) {
            throw new RuntimeException("An error occurred while creating a PdfWriter object.", e);
        }
        document.open();
        PdfContentByte contentByte = writer.getDirectContent();
        Graphics2D g = new PdfGraphics2D(contentByte, (float) bounds.getWidth(), (float) bounds.getHeight(), fontMapper);
        g.translate(-bounds.getX(), -bounds.getY());
        drawable.draw(g);
        g.dispose();
        document.close();
    }
View Full Code Here

TOP

Related Classes of com.itextpdf.awt.PdfGraphics2D

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.