## The problem
Issue deepset-ai/haystack#8491 (closed, 22 comments): **Describe the bug** When using Document Splitter with pdf and `split_type="passage"`, the result is always one document. This is using pypdf. **Expected behavior** The understanding I have is that it splits based on at least two line breaks `\n\n` **Additional context** When I tested using plain text it seems to be splitting correctly **To Reproduce** dir = '...' files = [ {"filename": "rules.pdf", "meta": {"split_by" : "passage", "split_length":1, "split_overlap":0, "split_threshold":0}}, {"filename": "rules.txt", "meta": {"split_by" : "passage", "split_length":1, "split_overlap":0, "split_t
## The verified fix
Root cause identified by contributor lbux: PDF converters store paragraph breaks as single newlines, but split_by='passage' splits on double newlines (\n\n), so passage splitting yields one document. Contributor davidsbatista's fix: use PyPDFToDocument(extraction_mode=PyPDFExtractionMode.LAYOUT) - 'works perfectly!' - since layout mode preserves paragraph spacing. Also noted: running DocumentCleaner with remove_empty_lines=True before the splitter strips the newlines passage splitting needs.