PyPDFForm 6.3.0__tar.gz → 6.4.0__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.
Files changed (88) hide show
  1. {pypdfform-6.3.0 → pypdfform-6.4.0}/PKG-INFO +2 -1
  2. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/__init__.py +1 -1
  3. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/constants.py +17 -0
  4. pypdfform-6.4.0/PyPDFForm/lib/egress.py +829 -0
  5. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/field_tree.py +14 -10
  6. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/filler.py +22 -33
  7. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/hooks.py +321 -16
  8. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/base.py +2 -1
  9. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/dropdown.py +89 -3
  10. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/patterns.py +157 -17
  11. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/template.py +9 -3
  12. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/wrapper.py +169 -56
  13. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm.egg-info/PKG-INFO +2 -1
  14. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm.egg-info/SOURCES.txt +1 -16
  15. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm.egg-info/requires.txt +1 -0
  16. {pypdfform-6.3.0 → pypdfform-6.4.0}/pyproject.toml +8 -0
  17. pypdfform-6.3.0/PyPDFForm/lib/egress.py +0 -249
  18. pypdfform-6.3.0/tests/test_bulk_create_fields.py +0 -230
  19. pypdfform-6.3.0/tests/test_create_widget.py +0 -597
  20. pypdfform-6.3.0/tests/test_draw_elements.py +0 -213
  21. pypdfform-6.3.0/tests/test_dropdown.py +0 -215
  22. pypdfform-6.3.0/tests/test_extract_middleware_attributes.py +0 -169
  23. pypdfform-6.3.0/tests/test_fill_max_length_text_field.py +0 -144
  24. pypdfform-6.3.0/tests/test_font_related.py +0 -404
  25. pypdfform-6.3.0/tests/test_functional.py +0 -4452
  26. pypdfform-6.3.0/tests/test_generate_appearance_streams.py +0 -125
  27. pypdfform-6.3.0/tests/test_js.py +0 -249
  28. pypdfform-6.3.0/tests/test_need_appearances.py +0 -209
  29. pypdfform-6.3.0/tests/test_paragraph.py +0 -89
  30. pypdfform-6.3.0/tests/test_signature.py +0 -506
  31. pypdfform-6.3.0/tests/test_use_full_widget_name.py +0 -118
  32. pypdfform-6.3.0/tests/test_widget_attr_trigger.py +0 -3898
  33. {pypdfform-6.3.0 → pypdfform-6.4.0}/LICENSE +0 -0
  34. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/__init__.py +0 -0
  35. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/common.py +0 -0
  36. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/create.py +0 -0
  37. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/entry.py +0 -0
  38. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/inspect.py +0 -0
  39. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/remove.py +0 -0
  40. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/root.py +0 -0
  41. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/schemas/__init__.py +0 -0
  42. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/schemas/create.py +0 -0
  43. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/schemas/update.py +0 -0
  44. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/cli/update.py +0 -0
  45. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/__init__.py +0 -0
  46. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/adapter.py +0 -0
  47. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/annotations/__init__.py +0 -0
  48. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/annotations/base.py +0 -0
  49. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/annotations/link.py +0 -0
  50. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/annotations/stamp.py +0 -0
  51. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/annotations/text.py +0 -0
  52. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/annotations/text_markup.py +0 -0
  53. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/assets/__init__.py +0 -0
  54. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/assets/blank.py +0 -0
  55. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/clone.py +0 -0
  56. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/coordinate.py +0 -0
  57. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/default_appearance.py +0 -0
  58. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/deprecation.py +0 -0
  59. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/font.py +0 -0
  60. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/image.py +0 -0
  61. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/__init__.py +0 -0
  62. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/checkbox.py +0 -0
  63. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/image.py +0 -0
  64. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/radio.py +0 -0
  65. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/signature.py +0 -0
  66. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/middleware/text.py +0 -0
  67. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/__init__.py +0 -0
  68. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/circle.py +0 -0
  69. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/ellipse.py +0 -0
  70. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/image.py +0 -0
  71. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/line.py +0 -0
  72. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/rect.py +0 -0
  73. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/raw/text.py +0 -0
  74. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/utils.py +0 -0
  75. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/watermark.py +0 -0
  76. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/__init__.py +0 -0
  77. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/base.py +0 -0
  78. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/checkbox.py +0 -0
  79. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/dropdown.py +0 -0
  80. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/image.py +0 -0
  81. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/radio.py +0 -0
  82. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/signature.py +0 -0
  83. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm/lib/widgets/text.py +0 -0
  84. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm.egg-info/dependency_links.txt +0 -0
  85. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm.egg-info/entry_points.txt +0 -0
  86. {pypdfform-6.3.0 → pypdfform-6.4.0}/PyPDFForm.egg-info/top_level.txt +0 -0
  87. {pypdfform-6.3.0 → pypdfform-6.4.0}/README.md +0 -0
  88. {pypdfform-6.3.0 → pypdfform-6.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 6.3.0
3
+ Version: 6.4.0
4
4
  Summary: The Python library & CLI for PDF forms.
5
5
  Author: Jinge Li
6
6
  License-Expression: MIT
@@ -43,6 +43,7 @@ Requires-Dist: pudb<2027.0.0,>=2025.1.5; extra == "dev"
43
43
  Requires-Dist: pylint<5.0.0,>=4.0.5; extra == "dev"
44
44
  Requires-Dist: pyright<2.0.0,>=1.1.409; extra == "dev"
45
45
  Requires-Dist: pytest<10.0.0,>=9.0.3; extra == "dev"
46
+ Requires-Dist: pytest-xdist<4.0.0,>=3.8.0; extra == "dev"
46
47
  Requires-Dist: requests<3.0.0,>=2.34.2; extra == "dev"
47
48
  Requires-Dist: ruff<1.0.0,>=0.15.14; extra == "dev"
48
49
  Dynamic: license-file
@@ -16,7 +16,7 @@ PyPDFForm aims to make PDF form automation straightforward whether it is used
16
16
  from Python code or from the command line.
17
17
  """
18
18
 
19
- __version__ = "6.3.0"
19
+ __version__ = "6.4.0"
20
20
 
21
21
  from .lib.annotations import Annotations
22
22
  from .lib.assets.blank import BlankPage
@@ -147,6 +147,7 @@ Filter = "/Filter"
147
147
  FlateDecode = "/FlateDecode"
148
148
  Encoding = "/Encoding"
149
149
  WinAnsiEncoding = "/WinAnsiEncoding"
150
+ MacRomanEncoding = "/MacRomanEncoding"
150
151
  Widths = "/Widths"
151
152
  FirstChar = "/FirstChar"
152
153
  LastChar = "/LastChar"
@@ -241,6 +242,9 @@ FEATURE_HOOKS = (
241
242
  )
242
243
  # the font hook, whose user-facing font names PdfWrapper maps to resource names
243
244
  FONT_HOOK = "update_text_field_font"
245
+ # the dropdown choices hook; trigger_widget_hooks moves each field's selection
246
+ # after it, and PdfWrapper reads the selection back
247
+ CHOICES_HOOK = "update_dropdown_choices"
244
248
  # widget property hooks that change the default appearance (/DA), which a
245
249
  # field can inherit from its ancestors or the AcroForm; they get the AcroForm
246
250
  DEFAULT_APPEARANCE_HOOKS = frozenset(
@@ -250,6 +254,19 @@ DEFAULT_APPEARANCE_HOOKS = frozenset(
250
254
  "update_text_field_font_color",
251
255
  }
252
256
  )
257
+ # widget property hooks that can change how a text field or dropdown is drawn,
258
+ # so its appearance (/AP) no longer matches and is removed when they do
259
+ APPEARANCE_HOOKS = DEFAULT_APPEARANCE_HOOKS | frozenset(
260
+ {
261
+ "update_text_field_alignment",
262
+ "update_text_field_multiline",
263
+ "update_text_field_comb",
264
+ "update_text_field_max_length",
265
+ CHOICES_HOOK,
266
+ "update_field_width",
267
+ "update_field_height",
268
+ }
269
+ )
253
270
  # no feature above needs a newer version, so newer documents are never raised
254
271
  NEWEST_FEATURE_VERSION = max(
255
272
  [