Examples of PdfDate


Examples of com.itextpdf.text.pdf.PdfDate

        sap.setCertificate(chain[0]);
        PdfSignature dic = new PdfSignature(PdfName.ADOBE_PPKLITE, sigtype == CryptoStandard.CADES ? PdfName.ETSI_CADES_DETACHED : PdfName.ADBE_PKCS7_DETACHED);
        dic.setReason(sap.getReason());
        dic.setLocation(sap.getLocation());
        dic.setContact(sap.getContact());
        dic.setDate(new PdfDate(sap.getSignDate())); // time-stamp will over-rule this
        sap.setCryptoDictionary(dic);

        HashMap<PdfName, Integer> exc = new HashMap<PdfName, Integer>();
        exc.put(PdfName.CONTENTS, new Integer(estimatedSize * 2 + 2));
        sap.preClose(exc);
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfDate

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

Examples of com.itextpdf.text.pdf.PdfDate

  public PdfObject getValue(String v) {
    switch(fieldType) {
    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(MessageLocalization.getComposedMessage("1.is.not.an.acceptable.value.for.the.field.2", v, get(PdfName.N).toString()));
  }
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfDate

  public PdfObject getValue(String v) {
    switch(fieldType) {
    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(MessageLocalization.getComposedMessage("1.is.not.an.acceptable.value.for.the.field.2", v, get(PdfName.N).toString()));
  }
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfDate

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

Examples of com.itextpdf.text.pdf.PdfDate

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

Examples of com.itextpdf.text.pdf.PdfDate

  public PdfObject getValue(String v) {
    switch(fieldType) {
    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(MessageLocalization.getComposedMessage("1.is.not.an.acceptable.value.for.the.field.2", v, get(PdfName.N).toString()));
  }
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfDate

        PdfSignature dic = new PdfSignature(PdfName.ADOBE_PPKLITE, sigtype == CryptoStandard.CADES ? PdfName.ETSI_CADES_DETACHED : PdfName.ADBE_PKCS7_DETACHED);
        dic.setReason(sap.getReason());
        dic.setLocation(sap.getLocation());
        dic.setSignatureCreator(sap.getSignatureCreator());
        dic.setContact(sap.getContact());
        dic.setDate(new PdfDate(sap.getSignDate())); // time-stamp will over-rule this
        sap.setCryptoDictionary(dic);

        HashMap<PdfName, Integer> exc = new HashMap<PdfName, Integer>();
        exc.put(PdfName.CONTENTS, new Integer(estimatedSize * 2 + 2));
        sap.preClose(exc);
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfDate

        PdfSignature dic = new PdfSignature(null, null);
        dic.setReason(sap.getReason());
        dic.setLocation(sap.getLocation());
        dic.setSignatureCreator(sap.getSignatureCreator());
        dic.setContact(sap.getContact());
        dic.setDate(new PdfDate(sap.getSignDate())); // time-stamp will over-rule this
        externalSignatureContainer.modifySigningDictionary(dic);
        sap.setCryptoDictionary(dic);

        HashMap<PdfName, Integer> exc = new HashMap<PdfName, Integer>();
        exc.put(PdfName.CONTENTS, new Integer(estimatedSize * 2 + 2));
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfDate

      PdfSignature signature = new PdfSignature(PdfName.ADOBE_PPKLITE, PdfName.ADBE_PKCS7_DETACHED);
      signature.setReason(appearance.getReason());
      signature.setLocation(appearance.getLocation());
      signature.setContact(appearance.getContact());
      signature.setDate(new PdfDate(appearance.getSignDate()));

      if ((this.parameters.getSignatureInfo() != null) && (Conditions.isNotEmpty(this.parameters.getSignatureInfo().getName()))) {
        signature.setName(this.parameters.getSignatureInfo().getName());
      } else {
        signature.setName(BouncyCastleProviderHelper.toString(certificate.getSubjectX500Principal()));
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.