python-pdffiller 1.1.1__tar.gz → 1.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.
Files changed (73) hide show
  1. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/PKG-INFO +12 -16
  2. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/README.rst +11 -15
  3. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/_version.py +1 -1
  4. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/io/custom_pdf_writer.py +2 -2
  5. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/pdf.py +9 -1
  6. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pyproject.toml +1 -1
  7. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/python_pdffiller.egg-info/PKG-INFO +12 -16
  8. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/AUTHORS.rst +0 -0
  9. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/CHANGELOG.md +0 -0
  10. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/COPYING +0 -0
  11. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/MANIFEST.in +0 -0
  12. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/Makefile +0 -0
  13. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/make.bat +0 -0
  14. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/__init__.py +0 -0
  15. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/_static/rtd_literal_block.css +0 -0
  16. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/_static/rtd_theme_overrides.css +0 -0
  17. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/_static/terminal_output.css +0 -0
  18. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/changelog.md +0 -0
  19. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/cli-commands.rst +0 -0
  20. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/cli-usage.rst +0 -0
  21. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/commands/dump_data_fields.rst +0 -0
  22. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/commands/fill_form.rst +0 -0
  23. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/conf.py +0 -0
  24. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/contributing.rst +0 -0
  25. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/docs/source/index.rst +0 -0
  26. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/__init__.py +0 -0
  27. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/__main__.py +0 -0
  28. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/__init__.py +0 -0
  29. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/args.py +0 -0
  30. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/boolean_action.py +0 -0
  31. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/cli.py +0 -0
  32. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/command.py +0 -0
  33. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/commands/__init__.py +0 -0
  34. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/commands/dump_data_fields.py +0 -0
  35. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/commands/fill_form.py +0 -0
  36. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/exit_codes.py +0 -0
  37. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/formatters.py +0 -0
  38. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/once_argument.py +0 -0
  39. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/cli/smart_formatter.py +0 -0
  40. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/const.py +0 -0
  41. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/exceptions.py +0 -0
  42. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/io/__init__.py +0 -0
  43. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/io/colors.py +0 -0
  44. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/io/output.py +0 -0
  45. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/py.typed.py +0 -0
  46. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/typing.py +0 -0
  47. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/utils.py +0 -0
  48. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/widgets/__init__.py +0 -0
  49. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/widgets/base.py +0 -0
  50. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/widgets/checkbox.py +0 -0
  51. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/widgets/radio.py +0 -0
  52. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/pdffiller/widgets/text.py +0 -0
  53. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/python_pdffiller.egg-info/SOURCES.txt +0 -0
  54. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/python_pdffiller.egg-info/dependency_links.txt +0 -0
  55. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/python_pdffiller.egg-info/entry_points.txt +0 -0
  56. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/python_pdffiller.egg-info/requires.txt +0 -0
  57. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/python_pdffiller.egg-info/top_level.txt +0 -0
  58. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/requirements-dev.txt +0 -0
  59. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/requirements-doc.txt +0 -0
  60. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/requirements-lint.txt +0 -0
  61. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/requirements-test.txt +0 -0
  62. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/requirements.txt +0 -0
  63. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/setup.cfg +0 -0
  64. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/setup.py +0 -0
  65. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/__init__.py +0 -0
  66. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/conftest.py +0 -0
  67. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/data/empty.pdf +0 -0
  68. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/data/input.pdf +0 -0
  69. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/unit/__init__.py +0 -0
  70. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/unit/test_form_field.py +0 -0
  71. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/unit/test_formatters.py +0 -0
  72. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tests/unit/test_setup.py +0 -0
  73. {python_pdffiller-1.1.1 → python_pdffiller-1.1.2}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-pdffiller
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Interact with PDF by inspecting or filling it
5
5
  Author-email: Jacques Raphanel <jraphanel@sismic.fr>
6
6
  License-Expression: MIT
@@ -31,12 +31,12 @@ Requires-Dist: colorama
31
31
  Requires-Dist: pyyaml
32
32
  Dynamic: license-file
33
33
 
34
- pypdffiller
35
- ===========
34
+ pdffiller
35
+ =========
36
36
 
37
37
  |Test| |PyPI| |Python| |Code Style| |Pre-Commit| |License|
38
38
 
39
- ``pypdffiller`` is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
39
+ ``python-pdffiller`` is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
40
40
  functionalities needed to interact with PDF forms:
41
41
 
42
42
  - Inspect what data a PDF form needs to be filled with.
@@ -45,9 +45,9 @@ functionalities needed to interact with PDF forms:
45
45
  Installation
46
46
  ------------
47
47
 
48
- As of first version, ``pypdffiller`` is compatible with Python 3.9+.
48
+ As of first version, ``python-pdffiller`` is compatible with Python 3.9+.
49
49
 
50
- Use ``pip`` to install the latest stable version of ``pypdffiller``:
50
+ Use ``pip`` to install the latest stable version of ``python-pdffiller``:
51
51
 
52
52
  .. code-block:: console
53
53
 
@@ -72,7 +72,7 @@ https://github.com/sismicfr/pypdffiller/issues.
72
72
  Documentation
73
73
  -------------
74
74
 
75
- The full documentation for CLI and API is available at https://pypdffiller.readthedocs.org/en/stable/.
75
+ The full documentation for CLI and API is available at https://sismicfr.github.io/pypdffiller/
76
76
 
77
77
  Build the docs
78
78
  ~~~~~~~~~~~~~~
@@ -106,23 +106,19 @@ We use ``tox`` to manage our environment and build the executable:
106
106
  Contributing
107
107
  ------------
108
108
 
109
- For guidelines for contributing to ``pypdffiller``, refer to `CONTRIBUTING.rst <https://github.com/sismicfr/pypdffiller/blob/main/CONTRIBUTING.rst>`_.
109
+ For guidelines for contributing to ``python-pdffiller``, refer to `CONTRIBUTING.rst <https://github.com/sismicfr/pypdffiller/blob/main/CONTRIBUTING.rst>`_.
110
110
 
111
111
 
112
112
  .. |Test| image:: https://github.com/sismicfr/pypdffiller/workflows/Test/badge.svg
113
113
  :target: https://github.com/sismicfr/pypdffiller/actions
114
114
  :alt: Test
115
115
 
116
- .. |PyPI| image:: https://img.shields.io/pypi/v/pypdffiller?label=PyPI&logo=pypi
117
- :target: https://badge.fury.io/py/pypdffiller
116
+ .. |PyPI| image:: https://img.shields.io/pypi/v/python-pdffiller?label=PyPI&logo=pypi
117
+ :target: https://badge.fury.io/py/python-pdffiller
118
118
  :alt: PyPI
119
119
 
120
- .. |Read the Docs| image:: https://img.shields.io/readthedocs/pypdffiller?label=Documentation&logo=Read%20the%20Docs
121
- :target: https://sismicfr.github.io/pypdffiller
122
- :alt: Docs
123
-
124
- .. |Python| image:: https://img.shields.io/pypi/pyversions/pypdffiller.svg?label=Python&logo=Python
125
- :target: https://pypi.python.org/pypi/pypdffiller
120
+ .. |Python| image:: https://img.shields.io/pypi/pyversions/python-pdffiller.svg?label=Python&logo=Python
121
+ :target: https://pypi.python.org/pypi/python-pdffiller
126
122
  :alt: Python
127
123
 
128
124
  .. |Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?label=Code%20Style
@@ -1,9 +1,9 @@
1
- pypdffiller
2
- ===========
1
+ pdffiller
2
+ =========
3
3
 
4
4
  |Test| |PyPI| |Python| |Code Style| |Pre-Commit| |License|
5
5
 
6
- ``pypdffiller`` is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
6
+ ``python-pdffiller`` is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
7
7
  functionalities needed to interact with PDF forms:
8
8
 
9
9
  - Inspect what data a PDF form needs to be filled with.
@@ -12,9 +12,9 @@ functionalities needed to interact with PDF forms:
12
12
  Installation
13
13
  ------------
14
14
 
15
- As of first version, ``pypdffiller`` is compatible with Python 3.9+.
15
+ As of first version, ``python-pdffiller`` is compatible with Python 3.9+.
16
16
 
17
- Use ``pip`` to install the latest stable version of ``pypdffiller``:
17
+ Use ``pip`` to install the latest stable version of ``python-pdffiller``:
18
18
 
19
19
  .. code-block:: console
20
20
 
@@ -39,7 +39,7 @@ https://github.com/sismicfr/pypdffiller/issues.
39
39
  Documentation
40
40
  -------------
41
41
 
42
- The full documentation for CLI and API is available at https://pypdffiller.readthedocs.org/en/stable/.
42
+ The full documentation for CLI and API is available at https://sismicfr.github.io/pypdffiller/
43
43
 
44
44
  Build the docs
45
45
  ~~~~~~~~~~~~~~
@@ -73,23 +73,19 @@ We use ``tox`` to manage our environment and build the executable:
73
73
  Contributing
74
74
  ------------
75
75
 
76
- For guidelines for contributing to ``pypdffiller``, refer to `CONTRIBUTING.rst <https://github.com/sismicfr/pypdffiller/blob/main/CONTRIBUTING.rst>`_.
76
+ For guidelines for contributing to ``python-pdffiller``, refer to `CONTRIBUTING.rst <https://github.com/sismicfr/pypdffiller/blob/main/CONTRIBUTING.rst>`_.
77
77
 
78
78
 
79
79
  .. |Test| image:: https://github.com/sismicfr/pypdffiller/workflows/Test/badge.svg
80
80
  :target: https://github.com/sismicfr/pypdffiller/actions
81
81
  :alt: Test
82
82
 
83
- .. |PyPI| image:: https://img.shields.io/pypi/v/pypdffiller?label=PyPI&logo=pypi
84
- :target: https://badge.fury.io/py/pypdffiller
83
+ .. |PyPI| image:: https://img.shields.io/pypi/v/python-pdffiller?label=PyPI&logo=pypi
84
+ :target: https://badge.fury.io/py/python-pdffiller
85
85
  :alt: PyPI
86
86
 
87
- .. |Read the Docs| image:: https://img.shields.io/readthedocs/pypdffiller?label=Documentation&logo=Read%20the%20Docs
88
- :target: https://sismicfr.github.io/pypdffiller
89
- :alt: Docs
90
-
91
- .. |Python| image:: https://img.shields.io/pypi/pyversions/pypdffiller.svg?label=Python&logo=Python
92
- :target: https://pypi.python.org/pypi/pypdffiller
87
+ .. |Python| image:: https://img.shields.io/pypi/pyversions/python-pdffiller.svg?label=Python&logo=Python
88
+ :target: https://pypi.python.org/pypi/python-pdffiller
93
89
  :alt: Python
94
90
 
95
91
  .. |Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?label=Code%20Style
@@ -3,4 +3,4 @@ __copyright__ = "Copyright 2025 SISMIC"
3
3
  __email__ = "jraphanel@sismic.fr"
4
4
  __license__ = "MIT"
5
5
  __title__ = "pdffiller"
6
- __version__ = "1.1.1"
6
+ __version__ = "1.1.2"
@@ -132,11 +132,11 @@ class CustomPdfWriter(PdfWriter): # pylint: disable=abstract-method
132
132
  elif parent_annotation.get(FA.FT) == "/Tx" or parent_annotation.get(FA.FT) == "/Ch":
133
133
  # textbox
134
134
  if isinstance(value, tuple):
135
- self._update_field_annotation(
135
+ self._update_field_annotation( # type: ignore[attr-defined] # pylint: disable=no-member
136
136
  page, parent_annotation, annotation, value[1], value[2], flatten=flatten
137
137
  )
138
138
  else:
139
- self._update_field_annotation(
139
+ self._update_field_annotation( # type: ignore[attr-defined] # pylint: disable=no-member
140
140
  page, parent_annotation, annotation, flatten=flatten
141
141
  )
142
142
  elif annotation.get(FA.FT) == "/Sig": # deprecated # not implemented yet
@@ -266,12 +266,20 @@ class Pdf:
266
266
  output.info("remove all annotations")
267
267
  writer.remove_annotations(None)
268
268
  output.info("compress file")
269
- writer.compress_identical_objects(remove_identicals=True, remove_orphans=True)
269
+ writer.compress_identical_objects(remove_identicals=False, remove_orphans=True)
270
270
 
271
271
  output.info(f"write {output_file} on the disk")
272
272
  with open(output_file, "wb") as f:
273
273
  writer.write(f)
274
274
 
275
+ output.info("try to remove identical objects")
276
+ try:
277
+ writer.compress_identical_objects(remove_identicals=True, remove_orphans=False)
278
+ output.info(f"write {output_file} on the disk")
279
+ with open(output_file, "wb") as f:
280
+ writer.write(f)
281
+ except Exception: # pylint: disable=broad-exception-caught
282
+ output.warning("An error occurs when removing identical objects")
275
283
  return self
276
284
 
277
285
  def _get_widget_name(self, widget: Any) -> Optional[str]:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-pdffiller"
7
- version = "1.1.1"
7
+ version = "1.1.2"
8
8
  description="Interact with PDF by inspecting or filling it"
9
9
  requires-python = ">=3.9"
10
10
  license ="MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-pdffiller
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Interact with PDF by inspecting or filling it
5
5
  Author-email: Jacques Raphanel <jraphanel@sismic.fr>
6
6
  License-Expression: MIT
@@ -31,12 +31,12 @@ Requires-Dist: colorama
31
31
  Requires-Dist: pyyaml
32
32
  Dynamic: license-file
33
33
 
34
- pypdffiller
35
- ===========
34
+ pdffiller
35
+ =========
36
36
 
37
37
  |Test| |PyPI| |Python| |Code Style| |Pre-Commit| |License|
38
38
 
39
- ``pypdffiller`` is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
39
+ ``python-pdffiller`` is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
40
40
  functionalities needed to interact with PDF forms:
41
41
 
42
42
  - Inspect what data a PDF form needs to be filled with.
@@ -45,9 +45,9 @@ functionalities needed to interact with PDF forms:
45
45
  Installation
46
46
  ------------
47
47
 
48
- As of first version, ``pypdffiller`` is compatible with Python 3.9+.
48
+ As of first version, ``python-pdffiller`` is compatible with Python 3.9+.
49
49
 
50
- Use ``pip`` to install the latest stable version of ``pypdffiller``:
50
+ Use ``pip`` to install the latest stable version of ``python-pdffiller``:
51
51
 
52
52
  .. code-block:: console
53
53
 
@@ -72,7 +72,7 @@ https://github.com/sismicfr/pypdffiller/issues.
72
72
  Documentation
73
73
  -------------
74
74
 
75
- The full documentation for CLI and API is available at https://pypdffiller.readthedocs.org/en/stable/.
75
+ The full documentation for CLI and API is available at https://sismicfr.github.io/pypdffiller/
76
76
 
77
77
  Build the docs
78
78
  ~~~~~~~~~~~~~~
@@ -106,23 +106,19 @@ We use ``tox`` to manage our environment and build the executable:
106
106
  Contributing
107
107
  ------------
108
108
 
109
- For guidelines for contributing to ``pypdffiller``, refer to `CONTRIBUTING.rst <https://github.com/sismicfr/pypdffiller/blob/main/CONTRIBUTING.rst>`_.
109
+ For guidelines for contributing to ``python-pdffiller``, refer to `CONTRIBUTING.rst <https://github.com/sismicfr/pypdffiller/blob/main/CONTRIBUTING.rst>`_.
110
110
 
111
111
 
112
112
  .. |Test| image:: https://github.com/sismicfr/pypdffiller/workflows/Test/badge.svg
113
113
  :target: https://github.com/sismicfr/pypdffiller/actions
114
114
  :alt: Test
115
115
 
116
- .. |PyPI| image:: https://img.shields.io/pypi/v/pypdffiller?label=PyPI&logo=pypi
117
- :target: https://badge.fury.io/py/pypdffiller
116
+ .. |PyPI| image:: https://img.shields.io/pypi/v/python-pdffiller?label=PyPI&logo=pypi
117
+ :target: https://badge.fury.io/py/python-pdffiller
118
118
  :alt: PyPI
119
119
 
120
- .. |Read the Docs| image:: https://img.shields.io/readthedocs/pypdffiller?label=Documentation&logo=Read%20the%20Docs
121
- :target: https://sismicfr.github.io/pypdffiller
122
- :alt: Docs
123
-
124
- .. |Python| image:: https://img.shields.io/pypi/pyversions/pypdffiller.svg?label=Python&logo=Python
125
- :target: https://pypi.python.org/pypi/pypdffiller
120
+ .. |Python| image:: https://img.shields.io/pypi/pyversions/python-pdffiller.svg?label=Python&logo=Python
121
+ :target: https://pypi.python.org/pypi/python-pdffiller
126
122
  :alt: Python
127
123
 
128
124
  .. |Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?label=Code%20Style