Package com.lowagie.text.pdf

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


            cb.setColorStroke(Color.black);
            cb.setPatternFill(pat2, Color.red);
            cb.rectangle(100, 400, 30, 210);
            cb.fillStroke();
            cb.setPatternFill(pat2, Color.green);
            cb.rectangle(150, 400, 30, 100);
            cb.fillStroke();
            cb.setPatternFill(pat2, Color.blue);
            cb.rectangle(200, 400, 30, 130);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.5f));
View Full Code Here


            cb.fillStroke();
            cb.setPatternFill(pat2, Color.green);
            cb.rectangle(150, 400, 30, 100);
            cb.fillStroke();
            cb.setPatternFill(pat2, Color.blue);
            cb.rectangle(200, 400, 30, 130);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.5f));
            cb.rectangle(250, 400, 30, 80);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.7f));
View Full Code Here

            cb.fillStroke();
            cb.setPatternFill(pat2, Color.blue);
            cb.rectangle(200, 400, 30, 130);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.5f));
            cb.rectangle(250, 400, 30, 80);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.7f));
            cb.rectangle(300, 400, 30, 170);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.9f));
View Full Code Here

            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.5f));
            cb.rectangle(250, 400, 30, 80);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.7f));
            cb.rectangle(300, 400, 30, 170);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.9f));
            cb.rectangle(350, 400, 30, 40);
            cb.fillStroke();
           
View Full Code Here

        }
        cb.saveState();
        // draw a Rectangle around the page
        cb.setColorStroke(Color.orange);
        cb.setLineWidth(2);
        cb.rectangle(20, 20, document.getPageSize().getWidth() - 40, document.getPageSize().getHeight() - 40);
        cb.stroke();
        cb.restoreState();
        // starting on page 3, a watermark with an Image that is made transparent
        if (writer.getPageNumber() >= 3) {
            cb.setGState(gstate);
View Full Code Here

      cb.resetRGBColorStroke();
    }
    else if ("box".equals(text)) {
      PdfContentByte cb = writer.getDirectContentUnder();
      rect.setGrayFill(0.5f);
      cb.rectangle(rect);
    }
    }
  /**
   * Generic page event.
   *
 
View Full Code Here

            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.7f));
            cb.rectangle(300, 400, 30, 170);
            cb.fillStroke();
            cb.setPatternFill(pat2, new GrayColor(0.9f));
            cb.rectangle(350, 400, 30, 40);
            cb.fillStroke();
           
            cb.sanityCheck();
        }
        catch (Exception de) {
View Full Code Here

           
            // Stroke a rectangle with CMYK alternate
            cb.setColorStroke(spc_cmyk, .5f);
            cb.setLineWidth(10f);
            // draw a rectangle
            cb.rectangle(100, 700, 100, 100);
            // add the diagonal
            cb.moveTo(100, 700);
            cb.lineTo(200, 800);
            // stroke the lines
            cb.stroke();
View Full Code Here

            // stroke the lines
            cb.stroke();
           
            // Fill a rectangle with CMYK alternate
            cb.setColorFill(spc_cmyk, 0.25f);
            cb.rectangle(250, 700, 100, 100);
            cb.fill();
           
            // Stroke a circle with RGB alternate
            cb.setColorStroke(spc_rgb, 0.9f);
            cb.setLineWidth(5f);
View Full Code Here

            ct.addText(new Phrase(15, "UNI\n", font));
            for (int i = 0; i < 27; i++) {
                ct.addText(new Phrase(15, uni[i] + "\n", font));
            }
            ct.go();
            cb.rectangle(103, 295, 52, 8 + 28 * 15);
            cb.stroke();
            ct.setSimpleColumn(105, 300, 150, 300 + 28 * 15, 15, Element.ALIGN_RIGHT);
            ct.addText(new Phrase(15, "char\n", font));
            for (int i = 0; i < 27; i++) {
                ct.addText(new Phrase(15, code[i] + "\n", font));
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.