Spaces:
Running
Running
File size: 440 Bytes
c1d887c 084819e c1d887c 084819e c1d887c 084819e c1d887c 084819e c1d887c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import logging
from .liteparse_utils import extract_text
logger = logging.getLogger(__name__)
def parse_pdf_layout(content: bytes):
"""Extract LiteParse text while preserving the legacy page-row contract."""
try:
text = extract_text(content)
return [{"page_number": 1, "text": text, "tables": []}] if text else []
except Exception as error:
logger.error("Error parsing PDF: %s", error)
raise
|