diff --git a/PyPDF2/generic.py b/PyPDF2/generic.py index 34b8b3974..c3fbfc80a 100644 --- a/PyPDF2/generic.py +++ b/PyPDF2/generic.py @@ -76,6 +76,14 @@ def get_object(self) -> Optional["PdfObject"]: """Resolve indirect references.""" return self + def getObject(self) -> Optional["PdfObject"]: + warnings.warn( + "getObject will be removed in PyPDF2 2.0.0. Use get_object instead.", + PendingDeprecationWarning, + stacklevel=2, + ) + return self.get_object() + def write_to_stream( self, stream: StreamType, encryption_key: Union[None, str, bytes] ) -> None: