Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfRectangle


                    acroForm.addDocumentField(field.getIndirectReference());
            }
            if (dic.isAnnotation()) {
                array.add(dic.getIndirectReference());
                if (!dic.isUsed()) {
                    PdfRectangle rect = (PdfRectangle)dic.get(PdfName.RECT);
                    if (rect != null) {
                      switch (rotation) {
                          case 90:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                pageSize.getTop() - rect.bottom(),
                    rect.left(),
                    pageSize.getTop() - rect.top(),
                    rect.right()));
                            break;
                          case 180:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                pageSize.getRight() - rect.left(),
                    pageSize.getTop() - rect.bottom(),
                    pageSize.getRight() - rect.right(),
                    pageSize.getTop() - rect.top()));
                            break;
                          case 270:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                rect.bottom(),
                    pageSize.getRight() - rect.left(),
                    rect.top(),
                    pageSize.getRight() - rect.right()));
                            break;
                      }
                    }
                }
            }
View Full Code Here


      if (y > maxY)
      {
        maxY = y;
      }
    }
    return new PdfRectangle(minX, minY, maxX, maxY);
  }
View Full Code Here

      if (y > maxY)
      {
        maxY = y;
      }
    }
    return new PdfRectangle(minX, minY, maxX, maxY);
  }
View Full Code Here

                    acroForm.addDocumentField(field.getIndirectReference());
            }
            if (dic.isAnnotation()) {
                array.add(dic.getIndirectReference());
                if (!dic.isUsed()) {
                    PdfRectangle rect = (PdfRectangle)dic.get(PdfName.RECT);
                    if (rect != null) {
                      switch (rotation) {
                          case 90:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                pageSize.getTop() - rect.bottom(),
                    rect.left(),
                    pageSize.getTop() - rect.top(),
                    rect.right()));
                            break;
                          case 180:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                pageSize.getRight() - rect.left(),
                    pageSize.getTop() - rect.bottom(),
                    pageSize.getRight() - rect.right(),
                    pageSize.getTop() - rect.top()));
                            break;
                          case 270:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                rect.bottom(),
                    pageSize.getRight() - rect.left(),
                    rect.top(),
                    pageSize.getRight() - rect.right()));
                            break;
                      }
                    }
                }
            }
View Full Code Here

      } catch (Exception e) {
        throw new ExceptionConverter(e);
      }
    }
    else {
      field.put(PdfName.RECT,  new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
    }
    if (parent == null)
      writer.addAnnotation(field);
    else
      parent.addKid(field);
View Full Code Here

  /**
   * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.LwgRectangle, com.lowagie.text.pdf.PdfContentByte[])
   */
  public void cellLayout(LwgPdfPCell cell, LwgRectangle rect, PdfContentByte[] canvases) {
    if (cellField == null || (fieldWriter == null && parent == null)) throw new IllegalArgumentException(MessageLocalization.getComposedMessage("you.have.used.the.wrong.constructor.for.this.fieldpositioningevents.class"));
    cellField.put(PdfName.RECT, new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
    if (parent == null)
      fieldWriter.addAnnotation(cellField);
    else
      parent.addKid(cellField);
  }
View Full Code Here

      } catch (Exception e) {
        throw new ExceptionConverter(e);
      }
    }
    else {
      field.put(PdfName.RECT,  new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
    }
    if (parent == null)
      writer.addAnnotation(field);
    else
      parent.addKid(field);
View Full Code Here

  /**
   * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[])
   */
  public void cellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] canvases) {
    if (cellField == null || (fieldWriter == null && parent == null)) throw new ExceptionConverter(new IllegalArgumentException("You have used the wrong constructor for this FieldPositioningEvents class."));
    cellField.put(PdfName.RECT, new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
    if (parent == null)
      fieldWriter.addAnnotation(cellField);
    else
      parent.addKid(cellField);
  }
View Full Code Here

                    acroForm.addDocumentField(field.getIndirectReference());
            }
            if (dic.isAnnotation()) {
                array.add(dic.getIndirectReference());
                if (!dic.isUsed()) {
                    PdfRectangle rect = (PdfRectangle)dic.get(PdfName.RECT);
                    if (rect != null) {
                      switch (rotation) {
                          case 90:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                pageSize.getTop() - rect.bottom(),
                    rect.left(),
                    pageSize.getTop() - rect.top(),
                    rect.right()));
                            break;
                          case 180:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                pageSize.getRight() - rect.left(),
                    pageSize.getTop() - rect.bottom(),
                    pageSize.getRight() - rect.right(),
                    pageSize.getTop() - rect.top()));
                            break;
                          case 270:
                            dic.put(PdfName.RECT, new PdfRectangle(
                                rect.bottom(),
                    pageSize.getRight() - rect.left(),
                    rect.top(),
                    pageSize.getRight() - rect.right()));
                            break;
                      }
                    }
                }
            }
View Full Code Here

      } catch (Exception e) {
        throw new ExceptionConverter(e);
      }
    }
    else {
      field.put(PdfName.RECT,  new PdfRectangle(rect.getLeft(padding), rect.getBottom(padding), rect.getRight(padding), rect.getTop(padding)));
    }
    if (parent == null)
      writer.addAnnotation(field);
    else
      parent.addKid(field);
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.PdfRectangle

Copyright © 2018 www.massapicom. 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.