PyPDFForm 2.2.7__tar.gz → 2.3.1__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.
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PKG-INFO +1 -10
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/__init__.py +1 -1
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/filler.py +3 -5
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/patterns.py +14 -18
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/template.py +35 -14
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/watermark.py +2 -2
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/base.py +2 -2
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/signature.py +2 -2
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/wrapper.py +6 -2
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm.egg-info/PKG-INFO +1 -10
- {pypdfform-2.2.7 → pypdfform-2.3.1}/README.md +0 -9
- {pypdfform-2.2.7 → pypdfform-2.3.1}/pyproject.toml +1 -1
- {pypdfform-2.2.7 → pypdfform-2.3.1}/LICENSE +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/adapter.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/constants.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/coordinate.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/font.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/image.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/__init__.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/base.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/checkbox.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/dropdown.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/image.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/radio.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/signature.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/middleware/text.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/utils.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/__init__.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/bedrock.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/checkbox.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/dropdown.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/image.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/radio.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm/widgets/text.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm.egg-info/SOURCES.txt +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm.egg-info/dependency_links.txt +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm.egg-info/requires.txt +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/PyPDFForm.egg-info/top_level.txt +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/setup.cfg +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_adobe_mode.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_create_widget.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_dropdown.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_dropdown_simple.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_fill_max_length_text_field.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_fill_max_length_text_field_simple.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_fill_method.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_functional.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_functional_simple.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_paragraph.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_paragraph_simple.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_preview.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_signature.py +0 -0
- {pypdfform-2.2.7 → pypdfform-2.3.1}/tests/test_use_full_widget_name.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyPDFForm
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: The Python library for PDF forms.
|
|
5
5
|
Author: Jinge Li
|
|
6
6
|
License-Expression: MIT
|
|
@@ -49,15 +49,6 @@ Dynamic: license-file
|
|
|
49
49
|
<a href="https://pypistats.org/packages/pypdfform"><img src="https://img.shields.io/pypi/dm/pypdfform?logo=pypi&logoColor=white&label=downloads&labelColor=black&color=blue&style=for-the-badge"></a>
|
|
50
50
|
</p>
|
|
51
51
|
|
|
52
|
-
## Important Announcements
|
|
53
|
-
|
|
54
|
-
Hello fellow Python developers! With the release of v2.0.0, there are some important changes I'm making to the library:
|
|
55
|
-
|
|
56
|
-
* Since I started developing the library, versioning releases has been quite unorthodox, and there isn't any convention I followed. Starting with v2.0.0, PyPDFForm will version releases following the conventions defined by [Semantic Versioning](https://semver.org/).
|
|
57
|
-
* PyPDFForm now renders PDF form widgets! Ever since its ancestral stage, the library has only been able to render the data you filled into a PDF form. Now if you fill a PDF form using `PdfWrapper`, the result will render the whole widget instead of just the value that got filled. If you would like to disable this behavior, please refer to the docs [here](https://chinapandaman.github.io/PyPDFForm/fill/#disable-rendering-widgets).
|
|
58
|
-
|
|
59
|
-
Happy hacking!
|
|
60
|
-
|
|
61
52
|
## Introduction
|
|
62
53
|
|
|
63
54
|
PyPDFForm is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
|
|
@@ -333,10 +333,8 @@ def enable_adobe_mode(reader: PdfReader, writer: PdfWriter, adobe_mode: bool) ->
|
|
|
333
333
|
writer.root_object.update(
|
|
334
334
|
{NameObject(AcroForm): IndirectObject(len(writer.root_object), 0, writer)}
|
|
335
335
|
)
|
|
336
|
-
writer.root_object[AcroForm][NameObject(NeedAppearances)] = BooleanObject(
|
|
337
|
-
|
|
338
|
-
)
|
|
339
|
-
writer.root_object[AcroForm][NameObject(Fields)] = ArrayObject() # noqa
|
|
336
|
+
writer.root_object[AcroForm][NameObject(NeedAppearances)] = BooleanObject(True)
|
|
337
|
+
writer.root_object[AcroForm][NameObject(Fields)] = ArrayObject()
|
|
340
338
|
|
|
341
339
|
|
|
342
340
|
def simple_fill(
|
|
@@ -370,7 +368,7 @@ def simple_fill(
|
|
|
370
368
|
radio_button_tracker = {}
|
|
371
369
|
|
|
372
370
|
for page in out.pages:
|
|
373
|
-
for annot in page.get(Annots, []):
|
|
371
|
+
for annot in page.get(Annots, []):
|
|
374
372
|
annot = cast(DictionaryObject, annot.get_object())
|
|
375
373
|
key = extract_widget_property(
|
|
376
374
|
annot.get_object(), WIDGET_KEY_PATTERNS, None, str
|
|
@@ -149,7 +149,7 @@ def simple_update_checkbox_value(annot: DictionaryObject, check: bool = False) -
|
|
|
149
149
|
check: Whether the checkbox should be checked (True) or unchecked (False)
|
|
150
150
|
"""
|
|
151
151
|
|
|
152
|
-
for each in annot[AP][N]:
|
|
152
|
+
for each in annot[AP][N]:
|
|
153
153
|
if (check and str(each) != Off) or (not check and str(each) == Off):
|
|
154
154
|
annot[NameObject(AS)] = NameObject(each)
|
|
155
155
|
annot[NameObject(V)] = NameObject(each)
|
|
@@ -169,12 +169,12 @@ def simple_update_radio_value(annot: DictionaryObject) -> None:
|
|
|
169
169
|
"""
|
|
170
170
|
|
|
171
171
|
if Opt in annot[Parent]:
|
|
172
|
-
del annot[Parent][Opt]
|
|
172
|
+
del annot[Parent][Opt]
|
|
173
173
|
|
|
174
|
-
for each in annot[AP][N]:
|
|
174
|
+
for each in annot[AP][N]:
|
|
175
175
|
if str(each) != Off:
|
|
176
176
|
annot[NameObject(AS)] = NameObject(each)
|
|
177
|
-
annot[NameObject(Parent)][NameObject(V)] = NameObject(each)
|
|
177
|
+
annot[NameObject(Parent)][NameObject(V)] = NameObject(each)
|
|
178
178
|
break
|
|
179
179
|
|
|
180
180
|
|
|
@@ -191,7 +191,7 @@ def simple_update_dropdown_value(annot: DictionaryObject, widget: Dropdown) -> N
|
|
|
191
191
|
"""
|
|
192
192
|
|
|
193
193
|
if Parent in annot and T not in annot:
|
|
194
|
-
annot[NameObject(Parent)][NameObject(V)] = TextStringObject(
|
|
194
|
+
annot[NameObject(Parent)][NameObject(V)] = TextStringObject(
|
|
195
195
|
widget.choices[widget.value]
|
|
196
196
|
)
|
|
197
197
|
annot[NameObject(AP)] = TextStringObject(widget.choices[widget.value])
|
|
@@ -214,9 +214,7 @@ def simple_update_text_value(annot: DictionaryObject, widget: Text) -> None:
|
|
|
214
214
|
"""
|
|
215
215
|
|
|
216
216
|
if Parent in annot and T not in annot:
|
|
217
|
-
annot[NameObject(Parent)][NameObject(V)] = TextStringObject(
|
|
218
|
-
widget.value
|
|
219
|
-
)
|
|
217
|
+
annot[NameObject(Parent)][NameObject(V)] = TextStringObject(widget.value)
|
|
220
218
|
annot[NameObject(AP)] = TextStringObject(widget.value)
|
|
221
219
|
else:
|
|
222
220
|
annot[NameObject(V)] = TextStringObject(widget.value)
|
|
@@ -234,8 +232,8 @@ def simple_flatten_radio(annot: DictionaryObject) -> None:
|
|
|
234
232
|
annot: PDF radio button annotation dictionary to flatten
|
|
235
233
|
"""
|
|
236
234
|
|
|
237
|
-
annot[NameObject(Parent)][NameObject(Ff)] = NumberObject(
|
|
238
|
-
int(annot[NameObject(Parent)].get(NameObject(Ff), 0)) | READ_ONLY
|
|
235
|
+
annot[NameObject(Parent)][NameObject(Ff)] = NumberObject(
|
|
236
|
+
int(annot[NameObject(Parent)].get(NameObject(Ff), 0)) | READ_ONLY
|
|
239
237
|
)
|
|
240
238
|
|
|
241
239
|
|
|
@@ -251,12 +249,12 @@ def simple_flatten_generic(annot: DictionaryObject) -> None:
|
|
|
251
249
|
"""
|
|
252
250
|
|
|
253
251
|
if Parent in annot and Ff not in annot:
|
|
254
|
-
annot[NameObject(Parent)][NameObject(Ff)] = NumberObject(
|
|
255
|
-
int(annot.get(NameObject(Ff), 0)) | READ_ONLY
|
|
252
|
+
annot[NameObject(Parent)][NameObject(Ff)] = NumberObject(
|
|
253
|
+
int(annot.get(NameObject(Ff), 0)) | READ_ONLY
|
|
256
254
|
)
|
|
257
255
|
else:
|
|
258
256
|
annot[NameObject(Ff)] = NumberObject(
|
|
259
|
-
int(annot.get(NameObject(Ff), 0)) | READ_ONLY
|
|
257
|
+
int(annot.get(NameObject(Ff), 0)) | READ_ONLY
|
|
260
258
|
)
|
|
261
259
|
|
|
262
260
|
|
|
@@ -272,9 +270,9 @@ def update_annotation_name(annot: DictionaryObject, val: str) -> None:
|
|
|
272
270
|
"""
|
|
273
271
|
|
|
274
272
|
if Parent in annot and T not in annot:
|
|
275
|
-
annot[NameObject(Parent)][NameObject(T)] = TextStringObject(val)
|
|
273
|
+
annot[NameObject(Parent)][NameObject(T)] = TextStringObject(val)
|
|
276
274
|
else:
|
|
277
|
-
annot[NameObject(T)] = TextStringObject(val)
|
|
275
|
+
annot[NameObject(T)] = TextStringObject(val)
|
|
278
276
|
|
|
279
277
|
|
|
280
278
|
def update_created_text_field_alignment(annot: DictionaryObject, val: int) -> None:
|
|
@@ -303,9 +301,7 @@ def update_created_text_field_multiline(annot: DictionaryObject, val: bool) -> N
|
|
|
303
301
|
"""
|
|
304
302
|
|
|
305
303
|
if val:
|
|
306
|
-
annot[NameObject(Ff)] = NumberObject(
|
|
307
|
-
int(annot[NameObject(Ff)]) | MULTILINE # noqa
|
|
308
|
-
)
|
|
304
|
+
annot[NameObject(Ff)] = NumberObject(int(annot[NameObject(Ff)]) | MULTILINE)
|
|
309
305
|
|
|
310
306
|
|
|
311
307
|
NON_ACRO_FORM_PARAM_TO_FUNC = {
|
|
@@ -39,21 +39,30 @@ from .utils import (extract_widget_property, find_pattern_match, handle_color,
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
def set_character_x_paddings(
|
|
42
|
-
pdf_stream: bytes,
|
|
42
|
+
pdf_stream: bytes,
|
|
43
|
+
widgets: Dict[str, WIDGET_TYPES],
|
|
44
|
+
use_full_widget_name: bool,
|
|
43
45
|
) -> Dict[str, WIDGET_TYPES]:
|
|
44
|
-
"""Calculates and sets character spacing for comb text fields.
|
|
46
|
+
"""Calculates and sets character spacing for comb text fields in PDF forms.
|
|
47
|
+
|
|
48
|
+
This function processes each widget in the PDF form and calculates the horizontal spacing
|
|
49
|
+
between characters for comb text fields (fixed-width text fields). The spacing is stored
|
|
50
|
+
in the widget's character_paddings property.
|
|
45
51
|
|
|
46
52
|
Args:
|
|
47
|
-
pdf_stream: PDF form as bytes
|
|
48
|
-
widgets: Dictionary of widget middleware objects
|
|
53
|
+
pdf_stream (bytes): PDF form as bytes
|
|
54
|
+
widgets (Dict[str, WIDGET_TYPES]): Dictionary of widget middleware objects
|
|
55
|
+
use_full_widget_name (bool): Whether to use full widget names including parent names
|
|
49
56
|
|
|
50
57
|
Returns:
|
|
51
|
-
Dict[str, WIDGET_TYPES]: Updated
|
|
58
|
+
Dict[str, WIDGET_TYPES]: Updated widget dictionary with character paddings set for comb fields
|
|
52
59
|
"""
|
|
53
60
|
|
|
54
61
|
for _widgets in get_widgets_by_page(pdf_stream).values():
|
|
55
62
|
for widget in _widgets:
|
|
56
63
|
key = extract_widget_property(widget, WIDGET_KEY_PATTERNS, None, str)
|
|
64
|
+
if use_full_widget_name:
|
|
65
|
+
key = get_widget_full_key(widget)
|
|
57
66
|
_widget = widgets[key]
|
|
58
67
|
|
|
59
68
|
if isinstance(_widget, Text) and _widget.comb is True:
|
|
@@ -166,23 +175,35 @@ def dropdown_to_text(dropdown: Dropdown) -> Text:
|
|
|
166
175
|
def update_text_field_attributes(
|
|
167
176
|
template_stream: bytes,
|
|
168
177
|
widgets: Dict[str, WIDGET_TYPES],
|
|
178
|
+
use_full_widget_name: bool,
|
|
169
179
|
) -> None:
|
|
170
|
-
"""
|
|
180
|
+
"""Update text field properties in a PDF form template.
|
|
171
181
|
|
|
172
|
-
|
|
173
|
-
- Font
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
182
|
+
Processes text field widgets in the template to update their visual attributes including:
|
|
183
|
+
- Font properties (family, size, color)
|
|
184
|
+
- Text alignment and wrapping behavior
|
|
185
|
+
- Auto-sizing of text to fit within field bounds
|
|
186
|
+
- Multi-line text field formatting
|
|
177
187
|
|
|
178
188
|
Args:
|
|
179
|
-
template_stream: PDF form
|
|
180
|
-
widgets: Dictionary
|
|
189
|
+
template_stream: Raw bytes of the PDF template containing form fields
|
|
190
|
+
widgets: Dictionary mapping field names to widget objects to update
|
|
191
|
+
use_full_widget_name: If True, uses full hierarchical widget names including parent keys.
|
|
192
|
+
When False (default), uses simple field names.
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
None: Modifies widget objects in-place
|
|
196
|
+
|
|
197
|
+
Note:
|
|
198
|
+
This function modifies the widget objects in-place and does not return anything.
|
|
199
|
+
Changes include font properties, text alignment, and auto-wrapping settings.
|
|
181
200
|
"""
|
|
182
201
|
|
|
183
202
|
for _widgets in get_widgets_by_page(template_stream).values():
|
|
184
203
|
for _widget in _widgets:
|
|
185
204
|
key = extract_widget_property(_widget, WIDGET_KEY_PATTERNS, None, str)
|
|
205
|
+
if use_full_widget_name:
|
|
206
|
+
key = get_widget_full_key(_widget)
|
|
186
207
|
|
|
187
208
|
if isinstance(widgets[key], Text):
|
|
188
209
|
should_adjust_font_size = False
|
|
@@ -569,7 +590,7 @@ def update_widget_keys(
|
|
|
569
590
|
new_key = new_keys[i]
|
|
570
591
|
tracker = -1
|
|
571
592
|
for page in out.pages:
|
|
572
|
-
for annot in page.get(Annots, []):
|
|
593
|
+
for annot in page.get(Annots, []):
|
|
573
594
|
annot = cast(DictionaryObject, annot.get_object())
|
|
574
595
|
key = extract_widget_property(
|
|
575
596
|
annot.get_object(), WIDGET_KEY_PATTERNS, None, str
|
|
@@ -380,7 +380,7 @@ def copy_watermark_widgets(
|
|
|
380
380
|
watermark_file = PdfReader(stream_to_io(watermark))
|
|
381
381
|
for j, page in enumerate(watermark_file.pages):
|
|
382
382
|
widgets_to_copy_pdf[j] = []
|
|
383
|
-
for annot in page.get(Annots, []):
|
|
383
|
+
for annot in page.get(Annots, []):
|
|
384
384
|
key = extract_widget_property(
|
|
385
385
|
annot.get_object(), WIDGET_KEY_PATTERNS, None, str
|
|
386
386
|
)
|
|
@@ -393,7 +393,7 @@ def copy_watermark_widgets(
|
|
|
393
393
|
for i, page in enumerate(out.pages):
|
|
394
394
|
if i in widgets_to_copy:
|
|
395
395
|
page[NameObject(Annots)] = (
|
|
396
|
-
(page[NameObject(Annots)] + ArrayObject(widgets_to_copy[i]))
|
|
396
|
+
(page[NameObject(Annots)] + ArrayObject(widgets_to_copy[i]))
|
|
397
397
|
if Annots in page
|
|
398
398
|
else ArrayObject(widgets_to_copy[i])
|
|
399
399
|
)
|
|
@@ -83,7 +83,7 @@ class Widget:
|
|
|
83
83
|
)
|
|
84
84
|
self.acro_form_params[param] = value
|
|
85
85
|
elif user_input in self.NONE_DEFAULTS:
|
|
86
|
-
self.acro_form_params[param] = None
|
|
86
|
+
self.acro_form_params[param] = None
|
|
87
87
|
|
|
88
88
|
for each in self.ALLOWED_NON_ACRO_FORM_PARAMS:
|
|
89
89
|
if each in kwargs:
|
|
@@ -154,7 +154,7 @@ def handle_non_acro_form_params(pdf: bytes, key: str, params: list) -> bytes:
|
|
|
154
154
|
out.append(pdf_file)
|
|
155
155
|
|
|
156
156
|
for page in out.pages:
|
|
157
|
-
for annot in page.get(Annots, []):
|
|
157
|
+
for annot in page.get(Annots, []):
|
|
158
158
|
annot = cast(DictionaryObject, annot.get_object())
|
|
159
159
|
_key = extract_widget_property(
|
|
160
160
|
annot.get_object(), WIDGET_KEY_PATTERNS, None, str
|
|
@@ -101,12 +101,12 @@ class SignatureWidget:
|
|
|
101
101
|
|
|
102
102
|
input_pdf = PdfReader(stream_to_io(stream))
|
|
103
103
|
page_count = len(input_pdf.pages)
|
|
104
|
-
pdf = PdfReader(stream_to_io(BEDROCK_PDF))
|
|
104
|
+
pdf = PdfReader(stream_to_io(BEDROCK_PDF))
|
|
105
105
|
out = PdfWriter()
|
|
106
106
|
out.append(pdf)
|
|
107
107
|
|
|
108
108
|
for page in out.pages:
|
|
109
|
-
for annot in page.get(Annots, []):
|
|
109
|
+
for annot in page.get(Annots, []):
|
|
110
110
|
key = extract_widget_property(
|
|
111
111
|
annot.get_object(), WIDGET_KEY_PATTERNS, None, str
|
|
112
112
|
)
|
|
@@ -432,9 +432,13 @@ class PdfWrapper(FormWrapper):
|
|
|
432
432
|
if isinstance(value, Dropdown):
|
|
433
433
|
self.widgets[key] = dropdown_to_text(value)
|
|
434
434
|
|
|
435
|
-
update_text_field_attributes(
|
|
435
|
+
update_text_field_attributes(
|
|
436
|
+
self.stream, self.widgets, getattr(self, "use_full_widget_name")
|
|
437
|
+
)
|
|
436
438
|
if self.read():
|
|
437
|
-
self.widgets = set_character_x_paddings(
|
|
439
|
+
self.widgets = set_character_x_paddings(
|
|
440
|
+
self.stream, self.widgets, getattr(self, "use_full_widget_name")
|
|
441
|
+
)
|
|
438
442
|
|
|
439
443
|
self.stream = remove_all_widgets(
|
|
440
444
|
fill(self.stream, self.widgets, getattr(self, "use_full_widget_name"))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyPDFForm
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.1
|
|
4
4
|
Summary: The Python library for PDF forms.
|
|
5
5
|
Author: Jinge Li
|
|
6
6
|
License-Expression: MIT
|
|
@@ -49,15 +49,6 @@ Dynamic: license-file
|
|
|
49
49
|
<a href="https://pypistats.org/packages/pypdfform"><img src="https://img.shields.io/pypi/dm/pypdfform?logo=pypi&logoColor=white&label=downloads&labelColor=black&color=blue&style=for-the-badge"></a>
|
|
50
50
|
</p>
|
|
51
51
|
|
|
52
|
-
## Important Announcements
|
|
53
|
-
|
|
54
|
-
Hello fellow Python developers! With the release of v2.0.0, there are some important changes I'm making to the library:
|
|
55
|
-
|
|
56
|
-
* Since I started developing the library, versioning releases has been quite unorthodox, and there isn't any convention I followed. Starting with v2.0.0, PyPDFForm will version releases following the conventions defined by [Semantic Versioning](https://semver.org/).
|
|
57
|
-
* PyPDFForm now renders PDF form widgets! Ever since its ancestral stage, the library has only been able to render the data you filled into a PDF form. Now if you fill a PDF form using `PdfWrapper`, the result will render the whole widget instead of just the value that got filled. If you would like to disable this behavior, please refer to the docs [here](https://chinapandaman.github.io/PyPDFForm/fill/#disable-rendering-widgets).
|
|
58
|
-
|
|
59
|
-
Happy hacking!
|
|
60
|
-
|
|
61
52
|
## Introduction
|
|
62
53
|
|
|
63
54
|
PyPDFForm is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
|
|
@@ -8,15 +8,6 @@
|
|
|
8
8
|
<a href="https://pypistats.org/packages/pypdfform"><img src="https://img.shields.io/pypi/dm/pypdfform?logo=pypi&logoColor=white&label=downloads&labelColor=black&color=blue&style=for-the-badge"></a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
## Important Announcements
|
|
12
|
-
|
|
13
|
-
Hello fellow Python developers! With the release of v2.0.0, there are some important changes I'm making to the library:
|
|
14
|
-
|
|
15
|
-
* Since I started developing the library, versioning releases has been quite unorthodox, and there isn't any convention I followed. Starting with v2.0.0, PyPDFForm will version releases following the conventions defined by [Semantic Versioning](https://semver.org/).
|
|
16
|
-
* PyPDFForm now renders PDF form widgets! Ever since its ancestral stage, the library has only been able to render the data you filled into a PDF form. Now if you fill a PDF form using `PdfWrapper`, the result will render the whole widget instead of just the value that got filled. If you would like to disable this behavior, please refer to the docs [here](https://chinapandaman.github.io/PyPDFForm/fill/#disable-rendering-widgets).
|
|
17
|
-
|
|
18
|
-
Happy hacking!
|
|
19
|
-
|
|
20
11
|
## Introduction
|
|
21
12
|
|
|
22
13
|
PyPDFForm is a free and open source pure-Python 3 library for PDF form processing. It contains the essential
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|