Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfContentByte.stroke()


                    cb.fill();
            }
            break;
        case STROKE:
            if (traces > 0)
                cb.stroke();
            break;
        default: //drawType==CLIP
            if (traces == 0)
                cb.rectangle(0, 0, 0, 0);
            if (points.getWindingRule() == PathIterator.WIND_EVEN_ODD)
View Full Code Here


          for (float l = y1[p] - 19; l > y2[p]; l -= 16) {
            cb.moveTo(x3, l);
            cb.lineTo(x4, l);
          }
          cb.rectangle(x1 + dx, y2[p] + dy, rect.getWidth() * factor, rect.getHeight() * factor);
          cb.stroke();
          System.out.println("Processed page " + i);
          p++;
          if (p == pages) {
            p = 0;
            document.newPage();
View Full Code Here

            cb.lineTo(400, 700);
            cb.moveTo(50, 650);
            cb.lineTo(400, 650);
            cb.moveTo(50, 600);
            cb.lineTo(400, 600);
            cb.stroke();
           
            // we construct a font
            BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\arialuni.ttf", BaseFont.IDENTITY_H, true);
            Font ft = new Font(bf, 12);
            // This is the text:
View Full Code Here

            ColumnText.showTextAligned(cb, PdfContentByte.ALIGN_RIGHT, new Phrase(text + " Right", ft), 250, 650, 20, PdfWriter.RUN_DIRECTION_RTL, 0);
            ColumnText.showTextAligned(cb, PdfContentByte.ALIGN_LEFT, new Phrase("Some text Left aligned", ft), 250, 600, 20);
            float size = ColumnText.getWidth(center, PdfWriter.RUN_DIRECTION_RTL, 0);
            cb.setRGBColorStroke(255, 0, 0);
            cb.rectangle(250 - size/2, 690, size, 30);
            cb.stroke();
        }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
        }
        catch(IOException ioe) {
View Full Code Here

                for (int k = 0; k < maxLines; ++k) {
                    cb.moveTo(x - k * leading, y);
                    cb.lineTo(x - k * leading, y - height);
                }
                cb.rectangle(x, y, -leading * (maxLines - 1), -height);
                cb.stroke();
                int status;
                VerticalText vt = new VerticalText(cb);
                vt.setVerticalLayout(x, y, height, maxLines, leading);
                vt.addText(new Chunk(texts[idx++], new Font(bf, 20)));
                vt.addText(new Chunk(texts[idx++], new Font(bf, 20, 0, Color.blue)));
View Full Code Here

           
            ColumnText ct = new ColumnText(cb);
            ct.setSimpleColumn(unicodes, 60, 300, 100, 300 + 28 * 15, 15, Element.ALIGN_CENTER);
            ct.go();
            cb.rectangle(103, 295, 52, 8 + 28 * 15);
            cb.stroke();
            ct.setSimpleColumn(characters, 105, 300, 150, 300 + 28 * 15, 15, Element.ALIGN_RIGHT);
            ct.go();
            ct.setSimpleColumn(names, 160, 300, 500, 300 + 28 * 15, 15, Element.ALIGN_LEFT);
            ct.go();
           
View Full Code Here

            cb.rectangle(100, 700, 100, 100);
            // add the diagonal
            cb.moveTo(100, 700);
            cb.lineTo(200, 800);
            // stroke the lines
            cb.stroke();
           
            // an example of some circles
            cb.setLineDash(3, 3, 0);
            cb.setRGBColorStrokeF(0f, 255f, 0f);
            cb.circle(150f, 500f, 100f);
View Full Code Here

           
            // an example of some circles
            cb.setLineDash(3, 3, 0);
            cb.setRGBColorStrokeF(0f, 255f, 0f);
            cb.circle(150f, 500f, 100f);
            cb.stroke();
           
            cb.setLineWidth(5f);
            cb.resetRGBColorStroke();
            cb.circle(150f, 500f, 50f);
            cb.stroke();
View Full Code Here

            cb.stroke();
           
            cb.setLineWidth(5f);
            cb.resetRGBColorStroke();
            cb.circle(150f, 500f, 50f);
            cb.stroke();
           
            // example with colorfill
            cb.setRGBColorFillF(0f, 255f, 0f);
            cb.moveTo(100f, 200f);
            cb.lineTo(200f, 250f);
View Full Code Here

            cb.moveTo(216, 720);
            cb.lineTo(360, 360);
            cb.lineTo(360, 504);
            cb.lineTo(72, 144);
            cb.lineTo(144, 288);
            cb.stroke();
           
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            cb.beginText();
            cb.setFontAndSize(bf, 12);
            cb.showTextAligned(PdfContentByte.ALIGN_CENTER, "(3\", 10\")", 216 + 25, 720 + 5, 0);
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.