We can extract the metadata from PDF files using the pdf.metadata attribute. Suppose we store the metadata in the information variable. Let's explore the Author, Producer, and Title from dummy.pdf.
Working with PDF in Python
Extract the metadata
Report a typo
Sample Input 1:
Sample Output 1:
Mona Lott
OpenOffice.org 2.1
Dummy pdfWrite a program in Python 3
# get the author, producer and title from the 'information' dict
print(...)
print(...)
print(...)
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.