PyPDFForm 4.2.2__tar.gz → 4.2.4__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.
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PKG-INFO +1 -1
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/__init__.py +1 -1
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/patterns.py +4 -4
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/utils.py +1 -3
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm.egg-info/PKG-INFO +1 -1
- {pypdfform-4.2.2 → pypdfform-4.2.4}/LICENSE +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/adapter.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/ap.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/assets/__init__.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/assets/bedrock.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/assets/blank.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/constants.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/coordinate.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/deprecation.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/filler.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/font.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/hooks.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/image.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/__init__.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/base.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/checkbox.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/dropdown.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/image.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/radio.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/signature.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/middleware/text.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/__init__.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/circle.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/ellipse.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/image.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/line.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/rect.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/raw/text.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/template.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/types.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/watermark.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/__init__.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/base.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/checkbox.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/dropdown.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/image.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/radio.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/signature.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/widgets/text.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm/wrapper.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm.egg-info/SOURCES.txt +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm.egg-info/dependency_links.txt +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm.egg-info/requires.txt +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/PyPDFForm.egg-info/top_level.txt +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/README.md +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/pyproject.toml +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/setup.cfg +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_bulk_create_fields.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_create_widget.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_draw_elements.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_dropdown.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_extract_values.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_fill_max_length_text_field.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_fill_method.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_font_widths.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_functional.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_generate_appearance_streams.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_js.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_need_appearances.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_paragraph.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_signature.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_use_full_widget_name.py +0 -0
- {pypdfform-4.2.2 → pypdfform-4.2.4}/tests/test_widget_attr_trigger.py +0 -0
|
@@ -20,7 +20,7 @@ The library supports various PDF form features, including:
|
|
|
20
20
|
PyPDFForm aims to simplify PDF form manipulation, making it accessible to developers of all skill levels.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
__version__ = "4.2.
|
|
23
|
+
__version__ = "4.2.4"
|
|
24
24
|
|
|
25
25
|
from .assets.blank import BlankPage
|
|
26
26
|
from .middleware import Widgets
|
|
@@ -330,8 +330,8 @@ def get_field_rect(annot: DictionaryObject) -> Tuple[float, float, float, float]
|
|
|
330
330
|
rect = annot[Rect]
|
|
331
331
|
|
|
332
332
|
return (
|
|
333
|
-
float(rect[0]),
|
|
334
|
-
float(rect[1]),
|
|
335
|
-
float(abs(rect[2] - rect[0])),
|
|
336
|
-
float(abs(rect[3] - rect[1])),
|
|
333
|
+
float(rect[0].get_object()),
|
|
334
|
+
float(rect[1].get_object()),
|
|
335
|
+
float(abs(rect[2].get_object() - rect[0].get_object())),
|
|
336
|
+
float(abs(rect[3].get_object() - rect[1].get_object())),
|
|
337
337
|
)
|
|
@@ -26,7 +26,6 @@ from pypdf.generic import ArrayObject, DictionaryObject, NameObject
|
|
|
26
26
|
from .constants import SLASH, UNIQUE_SUFFIX_LENGTH, Annots
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
@lru_cache
|
|
30
29
|
def stream_to_io(stream: bytes) -> BinaryIO:
|
|
31
30
|
"""
|
|
32
31
|
Converts a bytes stream to a BinaryIO object, which can be used by PyPDFForm.
|
|
@@ -34,8 +33,7 @@ def stream_to_io(stream: bytes) -> BinaryIO:
|
|
|
34
33
|
This function takes a bytes stream as input and returns a BinaryIO object
|
|
35
34
|
that represents the same data. This is useful because PyPDFForm often
|
|
36
35
|
works with BinaryIO objects, so this function allows you to easily convert
|
|
37
|
-
a bytes stream to the correct format.
|
|
38
|
-
for performance.
|
|
36
|
+
a bytes stream to the correct format.
|
|
39
37
|
|
|
40
38
|
Args:
|
|
41
39
|
stream (bytes): The bytes stream to convert.
|
|
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
|
|
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
|