from typing import Mapping
import base64


def create_file_pdf(name: str, data: bytes) -> Mapping[str, str]:
    """Create a PDF file."""
    base64_data = base64.b64encode(data)

    return {
        "name": name,
        "data": base64_data.decode("utf-8"),
        "mime_type": "application/pdf",
    }