Package com.itextpdf.text.pdf

Examples of com.itextpdf.text.pdf.PdfStamper


      DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
      Calendar calendar = Calendar.getInstance();

      PdfReader reader = new PdfReader(data);
      PdfStamper stamper = PdfStamper.createSignature(reader, outputStream, PDFSigner.PDF_SIGNATURE_VERSION, null, true);

      PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
      appearance.setCrypto(privateKey, chain, null, PdfSignatureAppearance.SELF_SIGNED);
      appearance.setContact(this.request.getContactInfo());
      appearance.setLocation(this.request.getLocation());
      appearance.setReason(this.request.getReason());
      appearance.setSignDate(calendar);
View Full Code Here


      DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
      Calendar calendar = Calendar.getInstance();

      PdfReader reader = new PdfReader(data);
      PdfStamper stamper = PdfStamper.createSignature(reader, outputStream, PDFSigner.PDF_SIGNATURE_VERSION, null, true);

      PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
      appearance.setCrypto(privateKey, chain, null, PdfSignatureAppearance.SELF_SIGNED);
      appearance.setContact(this.parameters.getContactInfo());
      appearance.setLocation(this.parameters.getLocation());
      appearance.setReason(this.parameters.getReason());
      appearance.setSignDate(calendar);
View Full Code Here

      DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
      Calendar calendar = Calendar.getInstance();

      PdfReader reader = new PdfReader(data);
      PdfStamper stamper = PdfStamper.createSignature(reader, outputStream, PDFSigner.PDF_SIGNATURE_VERSION, null, true);

      PdfSignatureAppearance appearance = stamper.getSignatureAppearance();

      if (this.parameters.getSignatureInfo() != null) {
        appearance.setContact(this.parameters.getSignatureInfo().getContactInfo());
        appearance.setLocation(this.parameters.getSignatureInfo().getLocation());
        appearance.setReason(this.parameters.getSignatureInfo().getReason());
View Full Code Here

  }

  public boolean open(String inpSrc, String destSrc, String latexSrc) throws Exception
  {
    reader = new PdfReader(inpSrc);
    stamper = new PdfStamper(reader, new FileOutputStream(destSrc));
    this.latexSrc = latexSrc;
    return stamper!= null;
  }
View Full Code Here

      DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
      Calendar calendar = Calendar.getInstance();

      PdfReader reader = new PdfReader(data);
      PdfStamper stamper = PdfStamper.createSignature(reader, outputStream, PDFSigner.PDF_SIGNATURE_VERSION, null, true);

      PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
      appearance.setCrypto(privateKey, chain, null, PdfSignatureAppearance.SELF_SIGNED);
      appearance.setContact(this.parameters.getContactInfo());
      appearance.setLocation(this.parameters.getLocation());
      appearance.setReason(this.parameters.getReason());
      appearance.setSignDate(calendar);
View Full Code Here

    public static void execute(Config config)
        throws IOException, DocumentException
    {
        PdfReader reader = new PdfReader(config.pdfInputStream);
        PdfStamper stamper = new PdfStamper(reader, config.pdfOutputStream, '\0');
        if (config.formInputStream != null) {
            stamper.getAcroFields().setFields(new XfdfReader(config.formInputStream));
        }
        stamper.setFormFlattening(config.flatten);
        stamper.close();
    }
View Full Code Here

      DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
      Calendar calendar = Calendar.getInstance();

      PdfReader reader = new PdfReader(data);
      PdfStamper stamper = PdfStamper.createSignature(reader, outputStream, PDFSigner.PDF_SIGNATURE_VERSION, null, true);

      PdfSignatureAppearance appearance = stamper.getSignatureAppearance();

      if (this.parameters.getSignatureInfo() != null) {
        appearance.setContact(this.parameters.getSignatureInfo().getContactInfo());
        appearance.setLocation(this.parameters.getSignatureInfo().getLocation());
        appearance.setReason(this.parameters.getSignatureInfo().getReason());
View Full Code Here

      DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
      Calendar calendar = Calendar.getInstance();

      PdfReader reader = new PdfReader(data);
      PdfStamper stamper = PdfStamper.createSignature(reader, outputStream, PDFSigner.PDF_SIGNATURE_VERSION, null, true);

      PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
      appearance.setCrypto(privateKey, chain, null, PdfSignatureAppearance.SELF_SIGNED);

      if (this.parameters.getSignatureInfo() != null) {
        appearance.setContact(this.parameters.getSignatureInfo().getContactInfo());
        appearance.setLocation(this.parameters.getSignatureInfo().getLocation());
View Full Code Here

TOP

Related Classes of com.itextpdf.text.pdf.PdfStamper

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.