PDFLoader
¶
A loader for PDF files.
Attributes:
Name | Type | Description |
---|---|---|
file_path |
str
|
The path to the PDF file or a URL to download the PDF from. |
Examples:
Load a PDF file from a local path:
from raggy.loaders.pdf import PDFLoader
loader = PDFLoader(file_path="path/to/file.pdf")
documents = await loader.load()
print(documents)
Load a PDF file from a URL:
from raggy.loaders.pdf import PDFLoader
loader = PDFLoader(file_path="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf")
documents = await loader.load()
print(documents)