Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfNumber


  /**
   * Sets the value of the collection item.
   * @param d
   */
  public void addItem(String key, double d) {
    addItem(key, new PdfNumber(d));
  }
View Full Code Here


   * you need to specify the page number (or use setFileAttachmentPagename to specify a named destination).
   * Once you have specified the page, you still need to specify the attachment using another method.
   * @param page  the page number of the page with the file attachment.
   */
  public void setFileAttachmentPage(int page) {
    put(PdfName.P, new PdfNumber(page));
  }
View Full Code Here

   * you need to specify the page with setFileAttachmentPage or setFileAttachmentPageName,
   * and then specify the index of the attachment added to this page (or use setFileAttachmentName).
   * @param annotation    the number of the attachment
   */
  public void setFileAttachmentIndex(int annotation) {
    put(PdfName.A, new PdfNumber(annotation));
  }
View Full Code Here

  /**
   * The relative order of the field name. Fields are sorted in ascending order.
   * @param i  a number indicating the order of the field
   */
  public void setOrder(int i) {
    put(PdfName.O, new PdfNumber(i));
  }
View Full Code Here

    case TEXT:
      return new PdfString(v, PdfObject.TEXT_UNICODE);
    case DATE:
      return new PdfDate(PdfDate.decode(v));
    case NUMBER:
      return new PdfNumber(v);
    }
    throw new IllegalArgumentException(v + " is not an acceptable value for the field " + get(PdfName.N).toString());
  }
View Full Code Here

                        palette[k * 3 + 2] = (byte)(rgb[k + bColor] >>> 8);
                    }
                    PdfArray indexed = new PdfArray();
                    indexed.add(PdfName.INDEXED);
                    indexed.add(PdfName.DEVICERGB);
                    indexed.add(new PdfNumber(gColor - 1));
                    indexed.add(new PdfString(palette));
                    PdfDictionary additional = new PdfDictionary();
                    additional.put(PdfName.COLORSPACE, indexed);
                    img.setAdditional(additional);
                }
View Full Code Here

  /**
   * Sets the value of the collection item.
   * @param i
   */
  public void addItem(String key, int i) {
    addItem(key, new PdfNumber(i));
  }
View Full Code Here

  /**
   * Sets the value of the collection item.
   * @param f
   */
  public void addItem(String key, float f) {
    addItem(key, new PdfNumber(f));
  }
View Full Code Here

  /**
   * Sets the value of the collection item.
   * @param d
   */
  public void addItem(String key, double d) {
    addItem(key, new PdfNumber(d));
  }
View Full Code Here

  /**
   * The relative order of the field name. Fields are sorted in ascending order.
   * @param i  a number indicating the order of the field
   */
  public void setOrder(int i) {
    put(PdfName.O, new PdfNumber(i));
  }
View Full Code Here

TOP

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

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.