I'm have a script to extract attachment from PDF files, everything was working to upgrade pyPDF2 to the last version, i'm getting this error:
AttributeError: 'EncodedStreamObject' object has no attribute 'getData'
This is part of my code to extract atrachment from PDF:
pdf = pf.PdfFileReader(fname)
# Step 2 "The process of traversing the PDF tree structure"
catalog = pdf.trailer['/Root']
fDetail = catalog['/Names']['/EmbeddedFiles']['/Names']
soup = fDetail[1].getObject()
# Step 3 Stream data to a variable for further use
file = soup['/EF']['/F'].getData()
Environment
This error happen with PyPDF2 version 1.28.3 and above, my code works with 1.28.2 version.
I've made rollback to 1.28.2 version to get working everything again.
I'm have a script to extract attachment from PDF files, everything was working to upgrade pyPDF2 to the last version, i'm getting this error:
AttributeError: 'EncodedStreamObject' object has no attribute 'getData'This is part of my code to extract atrachment from PDF:
Environment
This error happen with PyPDF2 version 1.28.3 and above, my code works with 1.28.2 version.
I've made rollback to 1.28.2 version to get working everything again.