PyPDFForm 3.1.1__tar.gz → 3.1.2__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 (51) hide show
  1. {pypdfform-3.1.1 → pypdfform-3.1.2}/PKG-INFO +1 -1
  2. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/__init__.py +1 -1
  3. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/constants.py +0 -1
  4. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/patterns.py +1 -10
  5. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/template.py +1 -1
  6. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/utils.py +0 -2
  7. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm.egg-info/PKG-INFO +1 -1
  8. {pypdfform-3.1.1 → pypdfform-3.1.2}/LICENSE +0 -0
  9. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/adapter.py +0 -0
  10. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/coordinate.py +0 -0
  11. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/filler.py +0 -0
  12. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/font.py +0 -0
  13. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/hooks.py +0 -0
  14. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/image.py +0 -0
  15. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/__init__.py +0 -0
  16. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/base.py +0 -0
  17. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/checkbox.py +0 -0
  18. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/dropdown.py +0 -0
  19. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/image.py +0 -0
  20. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/radio.py +0 -0
  21. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/signature.py +0 -0
  22. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/middleware/text.py +0 -0
  23. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/watermark.py +0 -0
  24. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/__init__.py +0 -0
  25. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/base.py +0 -0
  26. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/bedrock.py +0 -0
  27. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/checkbox.py +0 -0
  28. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/dropdown.py +0 -0
  29. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/image.py +0 -0
  30. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/radio.py +0 -0
  31. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/signature.py +0 -0
  32. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/widgets/text.py +0 -0
  33. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm/wrapper.py +0 -0
  34. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm.egg-info/SOURCES.txt +0 -0
  35. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm.egg-info/dependency_links.txt +0 -0
  36. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm.egg-info/requires.txt +0 -0
  37. {pypdfform-3.1.1 → pypdfform-3.1.2}/PyPDFForm.egg-info/top_level.txt +0 -0
  38. {pypdfform-3.1.1 → pypdfform-3.1.2}/README.md +0 -0
  39. {pypdfform-3.1.1 → pypdfform-3.1.2}/pyproject.toml +0 -0
  40. {pypdfform-3.1.1 → pypdfform-3.1.2}/setup.cfg +0 -0
  41. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_adobe_mode.py +0 -0
  42. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_create_widget.py +0 -0
  43. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_dropdown.py +0 -0
  44. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_extract_values.py +0 -0
  45. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_fill_max_length_text_field.py +0 -0
  46. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_fill_method.py +0 -0
  47. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_functional.py +0 -0
  48. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_paragraph.py +0 -0
  49. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_signature.py +0 -0
  50. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_use_full_widget_name.py +0 -0
  51. {pypdfform-3.1.1 → pypdfform-3.1.2}/tests/test_widget_attr_trigger.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 3.1.1
3
+ Version: 3.1.2
4
4
  Summary: The Python library for PDF forms.
5
5
  Author: Jinge Li
6
6
  License-Expression: MIT
@@ -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.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
@@ -67,7 +67,6 @@ Opt = "/Opt"
67
67
  AS = "/AS"
68
68
  Yes = "/Yes"
69
69
  Off = "/Off"
70
- XObject = "/XObject"
71
70
 
72
71
  # Font dict
73
72
  Length1 = "/Length1"
@@ -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, Resources, Sig, T,
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,
@@ -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) if _type else None
185
+ result = _type(key)
186
186
  break
187
187
  return result
188
188
 
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 3.1.1
3
+ Version: 3.1.2
4
4
  Summary: The Python library for PDF forms.
5
5
  Author: Jinge Li
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes