PageRef
Kind: class
Module/package: models
SDK: pdfdancer-client-python 2.0.0
Reference to a page with size and orientation metadata.
Parameters (usually provided by the server):
- internal_id: Identifier of the page object.
- position: Position referencing the page (often via
Position.at_page(page_number)). - type: Should be
ObjectType.PAGE. - page_size:
PageSizeof the page. - orientation:
Orientation.PORTRAITorOrientation.LANDSCAPE.
Usage:
- Returned inside
PageSnapshotobjects. You can inspect page size/orientation and use the page number for subsequent operations.
Declaration
PageRef(internal_id: str, position: pdfdancer.models.Position, type: pdfdancer.models.ObjectType, page_size: pdfdancer.models.PageSize | None, orientation: pdfdancer.models.Orientation | None) -> None
Members
__init__
__init__(self, internal_id: str, position: pdfdancer.models.Position, type: pdfdancer.models.ObjectType, page_size: pdfdancer.models.PageSize | None, orientation: pdfdancer.models.Orientation | None) -> None
Initialize self. See help(type(self)) for accurate signature.
get_internal_id
get_internal_id(self) -> str
Returns the internal identifier for the referenced object.
get_orientation
get_orientation(self) -> pdfdancer.models.Orientation | None
Get the page orientation.
get_page_size
get_page_size(self) -> pdfdancer.models.PageSize | None
Get the page size.
get_position
get_position(self) -> pdfdancer.models.Position
Returns the current position information for the referenced object.
get_type
get_type(self) -> pdfdancer.models.ObjectType
Returns the type classification of the referenced object.
set_position
set_position(self, position: pdfdancer.models.Position) -> None
Updates the position information for the referenced object.
to_dict
to_dict(self) -> Dict[str, Any]
Convert to dictionary for JSON serialization.
object_type
object_type: pdfdancer.models.ObjectType
Return the object type using the public object naming convention.