diff --git a/tests/helpers/test_nup.py b/tests/helpers/test_nup.py index f919fe791..0c47aa246 100644 --- a/tests/helpers/test_nup.py +++ b/tests/helpers/test_nup.py @@ -20,6 +20,7 @@ def test_pageobj_placement(): assert xobject.pdf is dest_pdf pageobj_a = xobject.as_pageobject() + assert pageobj_a.get_matrix() == pdfium.PdfMatrix() assert isinstance(pageobj_a, pdfium.PdfPageObject) assert isinstance(pageobj_a.raw, pdfium.FPDF_PAGEOBJECT) assert pageobj_a.pdf is dest_pdf @@ -27,6 +28,7 @@ def test_pageobj_placement(): assert pageobj_a.type == pdfium.FPDF_PAGEOBJ_FORM matrix_a = pdfium.PdfMatrix(0.5, 0, 0, 0.5, 0, height/2) pageobj_a.set_matrix(matrix_a) # in this case: same effect as transform() + assert pageobj_a.get_matrix() == matrix_a dest_page.insert_object(pageobj_a) assert pageobj_a.pdf is dest_pdf assert pageobj_a.page is dest_page @@ -37,13 +39,15 @@ def test_pageobj_placement(): dest_page.insert_object(pageobj_b) pageobj_c = xobject.as_pageobject() + assert pageobj_c.get_matrix() == pdfium.PdfMatrix() matrix_c = pdfium.PdfMatrix(0.5, 0, 0, -0.5, 0, height/2) pageobj_c.transform(matrix_c) # in this case: same effect as set_matrix() + assert pageobj_c.get_matrix() == matrix_c dest_page.insert_object(pageobj_c) pageobj_d = xobject.as_pageobject() matrix_d = pdfium.PdfMatrix(-0.5, 0, 0, -0.5, width, height/2) - pageobj_d.transform(matrix_d) # in this case: same effect as set_matrix() + pageobj_d.transform(matrix_d) # in this case: same effect as set_matrix() dest_page.insert_object(pageobj_d) dest_page.generate_content()