That “obvious solution” is very reminiscent of https://xkcd.com/927/.

And, as a sibling notes, it opens up the failure case of the attached data not matching the rendered PDF contents.

Yeah, I'm not proposing anything new -- just that apps use what's already available: embedding the content of a PDF as JSON, similar, or even plain text.