ValueError: cannot reshape array of size 293 into shape (193,121,newaxis)
Labels: name: area: doc loader, name: auto:bug

### System Info

Ubuntu 20.04

I got this while reading a book pdf with extract_images=True. 

[113](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:113) if xObject[obj]["[/Filter](https://file+.vscode-resource.vscode-cdn.net/Filter)"][1:] in _PDF_FILTER_WITHOUT_LOSS:
    [114](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:114)     height, width = xObject[obj]["[/Height](https://file+.vscode-resource.vscode-cdn.net/Height)"], xObject[obj]["[/Width](https://file+.vscode-resource.vscode-cdn.net/Width)"]
    [116](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:116)     images.append(
--> [117](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:117)         np.frombuffer(xObject[obj].get_data(), dtype=np.uint8).reshape(
    [118](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:118)             height, width, -1
    [119](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:119)         )
    [120](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:120)     )
    [121](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:121) elif xObject[obj]["[/Filter](https://file+.vscode-resource.vscode-cdn.net/Filter)"][1:] in _PDF_FILTER_WITH_LOSS:
    [122](https://file+.vscode-resource.vscode-cdn.net/home/karan/kj_workspace/kj_argentelm/risk_assessment/backend/~/anaconda3/envs/python39/lib/python3.9/site-packages/langchain_community/document_loaders/parsers/pdf.py:122)     images.append(xObject[obj].get_data())

ValueError: cannot reshape array of size 293 into shape (193,121,newaxis)
![Screenshot from 2024-01-09 11-16-32](https://github.com/langchain-ai/langchain/assets/29913676/587d9ff5-5406-4139-832d-533a8a05c00c)



### Who can help?

@eyurtsev 

### Information

- [X] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [X] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

```
from langchain_community.document_loaders import PyPDFLoader

loader = PyPDFLoader("./book.pdf", extract_images=True)
```

### Expected behavior

It should load the pdf and extract info from images also. When I set extract_images=False it works fine.