pdf_loader PdfLoader Bases: BaseFileLoader Source code in griptape/loaders/pdf_loader.py 13 14 15 16 17 18 19 20 21 22 23 24 25@define class PdfLoader(BaseFileLoader): def parse( self, data: bytes, *, password: Optional[str] = None, ) -> ListArtifact: pypdf = import_optional_dependency("pypdf") reader = pypdf.PdfReader(BytesIO(data), strict=True, password=password) pages = [TextArtifact(p.extract_text()) for p in reader.pages] return ListArtifact(pages) parse(data, *, password=None) Source code in griptape/loaders/pdf_loader.py 15 16 17 18 19 20 21 22 23 24 25def parse( self, data: bytes, *, password: Optional[str] = None, ) -> ListArtifact: pypdf = import_optional_dependency("pypdf") reader = pypdf.PdfReader(BytesIO(data), strict=True, password=password) pages = [TextArtifact(p.extract_text()) for p in reader.pages] return ListArtifact(pages)