feat: implement PDF annotation extraction and inspector API endpoints via C++ bindings
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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]]] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user