diff --git a/assets/pdfs/misc/4-rects-signed-and-locked.pdf b/assets/pdfs/misc/4-rects-signed-and-locked.pdf
new file mode 100644
index 0000000..1fd7cf8
Binary files /dev/null and b/assets/pdfs/misc/4-rects-signed-and-locked.pdf differ
diff --git a/public/demos/5-Signer/4-various/1-get-existing-signature-fields/script.php b/public/demos/5-Signer/4-various/1-get-existing-signature-fields/script.php
index 26e6dbf..9df40d9 100644
--- a/public/demos/5-Signer/4-various/1-get-existing-signature-fields/script.php
+++ b/public/demos/5-Signer/4-various/1-get-existing-signature-fields/script.php
@@ -7,7 +7,8 @@
$assetsDirectory . '/pdfs/tektown/Laboratory-Report-signed.pdf',
$assetsDirectory . '/pdfs/tektown/Laboratory-Report-signed-no-LTV.pdf',
$assetsDirectory . '/pdfs/tektown/Order-Form.pdf',
- $assetsDirectory . '/pdfs/lenstown/Laboratory-Report-signed-PAdES.pdf'
+ $assetsDirectory . '/pdfs/lenstown/Laboratory-Report-signed-PAdES.pdf',
+ $assetsDirectory . '/pdfs/misc/4-rects-signed-and-locked.pdf'
];
$path = displayFiles($files);
@@ -23,5 +24,22 @@
echo 'NOT';
}
- echo ' used/signed.
';
+ echo ' used/signed.
';
+ $lock = $field->getLock();
+ if (is_array($lock)) {
+ if ($lock['action'] === SetaPDF_Signer_SignatureField::LOCK_DOCUMENT_ALL) {
+ echo ' The document is locked by "' . htmlspecialchars($signatureFieldName) . '"
';
+ } elseif ($lock['action'] === SetaPDF_Signer_SignatureField::LOCK_DOCUMENT_INCLUDE) {
+ echo ' Fields are locked by "' . htmlspecialchars($signatureFieldName) . '"
';
+ echo '
'; + var_dump(array_map(['SetaPDF_Core_Encoding', 'convertPdfString'], $lock['fields'])); + echo ''; + } elseif ($lock['action'] === SetaPDF_Signer_SignatureField::LOCK_DOCUMENT_EXCLUDE) { + echo ' Fields are not locked by "' . htmlspecialchars($signatureFieldName) . '"
'; + var_dump(array_map(['SetaPDF_Core_Encoding', 'convertPdfString'], $lock['fields'])); + echo ''; + } + } + echo '