pdftext 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pdftext-0.3.3 → pdftext-0.3.4}/PKG-INFO +1 -1
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/inference.py +1 -1
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/pdf/utils.py +1 -2
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/settings.py +0 -1
- {pdftext-0.3.3 → pdftext-0.3.4}/pyproject.toml +1 -1
- {pdftext-0.3.3 → pdftext-0.3.4}/LICENSE +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/README.md +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/extract_text.py +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/models/dt.joblib +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/extraction.py +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/model.py +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/pdf/chars.py +0 -0
- {pdftext-0.3.3 → pdftext-0.3.4}/pdftext/postprocessing.py +0 -0
|
@@ -133,7 +133,7 @@ def infer_single_page(text_chars, block_threshold=settings.BLOCK_THRESHOLD):
|
|
|
133
133
|
span = update_span(line, span)
|
|
134
134
|
line = update_line(block, line)
|
|
135
135
|
block = update_block(blocks, block)
|
|
136
|
-
elif prev_char["char"] in LINE_BREAKS
|
|
136
|
+
elif prev_char["char"] in LINE_BREAKS: # Look for newline character as a forcing signal for a new line
|
|
137
137
|
span = update_span(line, span)
|
|
138
138
|
line = update_line(block, line)
|
|
139
139
|
elif prev_font_info != font_info:
|
|
@@ -42,8 +42,7 @@ def get_fontname(textpage, char_index):
|
|
|
42
42
|
# Re-interpret the type from char to unsigned short as required by the function
|
|
43
43
|
buffer_ptr = ctypes.cast(buffer, ctypes.POINTER(ctypes.c_ushort))
|
|
44
44
|
flag_buffer = ctypes.c_int()
|
|
45
|
-
|
|
46
|
-
font_info = pdfium_c.FPDFText_GetFontInfo(textpage, char_index, buffer_ptr, n_bytes, flag_ptr)
|
|
45
|
+
font_info = pdfium_c.FPDFText_GetFontInfo(textpage, char_index, buffer_ptr, n_bytes, flag_buffer)
|
|
47
46
|
if font_info == 0:
|
|
48
47
|
return None, None
|
|
49
48
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|