Package com.lowagie.text.pdf

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


      PdfTemplate template = writer.getDirectContent().createTemplate(20, 20);
      BaseFont bf = BaseFont.createFont("Helvetica", "winansi", false);
      String text = strWhat;
      float size = 8;
      float width = bf.getWidthPoint(text, size);
      template.beginText();
      template.setRGBColorFillF(fltRed, fltGreen, fltBlue);
      template.setFontAndSize(bf, size);
      template.setTextMatrix(0, 2);
      template.showText(text);
      template.endText();
View Full Code Here


           
            // Fill a rectangle with CMYK alternate
            t.setColorFill(spc_g, 0.5f);
            t.rectangle(100, 125, 100, 100);
            t.fill();
            t.beginText();
            t.setFontAndSize(bf, 20f);
            t.setTextMatrix(1f, 0f, 0f, 1f, 10f, 10f);
            t.showText("Template text upside down");
            t.endText();
            t.rectangle(0, 0, 499, 499);
View Full Code Here

            PdfTemplate template = writer.getDirectContent().createTemplate(20, 20);
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
            String text = "Vertical";
            float size = 16;
            float width = bf.getWidthPoint(text, size);
            template.beginText();
            template.setRGBColorFillF(1, 1, 1);
            template.setFontAndSize(bf, size);
            template.setTextMatrix(0, 2);
            template.showText(text);
            template.endText();
View Full Code Here

            template.setRGBColorStrokeF(255f, 0f, 0f);
            template.circle(250f, 100f, 80f);
            template.stroke();
           
            // we add some text
            template.beginText();
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            template.setFontAndSize(bf, 12);
            template.setTextMatrix(100, 100);
            template.showText("Text at the position 100,100 (relative to the template!)");
            template.endText();
View Full Code Here

            template.setLineCap(1);
            template.setLineWidth(12f);
            template.arc(80f, 40f, 160f, 120f, 90f, 180f);
            template.arc(115f, 75f, 125f, 85f, 0f, 360f);
            template.stroke();
            template.beginText();
            template.setFontAndSize(bf, 180);
            template.setRGBColorFill(0xFF, 0x00, 0x00);
            template.showTextAligned(PdfContentByte.ALIGN_LEFT, "T", 125f, 35f, 0f);
            template.resetRGBColorFill();
            template.showTextAligned(PdfContentByte.ALIGN_LEFT, "ext", 220f, 35f, 0f);
View Full Code Here

            PdfTemplate template = writer.getDirectContent().createTemplate(20, 20);
            BaseFont bf = BaseFont.createFont("Helvetica", "winansi", false);
            String text = "Vertical";
            float size = 16;
            float width = bf.getWidthPoint(text, size);
            template.beginText();
            template.setRGBColorFillF(1, 1, 1);
            template.setFontAndSize(bf, size);
            template.setTextMatrix(0, 2);
            template.showText(text);
            template.endText();
View Full Code Here

            PdfTemplate template = writer.getDirectContent().createTemplate(20, 20);
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
            String text = "Vertical";
            float size = 16;
            float width = bf.getWidthPoint(text, size);
            template.beginText();
            template.setRGBColorFillF(1, 1, 1);
            template.setFontAndSize(bf, size);
            template.setTextMatrix(0, 2);
            template.showText(text);
            template.endText();
View Full Code Here

            template.setRGBColorStrokeF(255f, 0f, 0f);
            template.circle(250f, 100f, 80f);
            template.stroke();
           
            // we add some text
            template.beginText();
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            template.setFontAndSize(bf, 12);
            template.setTextMatrix(100, 100);
            template.showText("Text at the position 100,100 (relative to the template!)");
            template.endText();
View Full Code Here

            template.setLineCap(1);
            template.setLineWidth(12f);
            template.arc(80f, 40f, 160f, 120f, 90f, 180f);
            template.arc(115f, 75f, 125f, 85f, 0f, 360f);
            template.stroke();
            template.beginText();
            template.setFontAndSize(bf, 180);
            template.setRGBColorFill(0xFF, 0x00, 0x00);
            template.showTextAligned(PdfContentByte.ALIGN_LEFT, "T", 125f, 35f, 0f);
            template.resetRGBColorFill();
            template.showTextAligned(PdfContentByte.ALIGN_LEFT, "ext", 220f, 35f, 0f);
View Full Code Here

           
            // Fill a rectangle with CMYK alternate
            t.setColorFill(spc_g, 0.5f);
            t.rectangle(100, 125, 100, 100);
            t.fill();
            t.beginText();
            t.setFontAndSize(bf, 20f);
            t.setTextMatrix(1f, 0f, 0f, 1f, 10f, 10f);
            t.showText("Template text upside down");
            t.endText();
            t.rectangle(0, 0, 499, 499);
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.