I am trying this code to extract metadata for a pdf
There is author and then title, I want values for only author and title from the metadata
'''
import pikepdf
pdf = pikepdf.open(path)
docinfo = pdf.docinfo
for key, value in docinfo.items():
if str(key).startswith("A") == True or str(key).startswith("Ti") == True:
print(key, ":", value)
'''
The code runs but gives no output