Skip to content

Feature: PDF attachment extraction API (embedded files + annotation positions) #308

Description

@yonikremer

Context

Docling is adding PDF embedded file / attachment processing.
docling-parse needs an API that exposes embedded file streams and the positions of FileAttachment annotations.

Proposed API

On the document-level parser:

  • list_embedded_files() -> list[EmbeddedFile] where each item carries:
    • name: str
    • mime_type: Optional[str]
    • size: int
    • bytes: bytes
  • list_attachment_annotations() -> list[AttachmentAnnotation] where each item carries:
    • page_index: int
    • bbox: BoundingBox (or equivalent rect struct used elsewhere in the API)
    • file_name: str — reference to the embedded file name

Backward compatibility

New methods; existing parser APIs unaffected.

Implementation will be opened as a PR from fork: yonikremer/docling-parse feat/attachments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions