PyPDFParser#

class langchain_community.document_loaders.parsers.pdf.PyPDFParser(password: str | bytes | None = None, extract_images: bool = False, *, extraction_mode: str = 'plain', extraction_kwargs: Dict[str, Any] | None = None)[source]#

Load PDF using pypdf

Methods

__init__([password,Β extract_images,Β ...])

lazy_parse(blob)

Lazily parse the blob.

parse(blob)

Eagerly parse the blob into a document or documents.

Parameters:
  • password (Optional[Union[str, bytes]]) –

  • extract_images (bool) –

  • extraction_mode (str) –

  • extraction_kwargs (Optional[Dict[str, Any]]) –

__init__(password: str | bytes | None = None, extract_images: bool = False, *, extraction_mode: str = 'plain', extraction_kwargs: Dict[str, Any] | None = None)[source]#
Parameters:
  • password (str | bytes | None) –

  • extract_images (bool) –

  • extraction_mode (str) –

  • extraction_kwargs (Dict[str, Any] | None) –

lazy_parse(blob: Blob) β†’ Iterator[Document][source]#

Lazily parse the blob.

Parameters:

blob (Blob) –

Return type:

Iterator[Document]

parse(blob: Blob) β†’ List[Document]#

Eagerly parse the blob into a document or documents.

This is a convenience method for interactive development environment.

Production applications should favor the lazy_parse method instead.

Subclasses should generally not over-ride this parse method.

Parameters:

blob (Blob) – Blob instance

Returns:

List of documents

Return type:

List[Document]