Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.DefaultFontMapper$BaseFontParameters


        return BaseFont.createFont();
    }

    private void loadFont(java.awt.Font font) throws Exception {
        if (fontMapper == null) {
            fontMapper = new DefaultFontMapper();
        }
        if (fontMapper instanceof DefaultFontMapper) {
            if (Utilities.isMac()) {
                String fontName = font.getName();
                if (!((DefaultFontMapper) fontMapper).getMapper().containsKey(fontName)) {
View Full Code Here


  public static void addChartToPDF(JFreeChart chart, Rectangle rect,
      PdfWriter writer) {
    PdfContentByte cb = writer.getDirectContent();
    PdfTemplate tp = cb.createTemplate(rect.getWidth(), rect.getHeight());
    Graphics2D g2 = tp.createGraphics(rect.getWidth(), rect.getHeight(), new DefaultFontMapper());
    Rectangle2D r2D = new Rectangle2D.Double(0, 0, rect.getWidth(), rect.getHeight());
    chart.draw(g2, r2D, null);
    g2.dispose();
    cb.addTemplate(tp, 0, 0);
  }
View Full Code Here

      PdfWriter writer, int row, int column) {
    Rectangle rect = PageSize.A6.rotate();
    Rectangle rect2 = PageSize.A4.rotate();
    PdfContentByte cb = writer.getDirectContent();
    PdfTemplate tp = cb.createTemplate(rect.getWidth(), rect.getHeight());
    Graphics2D g2 = tp.createGraphics(rect.getWidth(), rect.getHeight(), new DefaultFontMapper());
    Rectangle2D r2D = new Rectangle2D.Double(0, 0, rect2.getWidth(), rect2.getHeight());
    g2.setTransform(AffineTransform.getScaleInstance(rect.getWidth()/rect2.getWidth(), rect.getHeight()/rect2.getHeight()));
    chart.draw(g2, r2D, null);
    g2.dispose();
    cb.addTemplate(tp, column * rect.getWidth(), row * rect.getHeight());
 
View Full Code Here

    /**
     *
     */
    public ClasicReportBuilder() {
        super();
        this.fontMapper = new DefaultFontMapper();
    }
View Full Code Here

TOP

Related Classes of com.itextpdf.text.pdf.DefaultFontMapper$BaseFontParameters

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.