feat: implement PDF page parsing, text extraction, and document modeling logic
This commit is contained in:
@@ -112,6 +112,7 @@ def get_document_annotations(document_id: str) -> list[AnnotationResponse]:
|
||||
timestamp=getattr(a, "timestamp", None),
|
||||
pageIndex=a.page_index,
|
||||
paths=[[{"x": p.x, "y": p.y} for p in stroke] for stroke in getattr(a, "paths", [])],
|
||||
quadPoints=getattr(a, "quad_points", []),
|
||||
fieldName=getattr(a, "field_name", None),
|
||||
fieldValue=getattr(a, "field_value", None),
|
||||
fieldType=getattr(a, "field_type", None),
|
||||
|
||||
@@ -14,6 +14,7 @@ class AnnotationResponse(BaseModel):
|
||||
timestamp: str | None = None
|
||||
pageIndex: int
|
||||
paths: list[list[dict[str, float]]] = []
|
||||
quadPoints: list[list[dict[str, float]]] = []
|
||||
|
||||
fieldName: str | None = None
|
||||
fieldValue: str | None = None
|
||||
|
||||
Reference in New Issue
Block a user