caerp-sign-pdf 2024.1.3__py3-none-any.whl → 2024.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- caerp_sign_pdf/public.py +4 -0
- {caerp_sign_pdf-2024.1.3.dist-info → caerp_sign_pdf-2024.1.4.dist-info}/METADATA +3 -3
- caerp_sign_pdf-2024.1.4.dist-info/RECORD +8 -0
- {caerp_sign_pdf-2024.1.3.dist-info → caerp_sign_pdf-2024.1.4.dist-info}/WHEEL +1 -1
- caerp_sign_pdf-2024.1.3.dist-info/RECORD +0 -8
- {caerp_sign_pdf-2024.1.3.dist-info → caerp_sign_pdf-2024.1.4.dist-info}/LICENSE.txt +0 -0
- {caerp_sign_pdf-2024.1.3.dist-info → caerp_sign_pdf-2024.1.4.dist-info}/top_level.txt +0 -0
caerp_sign_pdf/public.py
CHANGED
|
@@ -4,6 +4,7 @@ import hashlib
|
|
|
4
4
|
|
|
5
5
|
from io import BytesIO
|
|
6
6
|
from pyhanko.pdf_utils.incremental_writer import IncrementalPdfFileWriter
|
|
7
|
+
from pyhanko.pdf_utils.xref import ObjectHeaderReadError
|
|
7
8
|
from pyhanko.sign import fields, signers
|
|
8
9
|
from pyhanko.sign.general import SigningError
|
|
9
10
|
from pyhanko.stamp import TextStampStyle
|
|
@@ -136,6 +137,9 @@ class SignPDFService(object):
|
|
|
136
137
|
except SigningError:
|
|
137
138
|
logger.warn("File is already signed, nothing to do")
|
|
138
139
|
return True
|
|
140
|
+
except ObjectHeaderReadError as error:
|
|
141
|
+
logger.error(f"Error while reading Xref header : {error}")
|
|
142
|
+
raise HTTPUnsupportedMediaType(ERROR_PDF_FORMAT_MSG)
|
|
139
143
|
|
|
140
144
|
# Sign PDF
|
|
141
145
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 2024.1.
|
|
2
|
+
Name: caerp_sign_pdf
|
|
3
|
+
Version: 2024.1.4
|
|
4
4
|
Summary: caerp_sign_pdf
|
|
5
5
|
Home-page: https://framagit.org/caerp/caerp_sign_pdf
|
|
6
6
|
Author: Kilya
|
|
@@ -14,7 +14,7 @@ Classifier: Topic :: Internet :: WWW/HTTP
|
|
|
14
14
|
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
|
|
15
15
|
Description-Content-Type: text/x-rst
|
|
16
16
|
License-File: LICENSE.txt
|
|
17
|
-
Requires-Dist: pyHanko[image-support,opentype,pkcs11,xmp]
|
|
17
|
+
Requires-Dist: pyHanko[image-support,opentype,pkcs11,xmp] ==0.25.1
|
|
18
18
|
|
|
19
19
|
CAERP Sign PDF
|
|
20
20
|
======================================================
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
caerp_sign_pdf/__init__.py,sha256=vT-YO-kLKOqDIFKyVo_YGpLvZMZNNonAksW7dVWaScs,192
|
|
2
|
+
caerp_sign_pdf/models.py,sha256=R_-jV-hO0Pm4_Rd1evyNerx8vuXELhMecNODdI598B4,592
|
|
3
|
+
caerp_sign_pdf/public.py,sha256=Ocb7dULKWAz_Jhumb9SWOvAoPQ8cY1Jy3Aa3s3_tqV8,6090
|
|
4
|
+
caerp_sign_pdf-2024.1.4.dist-info/LICENSE.txt,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
5
|
+
caerp_sign_pdf-2024.1.4.dist-info/METADATA,sha256=9JAUmLKLwZHRGuOx7pZuvtLlowohjh9vWXTIUlhkMi0,2399
|
|
6
|
+
caerp_sign_pdf-2024.1.4.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
7
|
+
caerp_sign_pdf-2024.1.4.dist-info/top_level.txt,sha256=kNSdxjlamRUTFu_IvJHzd1pJIv12fmuWotrcJ2sRgEw,15
|
|
8
|
+
caerp_sign_pdf-2024.1.4.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
caerp_sign_pdf/__init__.py,sha256=vT-YO-kLKOqDIFKyVo_YGpLvZMZNNonAksW7dVWaScs,192
|
|
2
|
-
caerp_sign_pdf/models.py,sha256=R_-jV-hO0Pm4_Rd1evyNerx8vuXELhMecNODdI598B4,592
|
|
3
|
-
caerp_sign_pdf/public.py,sha256=jZ7BZkOSQVBZ6loebSwduEGcydthRx06rmtO891n14A,5850
|
|
4
|
-
caerp_sign_pdf-2024.1.3.dist-info/LICENSE.txt,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
|
5
|
-
caerp_sign_pdf-2024.1.3.dist-info/METADATA,sha256=VNsy8FY9x8hz6OMp4opl2w8nnFO_cbzSEd9nvECU-uA,2401
|
|
6
|
-
caerp_sign_pdf-2024.1.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
7
|
-
caerp_sign_pdf-2024.1.3.dist-info/top_level.txt,sha256=kNSdxjlamRUTFu_IvJHzd1pJIv12fmuWotrcJ2sRgEw,15
|
|
8
|
-
caerp_sign_pdf-2024.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|