diff --git a/PyPDF2/generic.py b/PyPDF2/generic.py index 6051729be..e8a9d8d46 100644 --- a/PyPDF2/generic.py +++ b/PyPDF2/generic.py @@ -1894,7 +1894,7 @@ def color(self) -> Optional[tuple]: return self.get("/C", [FloatObject(0), FloatObject(0), FloatObject(0)]) @property - def fmt(self) -> Optional[OutlineFontFlag]: + def font_format(self) -> Optional[OutlineFontFlag]: """Read-only property accessing the font type. 1=italic, 2=bold, 3=both""" return self.get("/F", 0) diff --git a/tests/test_reader.py b/tests/test_reader.py index 6543d5d2d..56bc2a70b 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -867,8 +867,8 @@ def test_outline_color(): assert reader.outlines[0].color == [0, 0, 1] -def test_outline_fmt(): +def test_outline_font_format(): url = "https://corpora.tika.apache.org/base/docs/govdocs1/924/924546.pdf" name = "tika-924546.pdf" reader = PdfReader(BytesIO(get_pdf_from_url(url, name=name))) - assert reader.outlines[0].fmt == 2 + assert reader.outlines[0].font_format == 2