Compare commits
3 Commits
ef47e2c1fd
...
300b6f46f1
Author | SHA1 | Date | |
---|---|---|---|
300b6f46f1 | |||
ed81eb749c | |||
41ba98ee91 |
@ -1,5 +1,4 @@
|
||||
import base64
|
||||
import io
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
@ -42,7 +41,7 @@ def on_message(channel, method_frame, header_frame, body):
|
||||
try:
|
||||
box_place = (body_content['signatureZone']['x'], body_content['signatureZone']['y'],
|
||||
body_content['signatureZone']['x'] + body_content['signatureZone']['width'],
|
||||
body_content['signatureZone']['y'] + body_content['signatureZone']['height'])
|
||||
body_content['signatureZone']['y'] - body_content['signatureZone']['height'])
|
||||
LOGGER.debug("will try signature")
|
||||
signed = orchestrator.sign(reason=body_content['reason'], signature_index=body_content['signatureZoneIndex'],
|
||||
box_place=box_place, on_page=body_content['signatureZone']['PDFPage']['index'],
|
||||
@ -59,6 +58,7 @@ def on_message(channel, method_frame, header_frame, body):
|
||||
|
||||
channel.basic_publish(exchange=EXCHANGE_OUT,
|
||||
body=json.dumps({'signatureId': body_content['signatureId'],
|
||||
'signatureZoneIndex': body_content['signatureZoneIndex'],
|
||||
'content': base64.b64encode(signed.read()).decode('utf-8')}),
|
||||
properties=pika.BasicProperties(content_type='application/json',
|
||||
delivery_mode=pika.DeliveryMode.Transient),
|
||||
|
Loading…
Reference in New Issue
Block a user