diff --git a/test/unit_tests/conftest.py b/test/unit_tests/conftest.py index ebca268..aa173cf 100644 --- a/test/unit_tests/conftest.py +++ b/test/unit_tests/conftest.py @@ -194,10 +194,10 @@ def pdf_stream(pdf: fpdf.fpdf.FPDF): return pdf.output(dest="S").encode("latin1") -def add_image_to_last_page(pdf, image_metadata_pair): +def add_image_to_last_page(pdf: fpdf.fpdf.FPDF, image_metadata_pair): image, metadata = image_metadata_pair x, y, w, h = itemgetter("x1", "y1", "width", "height")(metadata) with tempfile.NamedTemporaryFile(suffix=".png") as temp_image: image.save(temp_image.name) - pdf.image(temp_image.name, x=x, y=y, w=w, h=h) + pdf.image(temp_image.name, x=x, y=y, w=w, h=h, type="png")