def METHOD_NAME(self, pdf: PdfModel, entity):
    meta = pdf.metadata
    if meta is not None:
        entity.add("title", meta.get("title"))
        entity.add("author", meta.get("author"))
        entity.add("generator", meta.get("creator"))
        entity.add("generator", meta.get("producer"))
        entity.add("keywords", meta.get("subject"))