PyPDFForm 1.4.18__tar.gz → 1.4.19__tar.gz
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-1.4.18 → pypdfform-1.4.19}/PKG-INFO +1 -2
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/__init__.py +1 -1
- pypdfform-1.4.19/PyPDFForm/widgets/checkbox.py +19 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/widgets/dropdown.py +6 -1
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/widgets/text.py +4 -1
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm.egg-info/PKG-INFO +1 -2
- {pypdfform-1.4.18 → pypdfform-1.4.19}/README.md +0 -1
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_create_widget.py +18 -1
- pypdfform-1.4.18/PyPDFForm/widgets/checkbox.py +0 -11
- {pypdfform-1.4.18 → pypdfform-1.4.19}/LICENSE +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/adapter.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/constants.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/coordinate.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/filler.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/font.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/image.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/__init__.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/base.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/checkbox.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/dropdown.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/radio.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/signature.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/middleware/text.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/patterns.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/template.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/utils.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/watermark.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/widgets/__init__.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/widgets/base.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm/wrapper.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm.egg-info/SOURCES.txt +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm.egg-info/dependency_links.txt +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm.egg-info/requires.txt +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/PyPDFForm.egg-info/top_level.txt +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/setup.cfg +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/setup.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_dropdown.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_dropdown_simple.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_fill_max_length_text_field.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_fill_max_length_text_field_simple.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_functional.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_functional_simple.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_paragraph.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_paragraph_simple.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_preview.py +0 -0
- {pypdfform-1.4.18 → pypdfform-1.4.19}/tests/test_signature.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyPDFForm
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.19
|
|
4
4
|
Summary: The Python library for PDF forms.
|
|
5
5
|
Home-page: https://github.com/chinapandaman/PyPDFForm
|
|
6
6
|
Author: Jinge Li
|
|
@@ -29,7 +29,6 @@ Requires-Dist: reportlab
|
|
|
29
29
|
<p align="center">
|
|
30
30
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-black-isort.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-black-isort.yml/badge.svg"></a>
|
|
31
31
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml/badge.svg"></a>
|
|
32
|
-
<a href="https://codecov.io/gh/chinapandaman/PyPDFForm"><img src="https://codecov.io/gh/chinapandaman/PyPDFForm/branch/master/graph/badge.svg?token=CSRLN14IFE"></a>
|
|
33
32
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-publish.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-publish.yml/badge.svg"></a>
|
|
34
33
|
<a href="https://pepy.tech/project/pypdfform"><img src="https://static.pepy.tech/personalized-badge/pypdfform?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads"></a>
|
|
35
34
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-orange.svg"></a>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""Contains checkbox widget to create."""
|
|
3
|
+
|
|
4
|
+
from .base import Widget
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CheckBoxWidget(Widget):
|
|
8
|
+
"""Checkbox widget to create."""
|
|
9
|
+
|
|
10
|
+
USER_PARAMS = [
|
|
11
|
+
("size", "size"),
|
|
12
|
+
("button_style", "buttonStyle"),
|
|
13
|
+
("tick_color", "textColor"),
|
|
14
|
+
("bg_color", "fillColor"),
|
|
15
|
+
("border_color", "borderColor"),
|
|
16
|
+
("border_width", "borderWidth"),
|
|
17
|
+
]
|
|
18
|
+
COLOR_PARAMS = ["tick_color", "bg_color", "border_color"]
|
|
19
|
+
ACRO_FORM_FUNC = "checkbox"
|
|
@@ -7,6 +7,8 @@ from .base import Widget
|
|
|
7
7
|
class DropdownWidget(Widget):
|
|
8
8
|
"""Dropdown widget to create."""
|
|
9
9
|
|
|
10
|
+
# pylint: disable=R0801
|
|
11
|
+
|
|
10
12
|
USER_PARAMS = [
|
|
11
13
|
("width", "width"),
|
|
12
14
|
("height", "height"),
|
|
@@ -14,8 +16,11 @@ class DropdownWidget(Widget):
|
|
|
14
16
|
("font", "fontName"),
|
|
15
17
|
("font_size", "fontSize"),
|
|
16
18
|
("font_color", "textColor"),
|
|
19
|
+
("bg_color", "fillColor"),
|
|
20
|
+
("border_color", "borderColor"),
|
|
21
|
+
("border_width", "borderWidth"),
|
|
17
22
|
]
|
|
18
|
-
COLOR_PARAMS = ["font_color"]
|
|
23
|
+
COLOR_PARAMS = ["font_color", "bg_color", "border_color"]
|
|
19
24
|
ACRO_FORM_FUNC = "_textfield"
|
|
20
25
|
|
|
21
26
|
def __init__(
|
|
@@ -14,7 +14,10 @@ class TextWidget(Widget):
|
|
|
14
14
|
("font", "fontName"),
|
|
15
15
|
("font_size", "fontSize"),
|
|
16
16
|
("font_color", "textColor"),
|
|
17
|
+
("bg_color", "fillColor"),
|
|
18
|
+
("border_color", "borderColor"),
|
|
19
|
+
("border_width", "borderWidth"),
|
|
17
20
|
]
|
|
18
|
-
COLOR_PARAMS = ["font_color"]
|
|
21
|
+
COLOR_PARAMS = ["font_color", "bg_color", "border_color"]
|
|
19
22
|
NONE_DEFAULTS = ["max_length"]
|
|
20
23
|
ACRO_FORM_FUNC = "textfield"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyPDFForm
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.19
|
|
4
4
|
Summary: The Python library for PDF forms.
|
|
5
5
|
Home-page: https://github.com/chinapandaman/PyPDFForm
|
|
6
6
|
Author: Jinge Li
|
|
@@ -29,7 +29,6 @@ Requires-Dist: reportlab
|
|
|
29
29
|
<p align="center">
|
|
30
30
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-black-isort.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-black-isort.yml/badge.svg"></a>
|
|
31
31
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml/badge.svg"></a>
|
|
32
|
-
<a href="https://codecov.io/gh/chinapandaman/PyPDFForm"><img src="https://codecov.io/gh/chinapandaman/PyPDFForm/branch/master/graph/badge.svg?token=CSRLN14IFE"></a>
|
|
33
32
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-publish.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-publish.yml/badge.svg"></a>
|
|
34
33
|
<a href="https://pepy.tech/project/pypdfform"><img src="https://static.pepy.tech/personalized-badge/pypdfform?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads"></a>
|
|
35
34
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-orange.svg"></a>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<p align="center">
|
|
3
3
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-black-isort.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-black-isort.yml/badge.svg"></a>
|
|
4
4
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-package.yml/badge.svg"></a>
|
|
5
|
-
<a href="https://codecov.io/gh/chinapandaman/PyPDFForm"><img src="https://codecov.io/gh/chinapandaman/PyPDFForm/branch/master/graph/badge.svg?token=CSRLN14IFE"></a>
|
|
6
5
|
<a href="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-publish.yml/badge.svg"><img src="https://github.com/chinapandaman/PyPDFForm/actions/workflows/python-publish.yml/badge.svg"></a>
|
|
7
6
|
<a href="https://pepy.tech/project/pypdfform"><img src="https://static.pepy.tech/personalized-badge/pypdfform?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads"></a>
|
|
8
7
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-orange.svg"></a>
|
|
@@ -68,8 +68,19 @@ def test_create_checkbox_complex(template_stream, pdf_samples, request):
|
|
|
68
68
|
expected_path = os.path.join(pdf_samples, "widget", "create_checkbox_complex.pdf")
|
|
69
69
|
with open(expected_path, "rb+") as f:
|
|
70
70
|
obj = PdfWrapper(template_stream).create_widget(
|
|
71
|
-
"checkbox",
|
|
71
|
+
"checkbox",
|
|
72
|
+
"foo",
|
|
73
|
+
1,
|
|
74
|
+
100,
|
|
75
|
+
100,
|
|
76
|
+
size=100,
|
|
77
|
+
button_style="check",
|
|
78
|
+
tick_color=(0, 1, 0),
|
|
79
|
+
bg_color=(0, 0, 1),
|
|
80
|
+
border_color=(1, 0, 0),
|
|
81
|
+
border_width=5,
|
|
72
82
|
)
|
|
83
|
+
|
|
73
84
|
assert obj.schema["properties"]["foo"]["type"] == "boolean"
|
|
74
85
|
|
|
75
86
|
request.config.results["expected_path"] = expected_path
|
|
@@ -225,6 +236,9 @@ def test_create_text_complex(template_stream, pdf_samples, request):
|
|
|
225
236
|
font="Times-Roman",
|
|
226
237
|
font_size=50,
|
|
227
238
|
font_color=(1, 0.5, 1),
|
|
239
|
+
bg_color=(0, 0, 1),
|
|
240
|
+
border_color=(1, 0, 0),
|
|
241
|
+
border_width=5,
|
|
228
242
|
)
|
|
229
243
|
assert obj.schema["properties"]["foo"]["type"] == "string"
|
|
230
244
|
assert obj.schema["properties"]["foo"]["maxLength"] == 2
|
|
@@ -363,6 +377,9 @@ def test_create_dropdown(template_stream, pdf_samples, request):
|
|
|
363
377
|
font="Courier",
|
|
364
378
|
font_size=15,
|
|
365
379
|
font_color=(1, 0, 0),
|
|
380
|
+
bg_color=(0, 0, 1),
|
|
381
|
+
border_color=(1, 0, 0),
|
|
382
|
+
border_width=5,
|
|
366
383
|
)
|
|
367
384
|
assert obj.schema["properties"]["new_dropdown_widget"]["type"] == "integer"
|
|
368
385
|
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
"""Contains checkbox widget to create."""
|
|
3
|
-
|
|
4
|
-
from .base import Widget
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class CheckBoxWidget(Widget):
|
|
8
|
-
"""Checkbox widget to create."""
|
|
9
|
-
|
|
10
|
-
USER_PARAMS = [("size", "size"), ("button_style", "buttonStyle")]
|
|
11
|
-
ACRO_FORM_FUNC = "checkbox"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|