PyPDFForm 2.0.0__tar.gz → 2.0.1__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-2.0.0 → pypdfform-2.0.1}/PKG-INFO +1 -1
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/__init__.py +1 -1
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/patterns.py +4 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/utils.py +4 -3
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/PKG-INFO +1 -1
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_create_widget.py +16 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/LICENSE +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/adapter.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/constants.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/coordinate.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/filler.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/font.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/image.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/__init__.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/base.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/checkbox.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/dropdown.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/image.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/radio.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/signature.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/text.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/template.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/watermark.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/__init__.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/base.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/checkbox.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/dropdown.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/text.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/wrapper.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/SOURCES.txt +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/dependency_links.txt +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/requires.txt +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/top_level.txt +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/README.md +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/setup.cfg +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/setup.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_adobe_mode.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_dropdown.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_dropdown_simple.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_fill_max_length_text_field.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_fill_max_length_text_field_simple.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_fill_method.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_functional.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_functional_simple.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_paragraph.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_paragraph_simple.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_preview.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_signature.py +0 -0
- {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_use_full_widget_name.py +0 -0
|
@@ -39,9 +39,10 @@ def handle_color(color: Union[list, ArrayObject]) -> Union[Color, CMYKColor, Non
|
|
|
39
39
|
result = CMYKColor(black=1 - color[0])
|
|
40
40
|
elif len(color) == 3:
|
|
41
41
|
result = Color(red=color[0], green=color[1], blue=color[2])
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
elif len(color) == 4:
|
|
43
|
+
result = CMYKColor(
|
|
44
|
+
cyan=color[0], magenta=color[1], yellow=color[2], black=color[3]
|
|
45
|
+
)
|
|
45
46
|
|
|
46
47
|
return result
|
|
47
48
|
|
|
@@ -482,3 +482,19 @@ def test_create_dropdown(template_stream, pdf_samples, request):
|
|
|
482
482
|
|
|
483
483
|
assert len(obj.stream) == len(expected)
|
|
484
484
|
assert obj.stream == expected
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
def test_fill_cmyk_color(pdf_samples, request):
|
|
488
|
+
expected_path = os.path.join(pdf_samples, "widget", "test_fill_cmyk_color.pdf")
|
|
489
|
+
with open(expected_path, "rb+") as f:
|
|
490
|
+
obj = PdfWrapper(
|
|
491
|
+
os.path.join(pdf_samples, "widget", "sample_template_with_cmyk_color.pdf")
|
|
492
|
+
).fill({"foo": "foo"})
|
|
493
|
+
|
|
494
|
+
request.config.results["expected_path"] = expected_path
|
|
495
|
+
request.config.results["stream"] = obj.read()
|
|
496
|
+
|
|
497
|
+
expected = f.read()
|
|
498
|
+
|
|
499
|
+
assert len(obj.stream) == len(expected)
|
|
500
|
+
assert obj.stream == expected
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|