class_docstr: The default converter class that extracts text from a PdfReader object's pages and returns a Document.
class_docstr_tok: ["The","default","converter","class","that","extracts","text","from","a","PdfReader","object","'s","pages","and","returns","a","Document","."]
docstr: Extract text from the PDF and return a Document object with the text content.
docstr_tok: ["Extract","text","from","the","PDF","and","return","a","Document","object","with","the","text","content","."]
code: def convert(self, reader: "PdfReader") -> Document:
      """Extract text from the PDF and return a Document object with the text content."""
      text = "".join(
          page.extract_text()
          for page in reader.pages
          if page.extract_text()
      )
      return Document(content=text)
  
file_path: haystack/haystack/components/converters/pypdf.py
imports: import io
  import logging
  from typing import List, Union, Protocol, Dict, Any, Optional
  from pathlib import Path
  from haystack.dataclasses import ByteStream
  from haystack.lazy_imports import LazyImport
  from haystack import Document, component, default_to_dict
  from haystack.components.converters.utils import get_bytestream_from_source, normalize_metadata
label_desc: Use image node_id 1 for calling the DefaultConverter obj's underlying member method code with example usage: obj.convert(reader) and returns: Document