python-pdffiller 1.1.1__py3-none-any.whl → 1.1.2__py3-none-any.whl
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.
- pdffiller/_version.py +1 -1
- pdffiller/io/custom_pdf_writer.py +2 -2
- pdffiller/pdf.py +9 -1
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/METADATA +12 -16
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/RECORD +10 -10
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/WHEEL +0 -0
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/entry_points.txt +0 -0
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/licenses/AUTHORS.rst +0 -0
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/licenses/COPYING +0 -0
- {python_pdffiller-1.1.1.dist-info → python_pdffiller-1.1.2.dist-info}/top_level.txt +0 -0
pdffiller/_version.py
CHANGED
|
@@ -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
|
pdffiller/pdf.py
CHANGED
|
@@ -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=
|
|
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]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-pdffiller
|
|
3
|
-
Version: 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
|
-
|
|
35
|
-
|
|
34
|
+
pdffiller
|
|
35
|
+
=========
|
|
36
36
|
|
|
37
37
|
|Test| |PyPI| |Python| |Code Style| |Pre-Commit| |License|
|
|
38
38
|
|
|
39
|
-
``
|
|
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, ``
|
|
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 ``
|
|
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://
|
|
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 ``
|
|
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/
|
|
117
|
-
:target: https://badge.fury.io/py/
|
|
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
|
-
.. |
|
|
121
|
-
:target: https://
|
|
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
1
|
pdffiller/__init__.py,sha256=0HtgXhEV1fKTKAcOXGcq4UsCFflDIPCDQvckshZf-1k,195
|
|
2
2
|
pdffiller/__main__.py,sha256=7NPQgZVx6VSZS7OrmyJQ_O1vL4wiSqhiILi-outwUqM,107
|
|
3
|
-
pdffiller/_version.py,sha256=
|
|
3
|
+
pdffiller/_version.py,sha256=Za2kjmAG5y6PfrdsRibsxyoNKcK_36DjRsmSsSZVa1c,172
|
|
4
4
|
pdffiller/const.py,sha256=if_j5I8ftczpjrzZjA7idv-XpvIj1-XBF4oe6VtQvF0,434
|
|
5
5
|
pdffiller/exceptions.py,sha256=CdN93bZ0mBBS5vLxg14FYZUy4xkYqoD3_SzqtSkZr4g,1624
|
|
6
|
-
pdffiller/pdf.py,sha256=
|
|
6
|
+
pdffiller/pdf.py,sha256=Z_AwWD2_PSvRwJGQy9-czmxnVqPvbAY7y9T7GXtIboo,12733
|
|
7
7
|
pdffiller/py.typed.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
pdffiller/typing.py,sha256=dW2hGtyaNgTowUl1zsEt3ldhbHM2KfCyHAASb0RZcEs,980
|
|
9
9
|
pdffiller/utils.py,sha256=pmGf3QwkhKwosk_eFCauzHM-XHp_WGVQAtZlxa7taYY,827
|
|
@@ -21,17 +21,17 @@ pdffiller/cli/commands/dump_data_fields.py,sha256=YR8aENCGkCRro0jTuuvMg2HCEos9aF
|
|
|
21
21
|
pdffiller/cli/commands/fill_form.py,sha256=5wjbjwYLsytY6ea-n_KDbU9UDmkN00NYj_gm25MQqJ8,4758
|
|
22
22
|
pdffiller/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
pdffiller/io/colors.py,sha256=QCBEWksTVNurOJQYO0zh1X_xxIOXxXmYSJhbCqnNjI8,1710
|
|
24
|
-
pdffiller/io/custom_pdf_writer.py,sha256=
|
|
24
|
+
pdffiller/io/custom_pdf_writer.py,sha256=5lKz59fobhQZ74tmV-4hosVi6Kd6PFTIKNptFO9-p4g,7077
|
|
25
25
|
pdffiller/io/output.py,sha256=QMASWRWmfZGG9DdtlfpWXM3VJAMgWGQwPUzoYp_9FFY,11298
|
|
26
26
|
pdffiller/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
pdffiller/widgets/base.py,sha256=omGVQsQgMa-ALESnUd3_94oVIYScAMl0SPhHC_DG8Lg,3613
|
|
28
28
|
pdffiller/widgets/checkbox.py,sha256=iijStLAsY1G4cljW3a9NxVS_8qxJewFEw-B8jU2aKXk,1711
|
|
29
29
|
pdffiller/widgets/radio.py,sha256=Db9Oc3Q8ge8qqTVPLoz3I1_SJBGyJ8KfA33ixZMr78c,1070
|
|
30
30
|
pdffiller/widgets/text.py,sha256=SiuyBvZPZ6idCmtZ_05zE26iN6Rz67OfOj1fUm98YQI,2397
|
|
31
|
-
python_pdffiller-1.1.
|
|
32
|
-
python_pdffiller-1.1.
|
|
33
|
-
python_pdffiller-1.1.
|
|
34
|
-
python_pdffiller-1.1.
|
|
35
|
-
python_pdffiller-1.1.
|
|
36
|
-
python_pdffiller-1.1.
|
|
37
|
-
python_pdffiller-1.1.
|
|
31
|
+
python_pdffiller-1.1.2.dist-info/licenses/AUTHORS.rst,sha256=1_hVzMKgmoXvGgrcZC7sIbU_6PvvkB6vwqevAqzrIkQ,205
|
|
32
|
+
python_pdffiller-1.1.2.dist-info/licenses/COPYING,sha256=ADPe-bH2wYq8nFf6EPJyovzTJyl3jSPnm09mGI8FSTo,1074
|
|
33
|
+
python_pdffiller-1.1.2.dist-info/METADATA,sha256=TOlT-uj2UUWfSM9YE93bhc0-cpOoNbmHBTKVqwFAPIo,4164
|
|
34
|
+
python_pdffiller-1.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
35
|
+
python_pdffiller-1.1.2.dist-info/entry_points.txt,sha256=RESKKpPPdWl0wDET96ntuFoUydALx9j0mxtbt-MEBjU,49
|
|
36
|
+
python_pdffiller-1.1.2.dist-info/top_level.txt,sha256=5MGWCBFYlu_Ax-I5PgQkV9Xw7O48maPe9z8Qj_yVPL4,10
|
|
37
|
+
python_pdffiller-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|