PDFMinerLoader
This notebook provides a quick overview for getting started with PDFMiner
document loader. For detailed documentation of all __ModuleName__Loader features and configurations head to the API reference.
Overview
Integration details
Class | Package | Local | Serializable | JS support |
---|---|---|---|---|
PDFMinerLoader | langchain_community | ✅ | ❌ | ❌ |
Loader features
Source | Document Lazy Loading | Native Async Support | Extract Images | Extract Tables |
---|---|---|---|---|
PDFMinerLoader | ✅ | ❌ | ✅ | ✅ |
Setup
Credentials
No credentials are required to use PyMuPDFLoader
If you want to get automated best in-class tracing of your model calls you can also set your LangSmith API key by uncommenting below:
# os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
# os.environ["LANGSMITH_TRACING"] = "true"
Installation
Install langchain_community and pymupdf.
%pip install -qU langchain_community pdfminer.six
Note: you may need to restart the kernel to use updated packages.
Initialization
Now we can instantiate our model object and load documents:
from langchain_community.document_loaders import PDFMinerLoader
file_path = "./example_data/layout-parser-paper.pdf"
loader = PDFMinerLoader(file_path)
API Reference:PDFMinerLoader