PyPDFForm 1.4.36__py3-none-any.whl → 1.4.37__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/middleware/base.py +13 -1
- PyPDFForm/middleware/text.py +17 -0
- {PyPDFForm-1.4.36.dist-info → PyPDFForm-1.4.37.dist-info}/METADATA +2 -1
- {PyPDFForm-1.4.36.dist-info → PyPDFForm-1.4.37.dist-info}/RECORD +8 -8
- {PyPDFForm-1.4.36.dist-info → PyPDFForm-1.4.37.dist-info}/WHEEL +1 -1
- {PyPDFForm-1.4.36.dist-info → PyPDFForm-1.4.37.dist-info}/LICENSE +0 -0
- {PyPDFForm-1.4.36.dist-info → PyPDFForm-1.4.37.dist-info}/top_level.txt +0 -0
PyPDFForm/__init__.py
CHANGED
PyPDFForm/middleware/base.py
CHANGED
|
@@ -16,7 +16,7 @@ class Widget:
|
|
|
16
16
|
|
|
17
17
|
super().__init__()
|
|
18
18
|
self._name = name
|
|
19
|
-
self.
|
|
19
|
+
self._value = value
|
|
20
20
|
|
|
21
21
|
@property
|
|
22
22
|
def name(self) -> str:
|
|
@@ -24,6 +24,18 @@ class Widget:
|
|
|
24
24
|
|
|
25
25
|
return self._name
|
|
26
26
|
|
|
27
|
+
@property
|
|
28
|
+
def value(self) -> Any:
|
|
29
|
+
"""Value to fill for the widget."""
|
|
30
|
+
|
|
31
|
+
return self._value
|
|
32
|
+
|
|
33
|
+
@value.setter
|
|
34
|
+
def value(self, value: Any) -> None:
|
|
35
|
+
"""Sets value to fill for the widget."""
|
|
36
|
+
|
|
37
|
+
self._value = value
|
|
38
|
+
|
|
27
39
|
@property
|
|
28
40
|
def schema_definition(self) -> dict:
|
|
29
41
|
"""Json schema definition of the widget."""
|
PyPDFForm/middleware/text.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""Contains text middleware."""
|
|
3
3
|
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
4
6
|
from .base import Widget
|
|
5
7
|
|
|
6
8
|
|
|
@@ -27,6 +29,21 @@ class Text(Widget):
|
|
|
27
29
|
self.text_line_x_coordinates = None
|
|
28
30
|
self.preview = False
|
|
29
31
|
|
|
32
|
+
@property
|
|
33
|
+
def value(self) -> Any:
|
|
34
|
+
"""Value to fill for the text field."""
|
|
35
|
+
|
|
36
|
+
if isinstance(self._value, (int, float)):
|
|
37
|
+
return str(self._value)
|
|
38
|
+
|
|
39
|
+
return self._value
|
|
40
|
+
|
|
41
|
+
@value.setter
|
|
42
|
+
def value(self, value: str) -> None:
|
|
43
|
+
"""Sets value to fill for the text field."""
|
|
44
|
+
|
|
45
|
+
self._value = value
|
|
46
|
+
|
|
30
47
|
@property
|
|
31
48
|
def schema_definition(self) -> dict:
|
|
32
49
|
"""Json schema definition of the text field."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyPDFForm
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.37
|
|
4
4
|
Summary: The Python library for PDF forms.
|
|
5
5
|
Home-page: https://github.com/chinapandaman/PyPDFForm
|
|
6
6
|
Author: Jinge Li
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
17
|
Classifier: License :: OSI Approved :: MIT License
|
|
17
18
|
Classifier: Operating System :: OS Independent
|
|
18
19
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
PyPDFForm/__init__.py,sha256=
|
|
1
|
+
PyPDFForm/__init__.py,sha256=c3mPBn4GLmtOK5zrTSR2Rn966Uj7N3n20D6rJnw0pC8,179
|
|
2
2
|
PyPDFForm/adapter.py,sha256=WFP-r8FLeKa-D9mFO9AphOcuXgyeAI1Ak0d-YsqxsK4,861
|
|
3
3
|
PyPDFForm/constants.py,sha256=FMsdOvnYpchEfki3gf_Y2Wj1SThUxMzsPbOx12_S1GA,1738
|
|
4
4
|
PyPDFForm/coordinate.py,sha256=V_ZZQ1pXtVPAyfMJCX7fKoEimK7XwX6bU3VQ0nKOhQA,7314
|
|
@@ -11,20 +11,20 @@ PyPDFForm/utils.py,sha256=9omR-oT3OdZqioxpiGqA9_P0GSFC6mg4Y1xrLvWOzkk,4309
|
|
|
11
11
|
PyPDFForm/watermark.py,sha256=L4LfzjjyJ6TDq9ad2dbtQYheBOic1_oZ7smhFFekNog,4725
|
|
12
12
|
PyPDFForm/wrapper.py,sha256=PRtiLJAtO3Sbpvr3qDy1ElitSRcNghpbkwSSiCMQ-7E,10231
|
|
13
13
|
PyPDFForm/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
PyPDFForm/middleware/base.py,sha256=
|
|
14
|
+
PyPDFForm/middleware/base.py,sha256=GjBiFllppO5Xz8U8cEVBxrmK447bUivvrn_WX1IRow4,1005
|
|
15
15
|
PyPDFForm/middleware/checkbox.py,sha256=3-9CMhhtyO9U6lLXDciW-59ng8uS4m6_clPB02mzV9c,1317
|
|
16
16
|
PyPDFForm/middleware/dropdown.py,sha256=7_DuacMQCRvp2pYxDvzEjUNKDUsTfU0aGTRMBtYWTIA,692
|
|
17
17
|
PyPDFForm/middleware/image.py,sha256=xjPxRiGBWFEU3EQGGqJXY1iMX1kmr0jO8O9iVUC5rcc,177
|
|
18
18
|
PyPDFForm/middleware/radio.py,sha256=ZDrRRF0Tu_3VBQ69x0G-IaZVf8FSOVz8xVpQsyiKhBc,725
|
|
19
19
|
PyPDFForm/middleware/signature.py,sha256=m7tNvGZ7fQ0yuVKzSlLbNQ2IILo1GDnjzMDzMnYCKVM,1104
|
|
20
|
-
PyPDFForm/middleware/text.py,sha256=
|
|
20
|
+
PyPDFForm/middleware/text.py,sha256=PSU-4u54NkefDRM-cMZ-3-hn-fVG6Q3_m3q8JS50dPE,1516
|
|
21
21
|
PyPDFForm/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
22
|
PyPDFForm/widgets/base.py,sha256=nb6HEfRdWSjZc_Th1XI62PIlgREn_JiApGC-epb6jAg,3348
|
|
23
23
|
PyPDFForm/widgets/checkbox.py,sha256=MGB6NGI-XMBz4j2erykgYOCd1pswvthuQ6UFowQOd4o,503
|
|
24
24
|
PyPDFForm/widgets/dropdown.py,sha256=2_R5xcLUWAL0G4raVgWWtE7TJdiWJITay-Gtl8YI2QI,705
|
|
25
25
|
PyPDFForm/widgets/text.py,sha256=sCB8CQAjh30QOGr8FTIDSk3X6dXSHJztOz6YkKEBDss,691
|
|
26
|
-
PyPDFForm-1.4.
|
|
27
|
-
PyPDFForm-1.4.
|
|
28
|
-
PyPDFForm-1.4.
|
|
29
|
-
PyPDFForm-1.4.
|
|
30
|
-
PyPDFForm-1.4.
|
|
26
|
+
PyPDFForm-1.4.37.dist-info/LICENSE,sha256=43awmYkI6opyTpg19me731iO1WfXZwViqb67oWtCsFY,1065
|
|
27
|
+
PyPDFForm-1.4.37.dist-info/METADATA,sha256=pjzxkLQNmIdUgWis6c_CV4EvsRmlV33A5CWxZh2pvuE,4202
|
|
28
|
+
PyPDFForm-1.4.37.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
29
|
+
PyPDFForm-1.4.37.dist-info/top_level.txt,sha256=GQQKuWqPUjT9YZqwK95NlAQzxjwoQrsxQ8ureM8lWOY,10
|
|
30
|
+
PyPDFForm-1.4.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|