Package com.lowagie.text.pdf

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


            cb.circle(150f, 500f, 50f);
            cb.stroke();
           
            // example with colorfill
            cb.setRGBColorFillF(0f, 255f, 0f);
            cb.moveTo(100f, 200f);
            cb.lineTo(200f, 250f);
            cb.lineTo(400f, 150f);
            // because we change the fill color BEFORE we stroke the triangle
            // the color of the triangle will be red instead of green
            cb.setRGBColorFillF(255f, 0f, 0f);
View Full Code Here


              if (getValue("side") == null) {
                cb.showTextAligned(Element.ALIGN_CENTER, (String)getValue("title"), 385f, 262f, 270f);
              }
              cb.endText();
            }
            cb.moveTo(370, 0);
            cb.lineTo(370, 525);
            cb.moveTo(410, 525);
            cb.lineTo(410, 0);
            cb.stroke();
            if (getValue("front") != null) {
View Full Code Here

              }
              cb.endText();
            }
            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);
View Full Code Here

          cb.addTemplate(page, factor, 0, 0, factor, x1 + dx, y2[p] + dy);
        }
        cb.setRGBColorStroke(0xC0, 0xC0, 0xC0);
        cb.rectangle(x3 - 5f, y2[p] - 5f, x4 - x3 + 10f, y1[p] - y2[p] + 10f);
        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);
View Full Code Here

            PdfContentByte cb = writer.getDirectContent();

            try {
                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();
View Full Code Here

            document.open();
           
            // step 4:
            BaseFont helv = BaseFont.createFont("Helvetica", "winansi", false);
            PdfContentByte cb = writer.getDirectContent();
            cb.moveTo(0, 0);
            String text = "Some start text";
            float fontSize = 12;
            Color textColor = new GrayColor(0f);
            PdfFormField field = PdfFormField.createTextField(writer, false, false, 0);
            field.setWidget(new LwgRectangle(171, 750, 342, 769), PdfAnnotation.HIGHLIGHT_INVERT);
View Full Code Here

            // step 3: we open the document
            document.open();
           
            // step 4:
            PdfContentByte cb = writer.getDirectContent();
            cb.moveTo(0, 0);
            PdfFormField radio = PdfFormField.createRadioButton(writer, true);
            PdfAppearance tpOff = cb.createAppearance(20, 20);
            PdfAppearance tpOn = cb.createAppearance(20, 20);
           
            tpOff.circle(10, 10, 9);
View Full Code Here

              if (side == null) {
                cb.showTextAligned(LwgElement.ALIGN_CENTER, title, 385f, 262f, 270f);
              }
              cb.endText();
            }
            cb.moveTo(370, 0);
            cb.lineTo(370, 525);
            cb.moveTo(410, 525);
            cb.lineTo(410, 0);
            cb.stroke();
            if (front != null) {
View Full Code Here

              }
              cb.endText();
            }
            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);
View Full Code Here

            // step 3: we open the document
            document.open();
           
            // step 4:
            PdfContentByte cb = writer.getDirectContent();
            cb.moveTo(0, 0);
            PdfFormField field = PdfFormField.createCheckBox(writer);
            PdfAppearance tpOff = cb.createAppearance(20, 20);
            PdfAppearance tpOn = cb.createAppearance(20, 20);
            tpOff.rectangle(1, 1, 18, 18);
            tpOff.stroke();
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.