From ae4df1f1edcffa9d998a39436fa407970bb19f32 Mon Sep 17 00:00:00 2001 From: john-trapasso Date: Fri, 27 Oct 2023 09:35:59 -0400 Subject: [PATCH] Update General.py Updates to support updated API calls in recent versions of PyMuPDF --- fiction_dl/Utilities/General.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fiction_dl/Utilities/General.py b/fiction_dl/Utilities/General.py index bd63d4b..a3d924d 100644 --- a/fiction_dl/Utilities/General.py +++ b/fiction_dl/Utilities/General.py @@ -56,6 +56,6 @@ def RenderPDFPageToBytes(documentFilePath: Path, pageIndex: int) -> bytes: ## document = fitz.open(documentFilePath) - page = document.loadPage(pageIndex) + page = document.load_page(pageIndex) - return page.getPixmap().getImageData(output = "jpeg") \ No newline at end of file + return page.get_pixmap().tobytes(output = "jpeg")