Embed metadata in PDF

I am saving a plot as a PDF and I want to embed some metadata about the plot into the pdf file. Is that possible?

I’m not sure, if it is then you’d have to look that up for Cairo itself and we could add it maybe

I found another way to do what I need but for future reference it looks like cairo_pdf_surface_set_metadata is the function: