PyPDFForm 2.2.0__tar.gz → 2.2.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 (55) hide show
  1. {pypdfform-2.2.0 → pypdfform-2.2.2}/PKG-INFO +17 -12
  2. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/__init__.py +1 -1
  3. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/wrapper.py +1 -4
  4. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm.egg-info/PKG-INFO +17 -12
  5. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm.egg-info/SOURCES.txt +1 -1
  6. pypdfform-2.2.2/PyPDFForm.egg-info/requires.txt +17 -0
  7. {pypdfform-2.2.0 → pypdfform-2.2.2}/README.md +1 -1
  8. pypdfform-2.2.2/pyproject.toml +133 -0
  9. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_create_widget.py +3 -1
  10. pypdfform-2.2.0/PyPDFForm.egg-info/requires.txt +0 -4
  11. pypdfform-2.2.0/setup.py +0 -45
  12. {pypdfform-2.2.0 → pypdfform-2.2.2}/LICENSE +0 -0
  13. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/adapter.py +0 -0
  14. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/constants.py +0 -0
  15. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/coordinate.py +0 -0
  16. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/filler.py +0 -0
  17. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/font.py +0 -0
  18. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/image.py +0 -0
  19. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/__init__.py +0 -0
  20. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/base.py +0 -0
  21. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/checkbox.py +0 -0
  22. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/dropdown.py +0 -0
  23. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/image.py +0 -0
  24. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/radio.py +0 -0
  25. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/signature.py +0 -0
  26. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/middleware/text.py +0 -0
  27. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/patterns.py +0 -0
  28. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/template.py +0 -0
  29. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/utils.py +0 -0
  30. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/watermark.py +0 -0
  31. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/__init__.py +0 -0
  32. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/base.py +0 -0
  33. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/bedrock.py +0 -0
  34. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/checkbox.py +0 -0
  35. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/dropdown.py +0 -0
  36. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/image.py +0 -0
  37. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/radio.py +0 -0
  38. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/signature.py +0 -0
  39. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm/widgets/text.py +0 -0
  40. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm.egg-info/dependency_links.txt +0 -0
  41. {pypdfform-2.2.0 → pypdfform-2.2.2}/PyPDFForm.egg-info/top_level.txt +0 -0
  42. {pypdfform-2.2.0 → pypdfform-2.2.2}/setup.cfg +0 -0
  43. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_adobe_mode.py +0 -0
  44. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_dropdown.py +0 -0
  45. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_dropdown_simple.py +0 -0
  46. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_fill_max_length_text_field.py +0 -0
  47. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_fill_max_length_text_field_simple.py +0 -0
  48. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_fill_method.py +0 -0
  49. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_functional.py +0 -0
  50. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_functional_simple.py +0 -0
  51. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_paragraph.py +0 -0
  52. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_paragraph_simple.py +0 -0
  53. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_preview.py +0 -0
  54. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_signature.py +0 -0
  55. {pypdfform-2.2.0 → pypdfform-2.2.2}/tests/test_use_full_widget_name.py +0 -0
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: The Python library for PDF forms.
5
- Home-page: https://github.com/chinapandaman/PyPDFForm
6
5
  Author: Jinge Li
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/chinapandaman/PyPDFForm
8
+ Project-URL: Documentation, https://chinapandaman.github.io/PyPDFForm/
7
9
  Classifier: Development Status :: 5 - Production/Stable
8
10
  Classifier: Intended Audience :: Developers
9
11
  Classifier: Programming Language :: Python :: 3
@@ -14,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.10
14
16
  Classifier: Programming Language :: Python :: 3.11
15
17
  Classifier: Programming Language :: Python :: 3.12
16
18
  Classifier: Programming Language :: Python :: 3.13
17
- Classifier: License :: OSI Approved :: MIT License
18
19
  Classifier: Operating System :: OS Independent
19
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
21
  Requires-Python: >=3.8
@@ -24,15 +25,19 @@ Requires-Dist: cryptography
24
25
  Requires-Dist: pillow
25
26
  Requires-Dist: pypdf
26
27
  Requires-Dist: reportlab
27
- Dynamic: author
28
- Dynamic: classifier
29
- Dynamic: description
30
- Dynamic: description-content-type
31
- Dynamic: home-page
28
+ Provides-Extra: dev
29
+ Requires-Dist: black; extra == "dev"
30
+ Requires-Dist: coverage; extra == "dev"
31
+ Requires-Dist: isort; extra == "dev"
32
+ Requires-Dist: jsonschema; extra == "dev"
33
+ Requires-Dist: mkdocs; extra == "dev"
34
+ Requires-Dist: pudb; extra == "dev"
35
+ Requires-Dist: pylint; extra == "dev"
36
+ Requires-Dist: pyright; extra == "dev"
37
+ Requires-Dist: pytest; extra == "dev"
38
+ Requires-Dist: requests; extra == "dev"
39
+ Requires-Dist: ruff; extra == "dev"
32
40
  Dynamic: license-file
33
- Dynamic: requires-dist
34
- Dynamic: requires-python
35
- Dynamic: summary
36
41
 
37
42
  <p align="center"><img src="https://github.com/chinapandaman/PyPDFForm/raw/master/docs/img/logo.png"></p>
38
43
  <p align="center">
@@ -73,7 +78,7 @@ pip install PyPDFForm
73
78
  ```
74
79
 
75
80
  ## Quick Example
76
- ![Check out the GitHub repository for a live demo if you can't see it here.](https://github.com/chinapandaman/PyPDFForm/raw/master/demo.gif)
81
+ ![Check out the GitHub repository for a live demo if you can't see it here.](https://github.com/chinapandaman/PyPDFForm/raw/master/docs/img/demo.gif)
77
82
 
78
83
  A sample PDF form can be found [here](https://github.com/chinapandaman/PyPDFForm/raw/master/pdf_samples/sample_template.pdf). Download it and try:
79
84
 
@@ -5,7 +5,7 @@ This package provides tools for filling PDF forms, drawing text and images,
5
5
  and manipulating PDF form elements programmatically.
6
6
  """
7
7
 
8
- __version__ = "2.2.0"
8
+ __version__ = "2.2.2"
9
9
 
10
10
  from .wrapper import FormWrapper, PdfWrapper
11
11
 
@@ -497,10 +497,7 @@ class PdfWrapper(FormWrapper):
497
497
  obj = _class(name=name, page_number=page_number, x=x, y=y, **kwargs)
498
498
  watermarks = obj.watermarks(self.read())
499
499
 
500
- if widget_type in ["radio", "signature", "image"]:
501
- self.stream = copy_watermark_widgets(self.read(), watermarks, [name])
502
- else:
503
- self.stream = merge_watermarks_with_pdf(self.read(), watermarks)
500
+ self.stream = copy_watermark_widgets(self.read(), watermarks, [name])
504
501
  if obj.non_acro_form_params:
505
502
  self.stream = handle_non_acro_form_params(
506
503
  self.stream, name, obj.non_acro_form_params
@@ -1,9 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyPDFForm
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: The Python library for PDF forms.
5
- Home-page: https://github.com/chinapandaman/PyPDFForm
6
5
  Author: Jinge Li
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/chinapandaman/PyPDFForm
8
+ Project-URL: Documentation, https://chinapandaman.github.io/PyPDFForm/
7
9
  Classifier: Development Status :: 5 - Production/Stable
8
10
  Classifier: Intended Audience :: Developers
9
11
  Classifier: Programming Language :: Python :: 3
@@ -14,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.10
14
16
  Classifier: Programming Language :: Python :: 3.11
15
17
  Classifier: Programming Language :: Python :: 3.12
16
18
  Classifier: Programming Language :: Python :: 3.13
17
- Classifier: License :: OSI Approved :: MIT License
18
19
  Classifier: Operating System :: OS Independent
19
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
21
  Requires-Python: >=3.8
@@ -24,15 +25,19 @@ Requires-Dist: cryptography
24
25
  Requires-Dist: pillow
25
26
  Requires-Dist: pypdf
26
27
  Requires-Dist: reportlab
27
- Dynamic: author
28
- Dynamic: classifier
29
- Dynamic: description
30
- Dynamic: description-content-type
31
- Dynamic: home-page
28
+ Provides-Extra: dev
29
+ Requires-Dist: black; extra == "dev"
30
+ Requires-Dist: coverage; extra == "dev"
31
+ Requires-Dist: isort; extra == "dev"
32
+ Requires-Dist: jsonschema; extra == "dev"
33
+ Requires-Dist: mkdocs; extra == "dev"
34
+ Requires-Dist: pudb; extra == "dev"
35
+ Requires-Dist: pylint; extra == "dev"
36
+ Requires-Dist: pyright; extra == "dev"
37
+ Requires-Dist: pytest; extra == "dev"
38
+ Requires-Dist: requests; extra == "dev"
39
+ Requires-Dist: ruff; extra == "dev"
32
40
  Dynamic: license-file
33
- Dynamic: requires-dist
34
- Dynamic: requires-python
35
- Dynamic: summary
36
41
 
37
42
  <p align="center"><img src="https://github.com/chinapandaman/PyPDFForm/raw/master/docs/img/logo.png"></p>
38
43
  <p align="center">
@@ -73,7 +78,7 @@ pip install PyPDFForm
73
78
  ```
74
79
 
75
80
  ## Quick Example
76
- ![Check out the GitHub repository for a live demo if you can't see it here.](https://github.com/chinapandaman/PyPDFForm/raw/master/demo.gif)
81
+ ![Check out the GitHub repository for a live demo if you can't see it here.](https://github.com/chinapandaman/PyPDFForm/raw/master/docs/img/demo.gif)
77
82
 
78
83
  A sample PDF form can be found [here](https://github.com/chinapandaman/PyPDFForm/raw/master/pdf_samples/sample_template.pdf). Download it and try:
79
84
 
@@ -1,6 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
- setup.py
3
+ pyproject.toml
4
4
  PyPDFForm/__init__.py
5
5
  PyPDFForm/adapter.py
6
6
  PyPDFForm/constants.py
@@ -0,0 +1,17 @@
1
+ cryptography
2
+ pillow
3
+ pypdf
4
+ reportlab
5
+
6
+ [dev]
7
+ black
8
+ coverage
9
+ isort
10
+ jsonschema
11
+ mkdocs
12
+ pudb
13
+ pylint
14
+ pyright
15
+ pytest
16
+ requests
17
+ ruff
@@ -37,7 +37,7 @@ pip install PyPDFForm
37
37
  ```
38
38
 
39
39
  ## Quick Example
40
- ![Check out the GitHub repository for a live demo if you can't see it here.](https://github.com/chinapandaman/PyPDFForm/raw/master/demo.gif)
40
+ ![Check out the GitHub repository for a live demo if you can't see it here.](https://github.com/chinapandaman/PyPDFForm/raw/master/docs/img/demo.gif)
41
41
 
42
42
  A sample PDF form can be found [here](https://github.com/chinapandaman/PyPDFForm/raw/master/pdf_samples/sample_template.pdf). Download it and try:
43
43
 
@@ -0,0 +1,133 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "PyPDFForm"
7
+ dynamic = ["version"]
8
+ description = "The Python library for PDF forms."
9
+ readme = "README.md"
10
+ authors = [
11
+ {name = "Jinge Li"}
12
+ ]
13
+ license = "MIT"
14
+ license-files = ["LICENSE"]
15
+ classifiers = [
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.8",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Operating System :: OS Independent",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
28
+ ]
29
+ requires-python = ">=3.8"
30
+ dependencies = [
31
+ "cryptography",
32
+ "pillow",
33
+ "pypdf",
34
+ "reportlab",
35
+ ]
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/chinapandaman/PyPDFForm"
39
+ Documentation = "https://chinapandaman.github.io/PyPDFForm/"
40
+
41
+ [project.optional-dependencies]
42
+ dev = [
43
+ "black",
44
+ "coverage",
45
+ "isort",
46
+ "jsonschema",
47
+ "mkdocs",
48
+ "pudb",
49
+ "pylint",
50
+ "pyright",
51
+ "pytest",
52
+ "requests",
53
+ "ruff",
54
+ ]
55
+
56
+ [tool.coverage.run]
57
+ omit = [
58
+ "venv/*",
59
+ "tests/*",
60
+ ]
61
+
62
+ [tool.pylint."MESSAGES CONTROL"]
63
+ disable = [
64
+ "C0103",
65
+ "R0913",
66
+ "R0902",
67
+ "R0903",
68
+ "R0914",
69
+ "C0209",
70
+ "C0123",
71
+ "R0917",
72
+ "C2801",
73
+ "C0301",
74
+ ]
75
+
76
+ [tool.ruff.lint]
77
+ select = [
78
+ "A",
79
+ "ASYNC",
80
+ "B",
81
+ "BLE",
82
+ "C4",
83
+ "DTZ",
84
+ "E",
85
+ "EM",
86
+ "F",
87
+ "FLY",
88
+ "G",
89
+ "ISC",
90
+ "ICN",
91
+ "INT",
92
+ "LOG",
93
+ "N",
94
+ "PIE",
95
+ "PT",
96
+ "PERF",
97
+ "Q",
98
+ "R",
99
+ "RSE",
100
+ "SLF",
101
+ "SLOT",
102
+ "SIM",
103
+ "T10",
104
+ "TRY",
105
+ "TCH",
106
+ "YTT",
107
+ "W",
108
+ ]
109
+ ignore = ["B009", "E501", "N999", "TC006"]
110
+
111
+ [tool.pyright]
112
+ typeCheckingMode = "basic"
113
+ reportArgumentType = "none"
114
+ reportAttributeAccessIssue = "none"
115
+ reportIndexIssue = "none"
116
+ reportOperatorIssue = "none"
117
+ reportGeneralTypeIssues = "none"
118
+ reportOptionalMemberAccess = "error"
119
+ reportPossiblyUnboundVariable = "error"
120
+ reportUnusedImport = "error"
121
+ reportIncompatibleMethodOverride = "error"
122
+ reportMissingSuperCall = "error"
123
+ reportPrivateUsage = "error"
124
+ reportSelfClsParameterName = "error"
125
+ reportReturnType = "error"
126
+ reportAssignmentType = "error"
127
+ reportOptionalSubscript = "error"
128
+
129
+ [tool.setuptools.dynamic]
130
+ version = {attr = "PyPDFForm.__version__"}
131
+
132
+ [tool.setuptools.packages.find]
133
+ include = ["PyPDFForm*"]
@@ -428,6 +428,8 @@ def test_create_widget_sejda(sejda_template, pdf_samples, request):
428
428
 
429
429
 
430
430
  def test_create_widget_sejda_schema(sejda_template):
431
+ obj = PdfWrapper(sejda_template)
432
+ old_schema = obj.schema
431
433
  schema = (
432
434
  PdfWrapper(sejda_template)
433
435
  .create_widget(
@@ -447,7 +449,7 @@ def test_create_widget_sejda_schema(sejda_template):
447
449
  )
448
450
 
449
451
  assert schema["properties"]["new_text_field_widget"]
450
- assert len(schema["properties"]) == 1
452
+ assert len(schema["properties"]) == len(old_schema["properties"]) + 1
451
453
 
452
454
 
453
455
  def test_create_dropdown(template_stream, pdf_samples, request):
@@ -1,4 +0,0 @@
1
- cryptography
2
- pillow
3
- pypdf
4
- reportlab
pypdfform-2.2.0/setup.py DELETED
@@ -1,45 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """Builds package for release."""
3
-
4
- import re
5
-
6
- import setuptools
7
-
8
- with open("PyPDFForm/__init__.py", encoding="utf8") as f:
9
- version = re.search(r'__version__ = "(.*?)"', f.read())
10
- if version:
11
- version = version.group(1)
12
-
13
- with open("README.md", mode="r", encoding="utf-8") as fh:
14
- long_description = fh.read()
15
-
16
- with open("prod_requirements.txt", mode="r", encoding="utf-8") as requirements:
17
- dependencies = [each.replace("\n", "") for each in requirements.readlines()]
18
-
19
- setuptools.setup(
20
- name="PyPDFForm",
21
- version=version,
22
- description="The Python library for PDF forms.",
23
- long_description=long_description,
24
- long_description_content_type="text/markdown",
25
- url="https://github.com/chinapandaman/PyPDFForm",
26
- author="Jinge Li",
27
- packages=setuptools.find_packages(),
28
- classifiers=[
29
- "Development Status :: 5 - Production/Stable",
30
- "Intended Audience :: Developers",
31
- "Programming Language :: Python :: 3",
32
- "Programming Language :: Python :: 3 :: Only",
33
- "Programming Language :: Python :: 3.8",
34
- "Programming Language :: Python :: 3.9",
35
- "Programming Language :: Python :: 3.10",
36
- "Programming Language :: Python :: 3.11",
37
- "Programming Language :: Python :: 3.12",
38
- "Programming Language :: Python :: 3.13",
39
- "License :: OSI Approved :: MIT License",
40
- "Operating System :: OS Independent",
41
- "Topic :: Software Development :: Libraries :: Python Modules",
42
- ],
43
- python_requires=">=3.8",
44
- install_requires=dependencies,
45
- )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes