Package com.lowagie.text.pdf

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


            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


            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(370, 0);
            cb.lineTo(370, 525);
            cb.moveTo(410, 525);
            cb.lineTo(410, 0);
            cb.stroke();
            if (getValue("front") != null) {
              Image front = (Image)getValue("front");
              front.scaleToFit(370, 525);
              front.setAbsolutePosition(410f + (370f - front.scaledWidth()) / 2f, (525f - front.scaledHeight()) / 2f);
              document.add(front);
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.width() * factor, rect.height() * factor);
        cb.stroke();
        System.out.println("Processed page " + i);
        p++;
        if (p == pages) {
          p = 0;
          document.newPage();
View Full Code Here

                cb.setColorStroke(new Color(156, 156, 156));
                cb.setLineWidth(2);
                cb.moveTo(document.leftMargin(), document.bottomMargin() - 5);
                cb.lineTo(document.getPageSize().width() - document.rightMargin(),
                    document.bottomMargin() - 5);
                cb.stroke();

                ClassLoader classLoader = ConversationUtils.class.getClassLoader();
                Enumeration<URL> providerEnum = classLoader.getResources("images/pdf_generatedbyof.gif");
                while (providerEnum.hasMoreElements()) {
                    Image gif = Image.getInstance(providerEnum.nextElement());
View Full Code Here

        cb.saveState();
        // draw a Rectangle around the page
        cb.setLineWidth(1);
        cb.rectangle(30, 30, document.getPageSize().width() - 60, document.getPageSize().height() - 60);
        cb.stroke();
        cb.restoreState();
    }

    /**
     * @see com.lowagie.text.pdf.PdfPageEventHelper#onCloseDocument(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document)
View Full Code Here

            }
            cb.moveTo(370, 0);
            cb.lineTo(370, 525);
            cb.moveTo(410, 525);
            cb.lineTo(410, 0);
            cb.stroke();
            if (front != null) {
              front.scaleToFit(370, 525);
              front.setAbsolutePosition(410f + (370f - front.getScaledWidth()) / 2f, (525f - front.getScaledHeight()) / 2f);
              document.add(front);
            }
View Full Code Here

        cb.saveState();
      // border for the complete table
        cb.setLineWidth(2);
        cb.setRGBColorStroke(255, 0, 0);
        cb.rectangle(widths[0], heights[heights.length - 1], widths[widths.length - 1] - widths[0], heights[0] - heights[heights.length - 1]);
        cb.stroke();
       
        // border for the header rows
        if (headerRows > 0) {
            float headerHeight = heights[0];
            for (int k = 0; k < headerRows; ++k)
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.