PyPDFForm 1.4.34__tar.gz → 1.4.35__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-1.4.34 → pypdfform-1.4.35}/PKG-INFO +1 -1
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/__init__.py +1 -1
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/widgets/base.py +1 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm.egg-info/PKG-INFO +1 -1
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_create_widget.py +24 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_functional.py +8 -17
- {pypdfform-1.4.34 → pypdfform-1.4.35}/LICENSE +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/adapter.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/constants.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/coordinate.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/filler.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/font.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/image.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/__init__.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/base.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/checkbox.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/dropdown.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/image.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/radio.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/signature.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/middleware/text.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/patterns.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/template.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/utils.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/watermark.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/widgets/__init__.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/widgets/checkbox.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/widgets/dropdown.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/widgets/text.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm/wrapper.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm.egg-info/SOURCES.txt +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm.egg-info/dependency_links.txt +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm.egg-info/requires.txt +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/PyPDFForm.egg-info/top_level.txt +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/README.md +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/setup.cfg +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/setup.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_adobe_mode.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_dropdown.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_dropdown_simple.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_fill_max_length_text_field.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_fill_max_length_text_field_simple.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_functional_simple.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_paragraph.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_paragraph_simple.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_preview.py +0 -0
- {pypdfform-1.4.34 → pypdfform-1.4.35}/tests/test_signature.py +0 -0
|
@@ -198,6 +198,30 @@ def test_create_text_default(template_stream, pdf_samples, request):
|
|
|
198
198
|
assert obj.stream == expected
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
def test_create_text_alpha_bg_color(template_stream, pdf_samples, request):
|
|
202
|
+
expected_path = os.path.join(
|
|
203
|
+
pdf_samples, "widget", "create_text_alpha_bg_color.pdf"
|
|
204
|
+
)
|
|
205
|
+
with open(expected_path, "rb+") as f:
|
|
206
|
+
obj = PdfWrapper(template_stream).create_widget(
|
|
207
|
+
"text",
|
|
208
|
+
"foo",
|
|
209
|
+
1,
|
|
210
|
+
100,
|
|
211
|
+
100,
|
|
212
|
+
bg_color=(0, 0, 1, 0),
|
|
213
|
+
)
|
|
214
|
+
assert obj.schema["properties"]["foo"]["type"] == "string"
|
|
215
|
+
|
|
216
|
+
request.config.results["expected_path"] = expected_path
|
|
217
|
+
request.config.results["stream"] = obj.read()
|
|
218
|
+
|
|
219
|
+
expected = f.read()
|
|
220
|
+
|
|
221
|
+
assert len(obj.stream) == len(expected)
|
|
222
|
+
assert obj.stream == expected
|
|
223
|
+
|
|
224
|
+
|
|
201
225
|
def test_create_text_align_center(template_stream, pdf_samples, request):
|
|
202
226
|
expected_path = os.path.join(pdf_samples, "widget", "create_text_align_center.pdf")
|
|
203
227
|
with open(expected_path, "rb+") as f:
|
|
@@ -258,7 +258,7 @@ def test_draw_image_on_one_page(template_stream, image_samples, pdf_samples, req
|
|
|
258
258
|
|
|
259
259
|
expected = f.read()
|
|
260
260
|
|
|
261
|
-
if os.name
|
|
261
|
+
if os.name != "nt":
|
|
262
262
|
request.config.results["expected_path"] = expected_path
|
|
263
263
|
request.config.results["stream"] = obj.read()
|
|
264
264
|
assert len(obj.stream) == len(expected)
|
|
@@ -281,7 +281,7 @@ def test_draw_png_image_on_one_page(
|
|
|
281
281
|
|
|
282
282
|
expected = f.read()
|
|
283
283
|
|
|
284
|
-
if os.name
|
|
284
|
+
if os.name != "nt":
|
|
285
285
|
request.config.results["expected_path"] = expected_path
|
|
286
286
|
request.config.results["stream"] = obj.read()
|
|
287
287
|
assert len(obj.stream) == len(expected)
|
|
@@ -304,7 +304,7 @@ def test_draw_transparent_png_image_on_one_page(
|
|
|
304
304
|
|
|
305
305
|
expected = f.read()
|
|
306
306
|
|
|
307
|
-
if os.name
|
|
307
|
+
if os.name != "nt":
|
|
308
308
|
request.config.results["expected_path"] = expected_path
|
|
309
309
|
request.config.results["stream"] = obj.read()
|
|
310
310
|
assert len(obj.stream) == len(expected)
|
|
@@ -510,24 +510,15 @@ def test_fill_complex_fonts(sample_template_with_complex_fonts, pdf_samples, req
|
|
|
510
510
|
assert obj.stream == expected
|
|
511
511
|
|
|
512
512
|
|
|
513
|
-
def test_pages(template_stream, pdf_samples):
|
|
513
|
+
def test_pages(template_stream, pdf_samples, request):
|
|
514
|
+
expected_path = os.path.join(pdf_samples, "pages", "sample_template_page_1.pdf")
|
|
514
515
|
obj = PdfWrapper(template_stream)
|
|
515
516
|
|
|
516
|
-
with open(
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
with open(expected_path, "rb+") as f:
|
|
518
|
+
request.config.results["expected_path"] = expected_path
|
|
519
|
+
request.config.results["stream"] = obj.pages[0].read()
|
|
519
520
|
assert obj.pages[0].read() == f.read()
|
|
520
521
|
|
|
521
|
-
with open(
|
|
522
|
-
os.path.join(pdf_samples, "pages", "sample_template_page_2.pdf"), "rb+"
|
|
523
|
-
) as f:
|
|
524
|
-
assert obj.pages[1].read() == f.read()
|
|
525
|
-
|
|
526
|
-
with open(
|
|
527
|
-
os.path.join(pdf_samples, "pages", "sample_template_page_3.pdf"), "rb+"
|
|
528
|
-
) as f:
|
|
529
|
-
assert obj.pages[2].read() == f.read()
|
|
530
|
-
|
|
531
522
|
|
|
532
523
|
def test_generate_coordinate_grid(template_stream, pdf_samples, request):
|
|
533
524
|
expected_path = os.path.join(pdf_samples, "test_generate_coordinate_grid.pdf")
|
|
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
|