class_docstr: Converts PDF files to Document objects.
  It uses a converter that follows the PyPDFConverter protocol to perform the conversion.
  A default text extraction converter is used if no custom converter is provided.
  
  Usage example:
  ```python
  from haystack.components.converters.pypdf import PyPDFToDocument
  
  converter = PyPDFToDocument()
  results = converter.run(sources=["sample.pdf"], meta={"date_added": datetime.now().isoformat()})
  documents = results["documents"]
  print(documents[0].content)
  # 'This is a text from the PDF file.'
  ```
class_docstr_tok: ["Converts","PDF","files","to","Document","objects",".","It","uses","a","converter","that","follows","the","PyPDFConverter","protocol","to","perform","the","conversion",".","A","default","text","extraction","converter","is","used","if","no","custom","converter","is","provided",".","Usage","example",":","``","`","python","from","haystack.components.converters.pypdf","import","PyPDFToDocument","converter","=","PyPDFToDocument","(",")","results","=","converter.run","(","sources=","[","``","sample.pdf","''","]",",","meta=","{","``","date_added","''",":","datetime.now","(",")",".isoformat","(",")","}",")","documents","=","results","[","``","documents","''","]","print","(","documents","[","0","]",".content",")","#","'This","is","a","text","from","the","PDF","file",".","'","``","`"]
code: def to_dict(self):
      # do not serialize the _converter instance
      return default_to_dict(self, converter_name=self.converter_name)
  
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 2 for calling the PyPDFToDocument obj's underlying member method code with example usage: obj.to_dict() and returns: default_to_dict