| Modifier and Type | Field and Description |
|---|---|
| private File | |
| private boolean | |
| private SignatureOptions |
| Access | Constructor and Description |
|---|---|
| public | CreateVisibleSignature2(KeyStore
is a pkcs12 keystore. keystore, char[] is the pin for the keystore / private key pin)Initialize the signature creator with a keystore (pkcs12) and pin that should be used for the signature. |
| Modifier and Type | Method and Description |
|---|---|
| private PDRectangle | |
| private InputStream | createVisualSignatureTemplate(PDDocument srcDoc, int pageNum, PDRectangle rect, PDSignature signature)
|
| private PDSignature | |
| public File | |
| public boolean | |
| public static void | |
| public void | |
| public void | |
| public void | signPDF(File
The source pdf document file. inputFile, File The file to be signed. signedFile, Rectangle2D rectangle from a human viewpoint (coordinates start at top left) humanRect, String optional TSA url tsaUrl)Sign pdf file and create new file that ends with "_signed.pdf". |
| public void | signPDF(File
The source pdf document file. inputFile, File The file to be signed. signedFile, Rectangle2D rectangle from a human viewpoint (coordinates start at top left) humanRect, String optional TSA url tsaUrl, String optional name of an existing (unsigned) signature field signatureFieldName)Sign pdf file and create new file that ends with "_signed.pdf". |
| private static void |
| imageFile | back to summary |
|---|---|
| private File imageFile | |
| lateExternalSigning | back to summary |
|---|---|
| private boolean lateExternalSigning | |
| signatureOptions | back to summary |
|---|---|
| private SignatureOptions signatureOptions | |
| CreateVisibleSignature2 | back to summary |
|---|---|
| public CreateVisibleSignature2(KeyStore keystore, char[] pin) throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, IOException, CertificateException Initialize the signature creator with a keystore (pkcs12) and pin that should be used for the signature.
| |
| createSignatureRectangle | back to summary |
|---|---|
| private PDRectangle createSignatureRectangle(PDDocument doc, Rectangle2D humanRect) | |
| createVisualSignatureTemplate | back to summary |
|---|---|
| private InputStream createVisualSignatureTemplate(PDDocument srcDoc, int pageNum, PDRectangle rect, PDSignature signature) throws IOException | |
| findExistingSignature | back to summary |
|---|---|
| private PDSignature findExistingSignature(PDAcroForm acroForm, String sigFieldName) | |
| getImageFile | back to summary |
|---|---|
| public File getImageFile() | |
| isLateExternalSigning | back to summary |
|---|---|
| public boolean isLateExternalSigning() | |
| main | back to summary |
|---|---|
| public static void main(String[] args) throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException, UnrecoverableKeyException Arguments are [0] key store [1] pin [2] document that will be signed [3] image of visible signature | |
| setImageFile | back to summary |
|---|---|
| public void setImageFile(File imageFile) | |
| setLateExternalSigning | back to summary |
|---|---|
| public void setLateExternalSigning(boolean lateExternalSigning) Set late external signing. Enable this if you want to activate the demo code where the signature is kept and added in an extra step without using PDFBox methods. This is disabled by default. | |
| signPDF | back to summary |
|---|---|
| public void signPDF(File inputFile, File signedFile, Rectangle2D humanRect, String tsaUrl) throws IOException Sign pdf file and create new file that ends with "_signed.pdf".
| |
| signPDF | back to summary |
|---|---|
| public void signPDF(File inputFile, File signedFile, Rectangle2D humanRect, String tsaUrl, String signatureFieldName) throws IOException Sign pdf file and create new file that ends with "_signed.pdf".
| |
| usage | back to summary |
|---|---|
| private static void usage() This will print the usage for this program. | |