pdfplumber
pdfplumber copied to clipboard
page.crop causes the program to freeze
- pdfplumber version: [0.11.4]
- Python version: [3.11.9]
- OS: [win11] when i use the ThreadPoolExecutor simultaneously batch parsing multiple files Can cause Python processes to unexpectedly freeze After debugging, it was found that it may be caused by this code
image_bbox =[image['x0'],image['top'],image['x1'],image['bottom']] cropped= page.crop(image_bbox) image_obj=cropped.to_image(resolution=500) cropped.close()
Read a single file is fine
How to fix it Thanks
Thank you for flagging. Could you provide a PDF, as well as a reproducible script, that replicates this issue?