signature: use PDFSignatureZoneParser in vue app signature

This commit is contained in:
nobohan
2024-07-04 15:17:04 +02:00
parent 5b7e3f0336
commit c428e6665f
4 changed files with 46 additions and 75 deletions

View File

@@ -18,56 +18,7 @@
{% block js %}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
<script type="text/javascript">
const signature = {
id: 1,
// // storedObject: {
// // filename: "gj72nCYsiuysZwZMTMVv5mhqmJdA",
// // keyInfos: {
// // alg: "A256CBC",
// // ext: true,
// // k: "WwEuXQqv5sJFzAM6P5q7Ecvbl2MiA9mE_MTQ1fAhVsY",
// // key_ops: ["encrypt", "decrypt"],
// // kty: "oct",
// // },
// // iv: [
// // 50, 124, 210, 52, 177, 145, 165, 156, 90, 186, 155, 252, 241, 54, 194, 79,
// // ],
// // },
storedObject: {
filename: "U2HmWk5MGkUW1vHRA5sMEMkW9fyf",
keyInfos: {
alg: "A256CBC",
ext: true,
k: "3GmJ8UBck3WhpmdoQy7cGQho0J9k9Rxhn23UIhqvpVY",
key_ops: ["encrypt", "decrypt"],
kty: "oct",
},
iv: [
254, 171, 69, 203, 89, 3, 202, 29, 187, 200, 19, 146, 201, 253, 79, 169,
],
},
zones: [
{
page: 1,
pageWidth: 210,
pageHeight: 297,
x: 21, //from top-left corner
y: 50,
width: 80,
height: 50,
},
{
page: 3,
pageWidth: 210,
pageHeight: 297,
x: 60, //from top-left corner
y: 20,
width: 80,
height: 50,
},
],
};
window.signature = signature;
window.signature = {{ signature|json_encode|raw }};
</script>
{{ encore_entry_script_tags('vue_document_signature') }}
{% endblock %}