Class Signature
java.lang.Object
com.ironsoftware.ironpdf.signature.Signature
A class that represents a PDF signing certificate (.PFX or .p12) format which can be used to digitally sign a
 PDF. This protecting it from alteration.
- 
Constructor SummaryConstructorsConstructorDescriptionInitializes a new instance of theSignatureclass.Signature(byte[] certificateRawData, String password, Instant signatureDate, byte[] signatureImage, String signingContact, String signingLocation, String signingReason) Initializes a new instance of theSignatureclass.Initializes a new instance of theSignatureclass using a .pfx or .p12 digital signature file.Initializes a new instance of theSignatureclass using a .pfx or .p12 digital signature file.
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]Get certificate raw data byte [ ].Gets password.Gets signature date.byte[]Get signature image.Gets signing contact.Gets signing location.Gets signing reason.voidsetCertificateRawData(byte[] certificateRawData) Sets certificate raw data.voidsetPassword(String password) Sets password.voidsetSignatureDate(Instant signatureDate) Sets signature date.voidsetSignatureImage(byte[] signatureImage) Sets signature image.voidsetSigningContact(String signingContact) Sets signing contact.voidsetSigningLocation(String signingLocation) Sets signing location.voidsetSigningReason(String signingReason) Sets signing reason.
- 
Constructor Details- 
SignatureInitializes a new instance of theSignatureclass using a .pfx or .p12 digital signature file.- Parameters:
- filePathToCertificate- The file path to certificate.
- password- The certificate's password.
- Throws:
- IOException- if an I/O error occurs reading from the stream
 
- 
SignatureInitializes a new instance of theSignatureclass using a .pfx or .p12 digital signature file.- Parameters:
- filePathToCertificate- The file path to certificate.
- password- The certificate's password.
- Throws:
- IOException- if an I/O error occurs reading from the stream
 
- 
SignatureInitializes a new instance of theSignatureclass.- Parameters:
- certificateRawData- The certificate as a binary data (byte array).
- password- The certificate's password.
 
- 
Signaturepublic Signature(byte[] certificateRawData, String password, Instant signatureDate, byte[] signatureImage, String signingContact, String signingLocation, String signingReason) Initializes a new instance of theSignatureclass.- Parameters:
- certificateRawData- the certificate as a binary data (byte array).
- password- the certificate's password.
- signatureDate- the date and time of the digital signature. If left null, the signature will be timestamped at the millisecond that the PdfDocument is saved to Disk or Stream.
- signatureImage- a visual image for the sign, often a PNG of a human signature or company stamp (optional).- This appends a visual signature in addition to cryptographic signing. 
- signingContact- the contact person or email address for signing related inquiries (optional).
- signingLocation- the physical location the PDF was signed (optional).
- signingReason- the reason the PDF was signed (optional).
 
 
- 
- 
Method Details- 
getCertificateRawDatapublic byte[] getCertificateRawData()Get certificate raw data byte [ ].- Returns:
- the byte [ ]
 
- 
setCertificateRawDatapublic void setCertificateRawData(byte[] certificateRawData) Sets certificate raw data.- Parameters:
- certificateRawData- the certificate raw data
 
- 
getSignatureDateGets signature date. The date and time of the digital signature. If left null, the signature will be timestamped at the millisecond that the PdfDocument is saved to Disk or Stream.- Returns:
- the signature date
 
- 
setSignatureDateSets signature date. The date and time of the digital signature. If left null, the signature will be timestamped at the millisecond that the PdfDocument is saved to Disk or Stream.- Parameters:
- signatureDate- the signature date
 
- 
getSignatureImagepublic byte[] getSignatureImage()Get signature image. A visual image for the sign, often a PNG of a human signature or company stamp (optional).This appends a visual signature in addition to cryptographic signing. - Returns:
- the image byte[]
 
- 
setSignatureImagepublic void setSignatureImage(byte[] signatureImage) Sets signature image. A visual image for the sign, often a PNG of a human signature or company stamp (optional).This appends a visual signature in addition to cryptographic signing. - Parameters:
- signatureImage- the signature image
 
- 
getSigningContactGets signing contact. The contact person or email address for signing related inquiries (optional).- Returns:
- the signing contact
 
- 
setSigningContactSets signing contact. The contact person or email address for signing related inquiries (optional).- Parameters:
- signingContact- the signing contact
 
- 
getSigningLocationGets signing location. The physical location the PDF was signed (optional).- Returns:
- the signing location
 
- 
setSigningLocationSets signing location. The physical location the PDF was signed (optional).- Parameters:
- signingLocation- the signing location
 
- 
getSigningReasonGets signing reason. The reason the PDF was signed (optional).- Returns:
- the signing reason
 
- 
setSigningReasonSets signing reason. The reason the PDF was signed (optional).- Parameters:
- signingReason- the signing reason
 
- 
getPasswordGets password.- Returns:
- the password
 
- 
setPasswordSets password.- Parameters:
- password- the password
 
 
-