Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.DefaultFontMapper


            if (dia.getDirectory() != null && dia.getFile() != null) {
                StaticMethods.saveEnvironmentViewAsPDF(
                        new File(dia.getDirectory() + "/" + dia.getFile()),
                        // dia.getFiles()[0],
                        (AbstractEnvironment2D<?>) this.liveWindow.vidParent
                                .getEnvironment(), new DefaultFontMapper());
            }
            if (!pause) {
                liveWindow.vidParent.depause();
            }
        } else if (arg0.getActionCommand().equals(this.saveString)) {
View Full Code Here


        renderer.setShapesVisible(true);
        DateAxis axis = (DateAxis) plot.getDomainAxis();
        axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
        // write the chart to a PDF file...
        File fileName = new File("jfreechart1.pdf");
        saveChartAsPDF(fileName, chart, 400, 300, new DefaultFontMapper());
      }
      catch (IOException e) {
        System.out.println(e.getMessage());
      }
    }
View Full Code Here

            document.open();
           
            // step 4: we grab the ContentByte and do some stuff with it
           
            // we create a fontMapper and read all the fonts in the font directory
            DefaultFontMapper mapper = new DefaultFontMapper();
            FontFactory.registerDirectories();
            mapper.insertDirectory("c:\\windows\\fonts");
            // we create a template and a Graphics2D object that corresponds with it
            int w = 150;
            int h = 150;
            PdfContentByte cb = writer.getDirectContent();
            PdfTemplate tp = cb.createTemplate(w, h);
View Full Code Here

            UIDocument doc = (UIDocument) findITextParent(getParent(), UIDocument.class);
            if (doc != null) {
                PdfWriter writer = (PdfWriter) doc.getWriter();
                PdfContentByte cb = writer.getDirectContent();
                PdfTemplate tp = cb.createTemplate(getWidth(), getHeight());
                Graphics2D g2 = tp.createGraphics(getWidth(), getHeight(), new DefaultFontMapper());            
                chart.draw(g2, new Rectangle2D.Double(0, 0, getWidth(), getHeight()));
                g2.dispose();

                image = new ImgTemplate(tp);
            } else {
View Full Code Here

      // step 3
        document.open();
        // step 4
        PdfContentByte cb = writer.getDirectContent();
        PdfTemplate tp = cb.createTemplate(width, height);
        Graphics2D g2d = tp.createGraphics(width, height, new DefaultFontMapper());
        Rectangle2D r2d = new Rectangle2D.Double(0, 0, width, height);
        chart.draw(g2d, r2d);
        g2d.dispose();
        tp.sanityCheck();
        cb.addTemplate(tp, 0, 0);
View Full Code Here

            document.open();
           
            // step 4: we grab the ContentByte and do some stuff with it
           
            // we create a fontMapper and read all the fonts in the font directory
            DefaultFontMapper mapper = new DefaultFontMapper();
            FontFactory.registerDirectories();
            mapper.insertDirectory("c:\\windows\\fonts");
            // we create a template and a Graphics2D object that corresponds with it
            int w = 150;
            int h = 150;
            PdfContentByte cb = writer.getDirectContent();
            PdfTemplate tp = cb.createTemplate(w, h);
View Full Code Here

                PdfContentByte cb = writer.getDirectContent();
                PdfTemplate tp = cb.createTemplate(getWidth(), getHeight());

                UIFont font = (UIFont) findITextParent(this, UIFont.class);

                DefaultFontMapper fontMapper;
                if (font == null) {
                    fontMapper = new DefaultFontMapper();
                } else {
                    fontMapper = new AsianFontMapper(font.getName(), font.getEncoding());
                }

                Graphics2D g2 = tp.createGraphics(getWidth(), getHeight(), fontMapper);
View Full Code Here

         if (doc != null)
         {
            PdfWriter writer = (PdfWriter) doc.getWriter();
            PdfContentByte cb = writer.getDirectContent();
            PdfTemplate tp = cb.createTemplate(getWidth(), getHeight());
            Graphics2D g2 = tp.createGraphics(getWidth(), getHeight(), new DefaultFontMapper());
            chart.draw(g2, new Rectangle2D.Double(0, 0, getWidth(), getHeight()));
            g2.dispose();

            image = new ImgTemplate(tp);
         }
View Full Code Here

            // step 4: we grab the ContentByte and do some stuff with it

            // we create a fontMapper and read all the fonts in the font
            // directory
            DefaultFontMapper mapper = new DefaultFontMapper();
            FontFactory.registerDirectories();

            // we create a template and a Graphics2D object that corresponds
            // with it
            PdfContentByte cb = writer.getDirectContent();
View Full Code Here

            // step 4: we grab the ContentByte and do some stuff with it

            // we create a fontMapper and read all the fonts in the font
            // directory
            DefaultFontMapper mapper = new DefaultFontMapper();
            FontFactory.registerDirectories();

            // we create a template and a Graphics2D object that corresponds
            // with it
            PdfContentByte cb = writer.getDirectContent();
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.DefaultFontMapper

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.