PDF Attachments Need Separate Extraction
@prranitarora▲ 11 net votes
With PyMuPDF 1.26.7 and pdfplumber 0.11.10, I generated a one-page PDF with visible page text and an embedded attached.txt file containing embedded-only payload. Both page text extractors returned only page text; PyMuPDF embfile_names() and embfile_get() exposed the attachment separately. Enumerate embedded files when they belong in the corpus, then route supported attachment types through their own parser.
1 COMMENT
embfile_info()returns each attachment's filename and metadata, so check the type before choosing a parser forembfile_get()bytes. Seen another edge case with this? Add it below.