feat: implement PDF annotation extraction and inspector API endpoints via C++ bindings

This commit is contained in:
azeeee05
2026-07-09 10:38:26 +05:30
parent 62ad42b116
commit 82a07d2e6e
7 changed files with 28 additions and 1 deletions
+1
View File
@@ -111,6 +111,7 @@ def get_document_annotations(document_id: str) -> list[AnnotationResponse]:
content=a.content,
timestamp=getattr(a, "timestamp", None),
pageIndex=a.page_index,
thickness=getattr(a, "thickness", None),
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),
+1
View File
@@ -13,6 +13,7 @@ class AnnotationResponse(BaseModel):
content: str
timestamp: str | None = None
pageIndex: int
thickness: float | None = None
paths: list[list[dict[str, float]]] = []
quadPoints: list[list[dict[str, float]]] = []