From 6d8a18a0043a9e00a30fdf10428dfc649884d47d Mon Sep 17 00:00:00 2001 From: j-t-1 <120829237+j-t-1@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:49:13 +0000 Subject: [PATCH] DOC: More comments in PdfWriter (#2976) Add two comments to the `__init__` of PdfWriter. --- pypdf/_writer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pypdf/_writer.py b/pypdf/_writer.py index c4406ac91..7e464309f 100644 --- a/pypdf/_writer.py +++ b/pypdf/_writer.py @@ -201,8 +201,13 @@ def __init__( dict[id(pdf)][(idnum, generation)] """ - self._ID: Union[ArrayObject, None] = None self._info_obj: Optional[PdfObject] + """The PDF files's document information dictionary, + the Info entry in the PDF file's trailer dictionary.""" + + self._ID: Union[ArrayObject, None] = None + """The PDF file identifier, + defined by the ID in the PDF file's trailer dictionary.""" if self.incremental: if isinstance(fileobj, (str, Path)):