Skip to content

Commit

Permalink
Get buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed May 2, 2024
1 parent 3cd1706 commit a588678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdftext/pdf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a588678

Please sign in to comment.