PdfSpace Objects
put_object_instance
object_instance- The object instance to add to the PDF.pages- Page numbers or ranges where the object should appear. Can be:- A single page number (int)
- A list of page numbers (List[int])
- A Range object, specifying the start and end of the range (Range)
- A list of Range objects for multiple ranges (List[Range])
coordinates- Geometric coordinates for the object (e.g., bounding box, polygon, polyline).on_overlap- Strategy for handling existing annotations on the same pages.- āerrorā (default): Raises an error if annotation already exists.
- āreplaceā: Overwrites existing annotations on overlapping pages.
created_at- Optional timestamp when the annotation was created.created_by- Optional identifier of who created the annotation.last_edited_at- Optional timestamp when the annotation was last edited.last_edited_by- Optional identifier of who last edited the annotation.confidence- Optional confidence score for the annotation (0.0 to 1.0).manual_annotation- Optional flag indicating if this was manually annotated.
LabelRowError- If pages are invalid or if annotation already exists when on_overlap=āerrorā.
put_classification_instance
classification_instance- The classification instance to add to the PDF.pages- Page numbers or ranges where the classification should appear. Can be:- A single page number (int)
- A list of page numbers (List[int])
- A Range object, specifying the start and end of the range (Range)
- A list of Range objects for multiple ranges (List[Range]) For global classifications, set this to None.
on_overlap- Strategy for handling existing classifications on the same pages.- āerrorā (default): Raises an error if classification already exists.
- āreplaceā: Overwrites existing classifications on overlapping pages.
created_at- Optional timestamp when the annotation was created.created_by- Optional identifier of who created the annotation.last_edited_at- Optional timestamp when the annotation was last edited.last_edited_by- Optional identifier of who last edited the annotation.confidence- Optional confidence score for the annotation (0.0 to 1.0).manual_annotation- Optional flag indicating if this was manually annotated.
LabelRowError- If pages are invalid or if classification already exists when on_overlap=āerrorā.
remove_object_instance
object_hash- The hash identifier of the object instance to remove.pages- The pages the object instance is to be removed from.
Optional[ObjectInstance]- The removed object instance, or None if the object wasnāt found.

