Skip to content

Commit

Permalink
Fix issues py-pdf#511 - title sometimes none
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 authored Apr 14, 2022
1 parent 38d5ec4 commit 6399908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PyPDF2/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2903,7 +2903,7 @@ def getText(self, key):
return retval
return None

title = property(lambda self: self.getText("/Title"))
title = property(lambda self: self.getText("/Title") or self['/Title'])
"""Read-only property accessing the document's **title**.
Returns a unicode string (``TextStringObject``) or ``None``
if the title is not specified."""
Expand Down

0 comments on commit 6399908

Please sign in to comment.