Feature/mfr pdf

Working but not ready for merge.
Could you please add unit tests for this function? At the very least, please test that

- the function returns a `RenderResult`.
- The correct asset URLs are included in the `RenderResult`.
- Invalid PDFs are handled properly.