PyPDFForm 3.1.1__py3-none-any.whl → 3.1.2__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.
Potentially problematic release.
This version of PyPDFForm might be problematic. Click here for more details.
- PyPDFForm/__init__.py +1 -1
- PyPDFForm/constants.py +0 -1
- PyPDFForm/patterns.py +1 -10
- PyPDFForm/template.py +1 -1
- PyPDFForm/utils.py +0 -2
- {pypdfform-3.1.1.dist-info → pypdfform-3.1.2.dist-info}/METADATA +1 -1
- {pypdfform-3.1.1.dist-info → pypdfform-3.1.2.dist-info}/RECORD +10 -10
- {pypdfform-3.1.1.dist-info → pypdfform-3.1.2.dist-info}/WHEEL +0 -0
- {pypdfform-3.1.1.dist-info → pypdfform-3.1.2.dist-info}/licenses/LICENSE +0 -0
- {pypdfform-3.1.1.dist-info → pypdfform-3.1.2.dist-info}/top_level.txt +0 -0
PyPDFForm/__init__.py
CHANGED
|
@@ -20,7 +20,7 @@ The library supports various PDF form features, including:
|
|
|
20
20
|
PyPDFForm aims to simplify PDF form manipulation, making it accessible to developers of all skill levels.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
__version__ = "3.1.
|
|
23
|
+
__version__ = "3.1.2"
|
|
24
24
|
|
|
25
25
|
from .middleware.text import Text # exposing for setting global font attrs
|
|
26
26
|
from .wrapper import PdfWrapper
|
PyPDFForm/constants.py
CHANGED
PyPDFForm/patterns.py
CHANGED
|
@@ -14,8 +14,7 @@ from pypdf.generic import (ArrayObject, DictionaryObject, NameObject,
|
|
|
14
14
|
NumberObject, TextStringObject)
|
|
15
15
|
|
|
16
16
|
from .constants import (AP, AS, DV, FT, IMAGE_FIELD_IDENTIFIER, JS, SLASH, TU,
|
|
17
|
-
A, Btn, Ch, I, N, Off, Opt, Parent,
|
|
18
|
-
Tx, V, XObject, Yes)
|
|
17
|
+
A, Btn, Ch, I, N, Off, Opt, Parent, Sig, T, Tx, V, Yes)
|
|
19
18
|
from .middleware.checkbox import Checkbox
|
|
20
19
|
from .middleware.dropdown import Dropdown
|
|
21
20
|
from .middleware.image import Image
|
|
@@ -24,14 +23,6 @@ from .middleware.signature import Signature
|
|
|
24
23
|
from .middleware.text import Text
|
|
25
24
|
|
|
26
25
|
WIDGET_TYPE_PATTERNS = [
|
|
27
|
-
# barcode? see pdf_samples/scenario/issues/1087.pdf
|
|
28
|
-
(
|
|
29
|
-
(
|
|
30
|
-
{FT: Tx},
|
|
31
|
-
{AP: {N: {Resources: {XObject: True}}}},
|
|
32
|
-
),
|
|
33
|
-
None,
|
|
34
|
-
),
|
|
35
26
|
(
|
|
36
27
|
({A: {JS: IMAGE_FIELD_IDENTIFIER}},),
|
|
37
28
|
Image,
|
PyPDFForm/template.py
CHANGED
|
@@ -182,7 +182,7 @@ def construct_widget(widget: dict, key: str) -> Union[WIDGET_TYPES, None]:
|
|
|
182
182
|
for pattern in patterns:
|
|
183
183
|
check = check and find_pattern_match(pattern, widget)
|
|
184
184
|
if check:
|
|
185
|
-
result = _type(key)
|
|
185
|
+
result = _type(key)
|
|
186
186
|
break
|
|
187
187
|
return result
|
|
188
188
|
|
PyPDFForm/utils.py
CHANGED
|
@@ -222,8 +222,6 @@ def find_pattern_match(pattern: dict, widget: Union[dict, DictionaryObject]) ->
|
|
|
222
222
|
result = value in pattern[key]
|
|
223
223
|
if not result and SLASH in pattern[key] and value.startswith(SLASH):
|
|
224
224
|
result = True
|
|
225
|
-
elif pattern[key] is True:
|
|
226
|
-
result = True
|
|
227
225
|
else:
|
|
228
226
|
result = pattern[key] == value
|
|
229
227
|
if result:
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
PyPDFForm/__init__.py,sha256=
|
|
1
|
+
PyPDFForm/__init__.py,sha256=6b0B0-Gyc70MQiyWMVmuvBagVeL07jurO3U1j3TQdNs,925
|
|
2
2
|
PyPDFForm/adapter.py,sha256=8E_PZlXU1ALWez_pWF_U52cynzowK_NQFYzMJoH9VUk,2428
|
|
3
|
-
PyPDFForm/constants.py,sha256=
|
|
3
|
+
PyPDFForm/constants.py,sha256=LW_YGzzirel8hxoqWylzo-eE1KvofKWG_p7SGd4ovpA,2456
|
|
4
4
|
PyPDFForm/coordinate.py,sha256=VMVkqa-VAGJSGVvetZwOxeMzIgQtQdvtn_DI_qSecCE,3876
|
|
5
5
|
PyPDFForm/filler.py,sha256=KwStL6YzrNBcDd919ig83MnAxopi8Vnz3QNJzN_CjNM,7272
|
|
6
6
|
PyPDFForm/font.py,sha256=EZSAHnkzaBo96p9XJrQDMcEhjh5BZ8p7WwFC3SbKRMM,8828
|
|
7
7
|
PyPDFForm/hooks.py,sha256=A8p67ubWvCvzRt346Q7BjOvbi4_NXBcynXmq6fJTadY,11679
|
|
8
8
|
PyPDFForm/image.py,sha256=CAC69jEfSbWbyNJcjLhjWVSNJuFh7frMI70eaiFayHw,3823
|
|
9
|
-
PyPDFForm/patterns.py,sha256=
|
|
10
|
-
PyPDFForm/template.py,sha256=
|
|
11
|
-
PyPDFForm/utils.py,sha256=
|
|
9
|
+
PyPDFForm/patterns.py,sha256=RiQKqsOMrB9u4KWj5Kv6GUmcuGI77xMvdOcOcHy_9qE,8717
|
|
10
|
+
PyPDFForm/template.py,sha256=lKkja_8Sx6vun1tOklSpdNT1pdelhfVl10kX-G4sLlA,9673
|
|
11
|
+
PyPDFForm/utils.py,sha256=hLSVUG6qnE0iTMB-yPNQQIhmm3R69X7fcnbCTDvSUQs,11001
|
|
12
12
|
PyPDFForm/watermark.py,sha256=9p1tjaIqicXngTNai_iOEkCoXRYnR66azB4s7wNsZUw,9349
|
|
13
13
|
PyPDFForm/wrapper.py,sha256=Ysd1mkvE5OfDkjUI6mNFIt16-JUKwj2ifbp1MioWPUo,25257
|
|
14
14
|
PyPDFForm/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -28,8 +28,8 @@ PyPDFForm/widgets/image.py,sha256=aSD-3MEZFIRL7HYVuO6Os8irfSUOLHA_rHGkqcEIPPA,85
|
|
|
28
28
|
PyPDFForm/widgets/radio.py,sha256=nWSQQp06kRISO7Q7FVFeB3PXYvMOSc0SMhRs1bHTxeQ,2261
|
|
29
29
|
PyPDFForm/widgets/signature.py,sha256=EqIRIuKSQEg8LJZ_Mu859eEvs0dwO-mzkMNuhHG1Vsg,4034
|
|
30
30
|
PyPDFForm/widgets/text.py,sha256=gtheE6_w0vQPRJJ9oj_l9FaMDEGnPtvVR6_axsrmxKI,1540
|
|
31
|
-
pypdfform-3.1.
|
|
32
|
-
pypdfform-3.1.
|
|
33
|
-
pypdfform-3.1.
|
|
34
|
-
pypdfform-3.1.
|
|
35
|
-
pypdfform-3.1.
|
|
31
|
+
pypdfform-3.1.2.dist-info/licenses/LICENSE,sha256=43awmYkI6opyTpg19me731iO1WfXZwViqb67oWtCsFY,1065
|
|
32
|
+
pypdfform-3.1.2.dist-info/METADATA,sha256=mDwVIYsMYDjn2mGkdAt0a6SVEwhxZqOzgh_cIVQc8RE,4587
|
|
33
|
+
pypdfform-3.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
34
|
+
pypdfform-3.1.2.dist-info/top_level.txt,sha256=GQQKuWqPUjT9YZqwK95NlAQzxjwoQrsxQ8ureM8lWOY,10
|
|
35
|
+
pypdfform-3.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|