Package com.lowagie.text.pdf

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


            // step 3: we open the document
            document.open();
           
            // step 4:
            PdfContentByte cb = writer.getDirectContent();
            cb.moveTo(0, 0);
            String options[] = {"Red", "Green", "Blue"};
            PdfFormField field = PdfFormField.createCombo(writer, true, options, 0);
            field.setWidget(new LwgRectangle(100, 700, 180, 720), PdfAnnotation.HIGHLIGHT_INVERT);
            field.setFieldName("ACombo");
            field.setValueAsString("Red");
View Full Code Here


            document.open();
           
            // step 4:
            PdfFormField pushbutton = PdfFormField.createPushButton(writer);
            PdfContentByte cb = writer.getDirectContent();
            cb.moveTo(0, 0);
            PdfAppearance normal = cb.createAppearance(100, 50);
            normal.setColorFill(Color.GRAY);
            normal.rectangle(5, 5, 90, 40);
            normal.fill();
            PdfAppearance rollover = cb.createAppearance(100, 50);
View Full Code Here

                if (line == 0 && col == 0)
                    cb.setAction(new PdfAction("http://www.lowagie.com/iText/"),
                        widths[col], heights[line + 1], widths[col + 1], heights[line]);
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                // horizontal borderline
                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col + 1], heights[line]);
                cb.stroke();
                // vertical borderline
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                cb.moveTo(widths[col], heights[line]);
View Full Code Here

                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col + 1], heights[line]);
                cb.stroke();
                // vertical borderline
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col], heights[line + 1]);
                cb.stroke();
            }
        }
        cb.restoreState();
View Full Code Here

   *      com.lowagie.text.LwgRectangle, com.lowagie.text.pdf.PdfContentByte[])
   */
  public void cellLayout(LwgPdfPCell cell, LwgRectangle position,
      PdfContentByte[] canvases) {
    PdfContentByte cb = canvases[LwgPdfPTable.TEXTCANVAS];
    cb.moveTo(position.getLeft(), position.getBottom());
    cb.lineTo(position.getRight(), position.getTop());
    cb.stroke();
  }

  /**
 
View Full Code Here

         // step 4: we grab the ContentByte and do some stuff with it
         PdfContentByte cb = writer.getDirectContent();

         // first we draw some lines to be able to visualize the text alignment functions
         cb.setLineWidth(0f);
         cb.moveTo(250, 500);
         cb.lineTo(250, 800);
         cb.moveTo(50, 700);
         cb.lineTo(400, 700);
         cb.moveTo(50, 650);
         cb.lineTo(400, 650);
View Full Code Here

         // first we draw some lines to be able to visualize the text alignment functions
         cb.setLineWidth(0f);
         cb.moveTo(250, 500);
         cb.lineTo(250, 800);
         cb.moveTo(50, 700);
         cb.lineTo(400, 700);
         cb.moveTo(50, 650);
         cb.lineTo(400, 650);
         cb.moveTo(50, 600);
         cb.lineTo(400, 600);
View Full Code Here

         cb.setLineWidth(0f);
         cb.moveTo(250, 500);
         cb.lineTo(250, 800);
         cb.moveTo(50, 700);
         cb.lineTo(400, 700);
         cb.moveTo(50, 650);
         cb.lineTo(400, 650);
         cb.moveTo(50, 600);
         cb.lineTo(400, 600);
         cb.stroke();
View Full Code Here

         cb.lineTo(250, 800);
         cb.moveTo(50, 700);
         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);
View Full Code Here

                if (line == 0 && col == 0)
                    cb.setAction(new PdfAction("http://www.lowagie.com/iText/"),
                        widths[col], heights[line + 1], widths[col + 1], heights[line]);
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                // horizontal borderline
                cb.moveTo(widths[col], heights[line]);
                cb.lineTo(widths[col + 1], heights[line]);
                cb.stroke();
                // vertical borderline
                cb.setRGBColorStrokeF((float)Math.random(), (float)Math.random(), (float)Math.random());
                cb.moveTo(widths[col], heights[line]);
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.