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.

Files changed (49) hide show
  1. {pypdfform-2.0.0 → pypdfform-2.0.1}/PKG-INFO +1 -1
  2. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/__init__.py +1 -1
  3. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/patterns.py +4 -0
  4. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/utils.py +4 -3
  5. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/PKG-INFO +1 -1
  6. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_create_widget.py +16 -0
  7. {pypdfform-2.0.0 → pypdfform-2.0.1}/LICENSE +0 -0
  8. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/adapter.py +0 -0
  9. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/constants.py +0 -0
  10. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/coordinate.py +0 -0
  11. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/filler.py +0 -0
  12. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/font.py +0 -0
  13. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/image.py +0 -0
  14. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/__init__.py +0 -0
  15. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/base.py +0 -0
  16. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/checkbox.py +0 -0
  17. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/dropdown.py +0 -0
  18. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/image.py +0 -0
  19. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/radio.py +0 -0
  20. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/signature.py +0 -0
  21. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/middleware/text.py +0 -0
  22. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/template.py +0 -0
  23. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/watermark.py +0 -0
  24. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/__init__.py +0 -0
  25. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/base.py +0 -0
  26. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/checkbox.py +0 -0
  27. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/dropdown.py +0 -0
  28. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/widgets/text.py +0 -0
  29. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm/wrapper.py +0 -0
  30. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/SOURCES.txt +0 -0
  31. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/dependency_links.txt +0 -0
  32. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/requires.txt +0 -0
  33. {pypdfform-2.0.0 → pypdfform-2.0.1}/PyPDFForm.egg-info/top_level.txt +0 -0
  34. {pypdfform-2.0.0 → pypdfform-2.0.1}/README.md +0 -0
  35. {pypdfform-2.0.0 → pypdfform-2.0.1}/setup.cfg +0 -0
  36. {pypdfform-2.0.0 → pypdfform-2.0.1}/setup.py +0 -0
  37. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_adobe_mode.py +0 -0
  38. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_dropdown.py +0 -0
  39. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_dropdown_simple.py +0 -0
  40. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_fill_max_length_text_field.py +0 -0
  41. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_fill_max_length_text_field_simple.py +0 -0
  42. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_fill_method.py +0 -0
  43. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_functional.py +0 -0
  44. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_functional_simple.py +0 -0
  45. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_paragraph.py +0 -0
  46. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_paragraph_simple.py +0 -0
  47. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_preview.py +0 -0
  48. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_signature.py +0 -0
  49. {pypdfform-2.0.0 → pypdfform-2.0.1}/tests/test_use_full_widget_name.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: The Python library for PDF forms.
5
5
  Home-page: https://github.com/chinapandaman/PyPDFForm
6
6
  Author: Jinge Li
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  """Contains any object users might need."""
3
3
 
4
- __version__ = "2.0.0"
4
+ __version__ = "2.0.1"
5
5
 
6
6
  from .wrapper import FormWrapper, PdfWrapper
7
7
 
@@ -24,6 +24,10 @@ WIDGET_TYPE_PATTERNS = [
24
24
  ({FT: Sig},),
25
25
  Signature,
26
26
  ),
27
+ (
28
+ ({Parent: {FT: Sig}},),
29
+ Signature,
30
+ ),
27
31
  (
28
32
  ({FT: Tx},),
29
33
  Text,
@@ -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
- # write a test case for this
43
- # elif len(color) == 4:
44
- # result = CMYKColor(cyan=color[0], magenta=color[1], yellow=color[2], black=color[3])
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: The Python library for PDF forms.
5
5
  Home-page: https://github.com/chinapandaman/PyPDFForm
6
6
  Author: Jinge Li
@@ -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