You can split the markdown content using the properties from result.pages.
di_result_md_pages = {}
for page in result.pages:
start = page.spans[0]['offset']
end = page.spans[0]['offset'] + page.spans[0]['length']
content = result.content[start:end]
di_result_md_pages[page.page_number] = content
This will result in a dictionary with the original page number as key and the markdown content as value.
Originally found here: https://stackoverflow.com/a/78750151