Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfTemplate.createGraphics()


            // 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);
            Graphics2D g2 = tp.createGraphics(w, h, mapper);
            tp.setWidth(w);
            tp.setHeight(h);
            double ew = w/2;
            double eh = h/2;
            Ellipse2D.Double circle, oval, leaf, stem;
View Full Code Here


   {
      UIDocument doc = (UIDocument) findITextParent(getParent(), UIDocument.class);
      if (doc != null)
      {
         PdfTemplate tp = doc.createPdfTemplate(getWidth(), getHeight());
         Graphics2D g2 = tp.createGraphics(getWidth(), getHeight());

         render(g2);
         g2.dispose();

         try
View Full Code Here

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

                Graphics2D g2 = tp.createGraphics(getWidth(), getHeight(), fontMapper);
                chart.draw(g2, new Rectangle2D.Double(0, 0, getWidth(), getHeight()));
                g2.dispose();

                image = new ImgTemplate(tp);
            } else {
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

            // we create a template and a Graphics2D object that corresponds
            // with it
            PdfContentByte cb = writer.getDirectContent();
            PdfTemplate tp = cb.createTemplate(width, height);
            PdfGraphics2D graphic = (PdfGraphics2D) tp.createGraphics(width, height, mapper);

            // we set graphics options
            if (!mapContent.isTransparent()) {
                graphic.setColor(mapContent.getBgColor());
                graphic.fillRect(0, 0, width, height);
View Full Code Here

            // we create a template and a Graphics2D object that corresponds
            // with it
            PdfContentByte cb = writer.getDirectContent();
            PdfTemplate tp = cb.createTemplate(width, height);
            PdfGraphics2D graphic = (PdfGraphics2D) tp.createGraphics(width, height, mapper);

            // we set graphics options
            if (!mapContext.isTransparent()) {
                graphic.setColor(mapContext.getBgColor());
                graphic.fillRect(0, 0, width, height);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.