Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSSyntax error when trying to extract text from a specific pdf #1080

Open
LB207 opened this issue Feb 17, 2025 · 0 comments
Open

PSSyntax error when trying to extract text from a specific pdf #1080

LB207 opened this issue Feb 17, 2025 · 0 comments

Comments

@LB207
Copy link

LB207 commented Feb 17, 2025

Bug report

  • A description of the bug

When I tried to extract page 69 from this Lloyds pdf document I recieved a PSSyntax error. After investigation I discovered that it is due to the the #885 bug fix. By passing all keywords that end code stream we end up having some true and false booleans split - see the dictionary below.

  • Steps to reproduce the bug.

pdf: https://www.lloydsbankinggroup.com/assets/pdfs/investors/financial-performance/lloyds-banking-group-plc/2023/q4/2023-lbg-annual-report.pdf

>>from pdfminer.high_level import extract_text

>>text = extract_text("2023-lbg-annual-report.pdf", page_numbers=[69])
>>print(text)

  • If relevant, include the output and/or error stacktrace.

There's a very long error message but this is the final line

PSSyntaxError: Invalid dictionary construct: [/'CS', <PDFObjRef:113318>, /'I', False, /'K', /b'tr', /b'ue', /'S', /'Transparency', /'Type', /'Group']

If you need anymore infomation please feel free to contact me,
LB207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant