From a5886789e64b0a209bd70763db61dfe368fc4f94 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 2 May 2024 10:23:44 -0700 Subject: [PATCH] Get buffer size --- pdftext/pdf/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdftext/pdf/utils.py b/pdftext/pdf/utils.py index cf77483..0d9e447 100644 --- a/pdftext/pdf/utils.py +++ b/pdftext/pdf/utils.py @@ -37,7 +37,7 @@ def unnormalize_bbox(bbox, page_width, page_height): def get_fontname(textpage, char_index): - n_bytes = settings.FONT_BUFFER_SIZE + n_bytes = pdfium_c.FPDFText_GetFontInfo(textpage, char_index, None, 0, None) buffer = ctypes.create_string_buffer(n_bytes) # Re-interpret the type from char to unsigned short as required by the function buffer_ptr = ctypes.cast(buffer, ctypes.POINTER(ctypes.c_ushort))