By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Close I got an error of "Signature must be closed", else if I don't close it the resulting file is empty 0 B ; tried also without st0. Learn more.

Author:Kigar Zusho
Language:English (Spanish)
Published (Last):7 February 2007
PDF File Size:11.64 Mb
ePub File Size:16.75 Mb
Price:Free* [*Free Regsitration Required]

Takes care of the cryptographic options and appearances that form a signature. Creates a PdfSigner instance. Uses a System. MemoryStream instead of a temporary file. StampingProperties for the signing document. Note that encryption will be preserved regardless of what is set in properties. Returns the document's certification level.

For possible values see SetCertificationLevel int. Provides access to a signature appearance object. Use it to customize the appearance of the signature. PdfSignatureAppearance object. Returns the user made signature dictionary. Sets the name indicating the field to be signed. The field can already be presented in the document but shall not be signed.

If the field is not presented in the document, it will be created. NOTE: This method closes the underlying pdf document. This means, that current instance of PdfSigner cannot be used after this method call.

Sign the document using an external container, usually a PKCS7. The signature is fully composed externally, iText will just put the container inside the document. The document is closed at the end. CMS , CryptoStandard. Detailed Description Takes care of the cryptographic options and appearances that form a signature. CryptoStandard strong.

Enum containing the Cryptographic Standards. Parameters reader PdfReader that reads the PDF file outputStream OutputStream to write the signed PDF file path File to which the output is temporarily written append boolean to indicate whether the signing should happen in append mode or not Exceptions System. Exceptions System. GetCertificationLevel inline virtual.

GetDocument inline virtual. Gets the PdfDocument associated with this instance. Returns the PdfDocument associated with this instance. GetFieldLockDict inline virtual. Getter for the field lock dictionary.

Returns Field lock dictionary. GetFieldName inline virtual. Gets the field name. Returns the field name. GetNewSigFieldName inline virtual. Gets a new signature field name that doesn't clash with any existing name. Returns A new signature field name. GetSignatureAppearance inline virtual. String with the name that doesn't exist in the document or don't specify it at all then the signature is invisible by default.

If you sign already existing field, then the signature appearance object is modified to have all the properties page num. String call you'll have to do it again Returns PdfSignatureAppearance object. GetSignatureDictionary inline virtual. Returns The user made signature dictionary.

ISignatureEvent iText. GetSignatureEvent inline virtual. Getter for property signatureEvent. Returns Value of property signatureEvent. GetSignDate inline virtual. Gets the signature date. Returns Calendar set to the signature date.

Sets the document's certification level. Parameters certificationLevel a new certification level for a document. Setter for the field lock dictionary. Parameters fieldLock Field lock dictionary. Parameters fieldName The name indicating the field to be signed. Setter for the OutputStream. Parameters originalOS OutputStream for the bytes of the document.

SetSignatureEvent PdfSigner. Sets the signature event to allow modification of the signature dictionary. Parameters signatureEvent the signature event. Sets the signature date. Parameters signDate the signature date. Signs a PDF where space was already reserved. Parameters document the original PDF fieldName the field to sign. It must be the last field outs the output PDF externalSignatureContainer the signature container doing the actual signing.

Only the method ExternalSignatureContainer. IOException Exceptions Org. Parameters externalSignature the interface providing the actual signing chain the certificate chain crlList the CRL list ocspClient the OCSP client tsaClient the Timestamp client externalDigest an implementation that provides the digest estimatedSize the reserved size for the signature.

It will be estimated if 0 sigtype Either Signature. CMS or Signature. Parameters externalSignatureContainer the interface providing the actual signing estimatedSize the reserved size for the signature Exceptions Org.

GeneralSecurityException Exceptions System. Parameters tsa the timestamp generator signatureName the signature name or null to have a name generated automatically Exceptions System.

An interface to retrieve the signature dictionary for modification. SetCertificationLevel int certificationLevel. ISignatureEvent signatureEvent. SetFieldName String fieldName. CryptoStandard sigtype. Static Public Member Functions. Static Public Attributes. Approval signature. Author signature, no changes allowed. Author signature, form filling allowed. Author signature, form filling and annotations allowed.

Exceptions Org.


Add Digital Signature Fields in existing pdf


IEC 62109-1 PDF

Chapter 12. Protecting your PDF


Related Articles